- 浏览: 2560813 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
SuperPlan(3)TaoBao Winner - UI - RequiredJS Grunt
4. RequireJS http://requirejs.org/
Follow the document here http://requirejs.org/docs/jquery.html
Add RequiredJS
Download the file from here http://requirejs.org/docs/download.html
I just go through the simple example to get an idea of how it works.
Here is the sample of requires_demo.html
<html]]>
<head]]>
<title]]>jQuery+RequireJS</title]]>
<scriptdata-main="scripts/main"src="./scripts/require-jquery.js"></script]]>
</head]]>
<body]]>
<h1]]>jQuery+RequireJS</h1]]>
</body]]>
</html]]>
It will load the min.'s in the scripts directory. main.js
require([ "jquery", "jquery.plugin1", "jquery.plugin2" ], function($) {
// the jquery.alpha.js and jquery.beta.js plugins have been loaded.
$(function() {
$('body').sayhello1().sayhello2(); });
});
jquery.plugin1.js
$.fn.sayhello1 = function() {
return this.append('<p>Sillycat, go and go!</p>');
};
jquery.plugin2.js
$.fn.sayhello2 = function() {
return this.append('<p>Kiko, go and go!</p>');
};
the main.js will load the other 2 plugins.
5. Grunt http://gruntjs.com/
Grunt and gruntplugins are installed and managed by nom, node.js package manager.
I love nodeJS, I used to read some documents and examples about nodeJS.
Install GRUNT Command Line Interface(CLI)
Make sure I did not installed any old version.
>npm uninstall -g grunt
>sudo npm install -g grunt-cli
After I installed that, it lives here
/usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt
>grunt -help
grunt-cli: The grunt command line interface. (v0.1.7)
I will try the first example from here https://github.com/blenderbox/grunt-example and try to understand that.
>git checkout https://github.com/blenderbox/grunt-example.git
>cd grunt-example
>npm install
npm command will install all the package we needs in directory node_modules
>grunt --help
We can see a lot of useful commands. But when I tried
>grunt server
Error Messages:
Running "server" task
Running "clean:server" (clean) task
Running "compass:server" (compass) task
Warning: You need to have Ruby and Compass installed and in your system PATH for this task to work. More info: https://github.com/gruntjs/grunt-contrib-compass Use --force to continue.
Aborted due to warnings.
Solution:
Follow the document in that URL https://github.com/gruntjs/grunt-contrib-compass
First verify if I have ruby
>ruby -v
ruby 1.8.7
>sudo gem update --system
>sudo gem install compass
It works. Go back to the command line and enter
>grunt server
I can visit the page http://localhost:9000
Execute the command just like ant
>grunt
In the app directory, we have images, scripts and styles.
We use sassy CSS in application.scss. And index.html import all the CSS and Scripts separately.
The most import files are package.json and Gruntfile.js.
In the package.json, we have all the dependencies files.
{
"name": "grunt-example",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.0",
"grunt-contrib-copy": "~0.4.0",
"grunt-contrib-concat": "~0.1.2",
"grunt-contrib-coffee": "~0.4.0",
"grunt-contrib-uglify": "~0.1.1",
"grunt-contrib-compass": "~0.2.0",
"grunt-contrib-jshint": "~0.1.1",
"grunt-contrib-cssmin": "~0.4.1",
"grunt-contrib-connect": "0.1.2",
"grunt-contrib-clean": "0.4.0",
"grunt-contrib-htmlmin": "0.1.1",
"grunt-contrib-imagemin": "0.1.2",
"grunt-contrib-livereload": "0.1.1",
"grunt-usemin": "~0.1.9",
"grunt-regarde": "~0.1.1",
"grunt-open": "~0.2.0",
"matchdep": "~0.1.1"
},
"engines": {
"node": ">=0.8.0"
}
}
The file Grntfile.js is something like build.xml, it is powerful and magic. It can run a server based on node js. Compass the CSS and javascript. It almost can do everything based on web design.
I can understand this configuration file Gruntfile.js, but that is not in detail. Maybe I can know more after backbone.
6. SSI
http://sillycat.iteye.com/blog/1075378
come soon…
7. Backbone
come soon…
References:
NodeJS 1~3
http://sillycat.iteye.com/blog/1453848
http://sillycat.iteye.com/blog/1460938
http://sillycat.iteye.com/blog/1462736
RequireJS
http://requirejs.org/
http://www.ibm.com/developerworks/cn/web/1209_shiwei_requirejs/
http://www.cnblogs.com/zhujl/archive/2011/12/30/2302110.html
http://www.jaceju.net/blog/archives/beginning-requirejs/
Grunt
https://github.com/blenderbox/grunt-example
sassy CSS
http://blog.meituo.net/2011/03/27/sass-%E4%BD%BF%E7%94%A8%E4%BB%8B%E7%BB%8D/
发表评论
-
Stop Update Here
2020-04-28 09:00 322I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 484NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 374Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 375Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 345Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 436Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 444Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 381Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 463VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 394Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 488NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 432Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 342Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 255GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 456GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 332GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 318Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 324Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 302Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 315Serverless with NodeJS and Tenc ...
相关推荐
作为一种广泛存在于各个领域的竞争现象,关于赢者通吃(winner-take-all)的大部分研究太复杂以至于难以很好地理解该现象。为了用简单的方式解释winner-take-all现象,提出了一个改进的winner-take-all模型,由离散...
SOM网络即自组织特征映射网络,采用竞争学习规则——Winner-Take-All 。网络的输出神经元之间相互竞争以求被激活,结果在每一时刻只有一个输出神经元被激活。这个被激活的神经元称为竞争获胜神经元,而其它神经元的...
在给定的"winner-filter.zip"压缩包文件中,包含了一个名为"维纳滤波器仿真.m"的MATLAB代码文件,这显然是一个用于仿真和分析维纳滤波器性能的程序。MATLAB是一种广泛应用于科学计算、数据分析和工程领域的编程环境...
WINNER-II场景下的信道仿真模型,可用于分析各个场景下的信道参数
《AFL_Winner - MetaTrader 5脚本.zip:基于趋势反转的交易策略解析》 在金融交易领域,有效的指标工具对于投资者来说至关重要。本文将深入解析名为"AFL_Winner"的MetaTrader 5脚本,它是一款专为MT5交易平台设计的...
WINNER II信道模型的建模与仿真 绍WINNER II信道模型所支持的场景,信道建模方法及信道参数和信道系数产生.
SCM WINNER II Channel Models, D1.1.2 V1.2, IST-4-027756 WINNER II Deliverable
它具有旨在实现最高内存填充率和有效使用多个计算单元的简单设计,同时仍提供了抵御权衡攻击的防御能力(通过利用最新处理器的缓存和内存组织)。 Argon2具有三个变体:Argon2i,Argon2d和Argon2id。...
为了解决上述问题,本研究提出了结合Winner-Take-All(WTA)竞争模型和改进的人工势场(Artificial Potential Field,简称APF)路径规划方法的控制策略。WTA竞争模型是一种有效的多机器人竞争问题解决方案,它模拟了...
FF Winner-crx插件是一款专为ESPN幻想足球爱好者设计的扩展程序,旨在帮助用户通过计算分数分布来预测比赛的可能赢家。这款插件利用了IBM Watson的先进数据分析能力,为用户提供了一个直观的方式来评估每个球员在...
winner2信道模型仿真了3D信道模型,里面涉及好多应用场景。可以与现实生活中的场景相匹配
3GPP SCM信道的增强版WINNER信道模型的实现代码,并附有代码实现的介绍文档
ZS-Young-Data-scientist-2018-Winner-Solution-rank-3:ZS年轻数据科学家挑战赛2018
在IT行业中,"Winner-gets-all"这个标题可能暗示了一个竞争激烈的环境,特别是在软件开发或者数据分析的场景下,其中胜者通常能获取大部分资源或市场份额。在这个特定的案例中,结合"世界高尔夫协会工作流程"的描述...
在"crispy-octo-winner-client-main"这个文件夹中,我们可能会找到以下关键文件和目录: 1. `index.html`:这是游戏的主页面,通常包含引入JavaScript和CSS文件的链接,以及游戏启动的JavaScript代码。 2. `scripts...
默认情况下,winner-mode 包含在 emacs 中,因为版本 20 但它没有启用。 这是一个制作支持微功能的包的实验。 我有一段时间的想法,我终于要测试了。 安装 这个包裹是果酱。 从果酱安装它 package-install winner-...
模块 (Grunt) -> Grunt、Grunt-Contrib-Concat、Grunt-Contrib-Imagemin、Grunt-Contrib-Jade、Grunt-Contrib-Jshint、Grunt-Contrib-Sass、Grunt-Contrib-Uglify、Grunt-Contrib-Watch、 Grunt-Express、Body-...
冠军得主,鸡肉晚餐! :rooster: 输入列表并旋转方向盘,即可每次获得随机赢家。 :crystal_ball: 目录 特征 输入名称或对象列表。 编辑并删除您的列表。 始终使用localStorage访问您最近创建的列表。...
WINNER II模型是无线通信领域一个重要的研究框架,主要用于评估和设计多输入多输出(MIMO)通信系统在3D空间中的性能。该模型由欧洲电信标准研究所(ETSI)发起,旨在为未来无线网络的标准制定提供技术依据。在3D-...
ToneWinner天逸设备说明书