Skip to content

Commit 950a4e4

Browse files
committedAug 15, 2014
merge
2 parents defc1e1 + 3963a3f commit 950a4e4

40 files changed

+25844
-75
lines changed
 

‎README.md

+57-55
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33

44
### 准备工作
55

6-
#### 安装 grunt-cli 和 spm
6+
#### 安装 grunt-cli 和 spm2
77

88
```
99
npm install grunt-cli -g
10-
npm install spm -g -f
10+
npm install spm@2.x -g -f
1111
```
1212

1313
#### Fork cmdjs/gallery 仓库
1414

1515
Fork [cmdjs/gallery](https://github.com/cmdjs/gallery) 到自己的仓库中, 然后把 fork 后的仓库克隆到本地, 如:
1616

1717
```
18-
git clone git@github.com:lizzie/gallery.git
18+
git clone git@github.com:{{your_username}}/gallery.git
1919
```
2020

2121
然后安装依赖模块。
@@ -92,62 +92,64 @@ package.json 各项含义参考 [这里](http://docs.spmjs.org/en/package), 一
9292

9393
```js
9494
module.exports = function(grunt) {
95-
var pkg = grunt.file.readJSON('package.json');
96-
97-
grunt.initConfig({
98-
pkg: pkg,
99-
100-
download: {
101-
options: {
102-
dest: 'src'
103-
},
104-
highcharts: {
105-
options: {
106-
transform: function(code) {
107-
// 根据需要对下载下来的 js 代码进行修改, 大致有以下几点
108-
// - 模块已有依赖的库, 如 jquery, 需要统一 require('$')
109-
// - 如果模块有返回的话, 需要在末尾通过 module.exports 方式返回
110-
// - 有些模块内部有判断 amd / cmd 的逻辑的话, 则无须包裹 define, 直接采用它的即可, 例如 jquery/jquery
111-
return [
112-
'define(function(require, exports, module) {',
113-
'var previousJQuery = this.jQuery;',
114-
"this.jQuery = require('$');",
115-
code,
116-
"module.exports = window.Highcharts;",
117-
"this.jQuery = previousJQuery;",
118-
"});"
119-
].join('\n');
120-
}
121-
},
122-
// 设置文件所在地址, 版本号替换成变量, 这样之后只需修改 package.json 的版本信息
123-
url: 'https://raw.github.com/highslide-software/highcharts.com/v<%= pkg.version%>/js/highcharts.src.js',
124-
// 设置文件名字, 可参考原来源仓库中的名字来
125-
name: 'highcharts.js'
126-
},
127-
// ....
128-
exporting: {
129-
options: {
130-
transform: function(code) {
131-
return [
132-
'define(function(require, exports, module) {',
133-
code,
134-
"});"
135-
].join('\n');
136-
}
137-
},
138-
url: 'https://raw.github.com/highslide-software/highcharts.com/v<%= pkg.version%>/js/modules/exporting.src.js',
139-
name: 'exporting.js'
140-
}
141-
}
142-
});
95+
var pkg = grunt.file.readJSON('package.json');
96+
97+
grunt.initConfig({
98+
pkg: pkg,
99+
100+
download: {
101+
options: {
102+
dest: 'src'
103+
},
104+
highcharts: {
105+
options: {
106+
transform: function(code) {
107+
// 根据需要对下载下来的 js 代码进行修改, 大致有以下几点
108+
// - 模块已有依赖的库, 如 jquery, 需要统一 require('$')
109+
// - 如果模块有返回的话, 需要在末尾通过 module.exports 方式返回
110+
// - 有些模块内部有判断 amd / cmd 的逻辑的话, 则无须包裹 define, 直接采用它的即可, 例如 jquery/jquery
111+
return [
112+
'define(function(require, exports, module) {',
113+
'var previousJQuery = this.jQuery;',
114+
"this.jQuery = require('$');",
115+
code,
116+
"module.exports = window.Highcharts;",
117+
"this.jQuery = previousJQuery;",
118+
"});"
119+
].join('\n');
120+
}
121+
},
122+
// 设置文件所在地址, 版本号替换成变量, 这样之后只需修改 package.json 的版本信息
123+
url: 'https://raw.github.com/highslide-software/highcharts.com/v<%= pkg.version%>/js/highcharts.src.js',
124+
// 设置文件名字, 可参考原来源仓库中的名字来
125+
name: 'highcharts.js'
126+
},
127+
// ....
128+
exporting: {
129+
options: {
130+
transform: function(code) {
131+
return [
132+
'define(function(require, exports, module) {',
133+
code,
134+
"});"
135+
].join('\n');
136+
}
137+
},
138+
url: 'https://raw.github.com/highslide-software/highcharts.com/v<%= pkg.version%>/js/modules/exporting.src.js',
139+
name: 'exporting.js'
140+
}
141+
}
142+
});
143143

144-
grunt.loadTasks('../_tasks/download/tasks');
145-
grunt.registerTask('default', ['download']);
146-
};
144+
grunt.loadGlobalTasks('spm-build');
145+
grunt.util._.merge(grunt.config.data, require('spm-build').config);
147146

147+
grunt.loadTasks('../_tasks/download/tasks');
148+
grunt.registerTask('build', ['download', 'spm-build']);
149+
};
148150
```
149151

150-
写完之后, 就可以执行 grunt, 下载对应文件并按照需要修改代码.
152+
写完之后, 就可以执行 `spm build`, 下载对应文件并按照需要修改代码.
151153
下载的文件保存在 src/ 下, 可打开看下各个文件是否正确.
152154

153155
这个过程, 主要是做了从源仓库中下载 js/css 文件, 并对下载下来的代码进行处理, 比如 js 文件, 可以设置 transform 封装成 ``define(factory)`` 的形式.

‎_tasks/download/tasks/download.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ module.exports = function(grunt) {
4444
var data = this.data;
4545

4646
grunt.log.writeln('downloading ' + data.url);
47-
request.get(data.url, function(err, res, body) {
47+
request.get({
48+
url: data.url,
49+
encoding: /\.(jpg|gif|png)$/.test(data.url) ? null : undefined
50+
}, function(err, res, body) {
4851
if (err) {
4952
grunt.log.error(err);
5053
} else if (res.statusCode !== 200) {
@@ -58,6 +61,7 @@ module.exports = function(grunt) {
5861
grunt.log.writeln('Add header and footer');
5962
code = [options.header || '', code, options.footer || ''].join('\n');
6063
}
64+
console.log(code);
6165
grunt.file.write(path.join(options.dest, data.name), code);
6266
grunt.log.ok();
6367
}

‎backbone/Gruntfile.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ module.exports = function(grunt) {
1414
'var previousJQuery = this.jQuery;',
1515
"this._ = require('underscore');",
1616
"this.jQuery = require('$');",
17-
code,
17+
code.replace("factory(root, exports, _)", "factory(root, exports, _, jQuery)"),
1818
"this._ = previousUnderscore;",
1919
"this.jQuery = previousJQuery;",
2020
"});"
2121
].join('\n');
2222
}
2323
},
2424
src: {
25-
url: 'https://raw.github.com/documentcloud/backbone/<%= pkg.version %>/backbone.js',
25+
url: 'https://raw.github.com/jashkenas/backbone/<%= pkg.version %>/backbone.js',
2626
name: 'backbone.js'
2727
}
2828
}

‎backbone/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"homepage": "http://backbonejs.org",
77
"keywords": ["model", "view", "controller", "router", "server", "client", "browser"],
88
"author": "Jeremy Ashkenas <jeremy@documentcloud.org>",
9-
"package": "https://raw.github.com/documentcloud/backbone/master/package.json",
9+
"package": "https://raw.github.com/jashkenas/backbone/master/package.json",
1010
"spm": {
1111
"alias": {
1212
"$": "$",

‎codemirror/Gruntfile.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
module.exports = function(grunt) {
2+
var pkg = grunt.file.readJSON('package.json');
3+
4+
grunt.initConfig({
5+
pkg: pkg,
6+
7+
download: {
8+
options: {
9+
dest: 'src'
10+
},
11+
codemirror: {
12+
options: {
13+
transform: function(code) {
14+
return [
15+
'define(function(require, exports, module) {',
16+
code,
17+
"module.exports = window.CodeMirror;",
18+
"});"
19+
].join('\n');
20+
}
21+
},
22+
url: 'https://raw.githubusercontent.com/marijnh/CodeMirror/v3.1/lib/codemirror.js',
23+
name: 'codemirror.js'
24+
},
25+
css: {
26+
url: 'https://raw.githubusercontent.com/marijnh/CodeMirror/v3.1/lib/codemirror.css',
27+
name: 'codemirror.css'
28+
}
29+
}
30+
});
31+
32+
grunt.loadGlobalTasks('spm-build');
33+
grunt.util._.merge(grunt.config.data, require('spm-build').config);
34+
35+
grunt.loadTasks('../_tasks/download/tasks');
36+
grunt.registerTask('build', ['download', 'spm-build']);
37+
};

‎codemirror/dist/codemirror-debug.css

+246
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
/*! define gallery/codemirror/3.1.0/codemirror-debug.css */
2+
/* BASICS */
3+
4+
.CodeMirror {
5+
/* Set height, width, borders, and global font properties here */
6+
font-family: monospace;
7+
height: 300px;
8+
}
9+
.CodeMirror-scroll {
10+
/* Set scrolling behaviour here */
11+
overflow: auto;
12+
}
13+
14+
/* PADDING */
15+
16+
.CodeMirror-lines {
17+
padding: 4px 0; /* Vertical padding around content */
18+
}
19+
.CodeMirror pre {
20+
padding: 0 4px; /* Horizontal padding of content */
21+
}
22+
23+
.CodeMirror-scrollbar-filler {
24+
background-color: white; /* The little square between H and V scrollbars */
25+
}
26+
27+
/* GUTTER */
28+
29+
.CodeMirror-gutters {
30+
border-right: 1px solid #ddd;
31+
background-color: #f7f7f7;
32+
}
33+
.CodeMirror-linenumbers {}
34+
.CodeMirror-linenumber {
35+
padding: 0 3px 0 5px;
36+
min-width: 20px;
37+
text-align: right;
38+
color: #999;
39+
}
40+
41+
/* CURSOR */
42+
43+
.CodeMirror div.CodeMirror-cursor {
44+
border-left: 1px solid black;
45+
}
46+
/* Shown when moving in bi-directional text */
47+
.CodeMirror div.CodeMirror-secondarycursor {
48+
border-left: 1px solid silver;
49+
}
50+
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
51+
width: auto;
52+
border: 0;
53+
background: transparent;
54+
background: rgba(0, 200, 0, .4);
55+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
56+
}
57+
/* Kludge to turn off filter in ie9+, which also accepts rgba */
58+
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor:not(#nonsense_id) {
59+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
60+
}
61+
/* Can style cursor different in overwrite (non-insert) mode */
62+
.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {}
63+
64+
/* DEFAULT THEME */
65+
66+
.cm-s-default .cm-keyword {color: #708;}
67+
.cm-s-default .cm-atom {color: #219;}
68+
.cm-s-default .cm-number {color: #164;}
69+
.cm-s-default .cm-def {color: #00f;}
70+
.cm-s-default .cm-variable {color: black;}
71+
.cm-s-default .cm-variable-2 {color: #05a;}
72+
.cm-s-default .cm-variable-3 {color: #085;}
73+
.cm-s-default .cm-property {color: black;}
74+
.cm-s-default .cm-operator {color: black;}
75+
.cm-s-default .cm-comment {color: #a50;}
76+
.cm-s-default .cm-string {color: #a11;}
77+
.cm-s-default .cm-string-2 {color: #f50;}
78+
.cm-s-default .cm-meta {color: #555;}
79+
.cm-s-default .cm-error {color: #f00;}
80+
.cm-s-default .cm-qualifier {color: #555;}
81+
.cm-s-default .cm-builtin {color: #30a;}
82+
.cm-s-default .cm-bracket {color: #997;}
83+
.cm-s-default .cm-tag {color: #170;}
84+
.cm-s-default .cm-attribute {color: #00c;}
85+
.cm-s-default .cm-header {color: blue;}
86+
.cm-s-default .cm-quote {color: #090;}
87+
.cm-s-default .cm-hr {color: #999;}
88+
.cm-s-default .cm-link {color: #00c;}
89+
90+
.cm-negative {color: #d44;}
91+
.cm-positive {color: #292;}
92+
.cm-header, .cm-strong {font-weight: bold;}
93+
.cm-em {font-style: italic;}
94+
.cm-emstrong {font-style: italic; font-weight: bold;}
95+
.cm-link {text-decoration: underline;}
96+
97+
.cm-invalidchar {color: #f00;}
98+
99+
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
100+
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
101+
102+
/* STOP */
103+
104+
/* The rest of this file contains styles related to the mechanics of
105+
the editor. You probably shouldn't touch them. */
106+
107+
.CodeMirror {
108+
line-height: 1;
109+
position: relative;
110+
overflow: hidden;
111+
}
112+
113+
.CodeMirror-scroll {
114+
/* 30px is the magic margin used to hide the element's real scrollbars */
115+
/* See overflow: hidden in .CodeMirror, and the paddings in .CodeMirror-sizer */
116+
margin-bottom: -30px; margin-right: -30px;
117+
padding-bottom: 30px; padding-right: 30px;
118+
height: 100%;
119+
outline: none; /* Prevent dragging from highlighting the element */
120+
position: relative;
121+
}
122+
.CodeMirror-sizer {
123+
position: relative;
124+
}
125+
126+
/* The fake, visible scrollbars. Used to force redraw during scrolling
127+
before actuall scrolling happens, thus preventing shaking and
128+
flickering artifacts. */
129+
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler {
130+
position: absolute;
131+
z-index: 6;
132+
display: none;
133+
}
134+
.CodeMirror-vscrollbar {
135+
right: 0; top: 0;
136+
overflow-x: hidden;
137+
overflow-y: scroll;
138+
}
139+
.CodeMirror-hscrollbar {
140+
bottom: 0; left: 0;
141+
overflow-y: hidden;
142+
overflow-x: scroll;
143+
}
144+
.CodeMirror-scrollbar-filler {
145+
right: 0; bottom: 0;
146+
z-index: 6;
147+
}
148+
149+
.CodeMirror-gutters {
150+
position: absolute; left: 0; top: 0;
151+
height: 100%;
152+
padding-bottom: 30px;
153+
z-index: 3;
154+
}
155+
.CodeMirror-gutter {
156+
height: 100%;
157+
display: inline-block;
158+
/* Hack to make IE7 behave */
159+
*zoom:1;
160+
*display:inline;
161+
}
162+
.CodeMirror-gutter-elt {
163+
position: absolute;
164+
cursor: default;
165+
z-index: 4;
166+
}
167+
168+
.CodeMirror-lines {
169+
cursor: text;
170+
}
171+
.CodeMirror pre {
172+
/* Reset some styles that the rest of the page might have set */
173+
-moz-border-radius: 0; -webkit-border-radius: 0; -o-border-radius: 0; border-radius: 0;
174+
border-width: 0;
175+
background: transparent;
176+
font-family: inherit;
177+
font-size: inherit;
178+
margin: 0;
179+
white-space: pre;
180+
word-wrap: normal;
181+
line-height: inherit;
182+
color: inherit;
183+
z-index: 2;
184+
position: relative;
185+
overflow: visible;
186+
}
187+
.CodeMirror-wrap pre {
188+
word-wrap: break-word;
189+
white-space: pre-wrap;
190+
word-break: normal;
191+
}
192+
.CodeMirror-linebackground {
193+
position: absolute;
194+
left: 0; right: 0; top: 0; bottom: 0;
195+
z-index: 0;
196+
}
197+
198+
.CodeMirror-linewidget {
199+
position: relative;
200+
z-index: 2;
201+
overflow: auto;
202+
}
203+
204+
.CodeMirror-widget {
205+
display: inline-block;
206+
}
207+
208+
.CodeMirror-wrap .CodeMirror-scroll {
209+
overflow-x: hidden;
210+
}
211+
212+
.CodeMirror-measure {
213+
position: absolute;
214+
width: 100%; height: 0px;
215+
overflow: hidden;
216+
visibility: hidden;
217+
}
218+
.CodeMirror-measure pre { position: static; }
219+
220+
.CodeMirror div.CodeMirror-cursor {
221+
position: absolute;
222+
visibility: hidden;
223+
border-right: none;
224+
width: 0;
225+
}
226+
.CodeMirror-focused div.CodeMirror-cursor {
227+
visibility: visible;
228+
}
229+
230+
.CodeMirror-selected { background: #d9d9d9; }
231+
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
232+
233+
.cm-searching {
234+
background: #ffa;
235+
background: rgba(255, 255, 0, .4);
236+
}
237+
238+
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
239+
.CodeMirror span { *vertical-align: text-bottom; }
240+
241+
@media print {
242+
/* Hide the cursor when printing */
243+
.CodeMirror div.CodeMirror-cursor {
244+
visibility: hidden;
245+
}
246+
}

‎codemirror/dist/codemirror-debug.js

+5,371
Large diffs are not rendered by default.

‎codemirror/dist/codemirror.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎codemirror/dist/codemirror.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
/*! define gallery/codemirror/3.1.0/codemirror-debug.css */
2+
/* BASICS */
3+
4+
.CodeMirror {
5+
/* Set height, width, borders, and global font properties here */
6+
font-family: monospace;
7+
height: 300px;
8+
}
9+
.CodeMirror-scroll {
10+
/* Set scrolling behaviour here */
11+
overflow: auto;
12+
}
13+
14+
/* PADDING */
15+
16+
.CodeMirror-lines {
17+
padding: 4px 0; /* Vertical padding around content */
18+
}
19+
.CodeMirror pre {
20+
padding: 0 4px; /* Horizontal padding of content */
21+
}
22+
23+
.CodeMirror-scrollbar-filler {
24+
background-color: white; /* The little square between H and V scrollbars */
25+
}
26+
27+
/* GUTTER */
28+
29+
.CodeMirror-gutters {
30+
border-right: 1px solid #ddd;
31+
background-color: #f7f7f7;
32+
}
33+
.CodeMirror-linenumbers {}
34+
.CodeMirror-linenumber {
35+
padding: 0 3px 0 5px;
36+
min-width: 20px;
37+
text-align: right;
38+
color: #999;
39+
}
40+
41+
/* CURSOR */
42+
43+
.CodeMirror div.CodeMirror-cursor {
44+
border-left: 1px solid black;
45+
}
46+
/* Shown when moving in bi-directional text */
47+
.CodeMirror div.CodeMirror-secondarycursor {
48+
border-left: 1px solid silver;
49+
}
50+
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
51+
width: auto;
52+
border: 0;
53+
background: transparent;
54+
background: rgba(0, 200, 0, .4);
55+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
56+
}
57+
/* Kludge to turn off filter in ie9+, which also accepts rgba */
58+
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor:not(#nonsense_id) {
59+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
60+
}
61+
/* Can style cursor different in overwrite (non-insert) mode */
62+
.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {}
63+
64+
/* DEFAULT THEME */
65+
66+
.cm-s-default .cm-keyword {color: #708;}
67+
.cm-s-default .cm-atom {color: #219;}
68+
.cm-s-default .cm-number {color: #164;}
69+
.cm-s-default .cm-def {color: #00f;}
70+
.cm-s-default .cm-variable {color: black;}
71+
.cm-s-default .cm-variable-2 {color: #05a;}
72+
.cm-s-default .cm-variable-3 {color: #085;}
73+
.cm-s-default .cm-property {color: black;}
74+
.cm-s-default .cm-operator {color: black;}
75+
.cm-s-default .cm-comment {color: #a50;}
76+
.cm-s-default .cm-string {color: #a11;}
77+
.cm-s-default .cm-string-2 {color: #f50;}
78+
.cm-s-default .cm-meta {color: #555;}
79+
.cm-s-default .cm-error {color: #f00;}
80+
.cm-s-default .cm-qualifier {color: #555;}
81+
.cm-s-default .cm-builtin {color: #30a;}
82+
.cm-s-default .cm-bracket {color: #997;}
83+
.cm-s-default .cm-tag {color: #170;}
84+
.cm-s-default .cm-attribute {color: #00c;}
85+
.cm-s-default .cm-header {color: blue;}
86+
.cm-s-default .cm-quote {color: #090;}
87+
.cm-s-default .cm-hr {color: #999;}
88+
.cm-s-default .cm-link {color: #00c;}
89+
90+
.cm-negative {color: #d44;}
91+
.cm-positive {color: #292;}
92+
.cm-header, .cm-strong {font-weight: bold;}
93+
.cm-em {font-style: italic;}
94+
.cm-emstrong {font-style: italic; font-weight: bold;}
95+
.cm-link {text-decoration: underline;}
96+
97+
.cm-invalidchar {color: #f00;}
98+
99+
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
100+
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
101+
102+
/* STOP */
103+
104+
/* The rest of this file contains styles related to the mechanics of
105+
the editor. You probably shouldn't touch them. */
106+
107+
.CodeMirror {
108+
line-height: 1;
109+
position: relative;
110+
overflow: hidden;
111+
}
112+
113+
.CodeMirror-scroll {
114+
/* 30px is the magic margin used to hide the element's real scrollbars */
115+
/* See overflow: hidden in .CodeMirror, and the paddings in .CodeMirror-sizer */
116+
margin-bottom: -30px; margin-right: -30px;
117+
padding-bottom: 30px; padding-right: 30px;
118+
height: 100%;
119+
outline: none; /* Prevent dragging from highlighting the element */
120+
position: relative;
121+
}
122+
.CodeMirror-sizer {
123+
position: relative;
124+
}
125+
126+
/* The fake, visible scrollbars. Used to force redraw during scrolling
127+
before actuall scrolling happens, thus preventing shaking and
128+
flickering artifacts. */
129+
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler {
130+
position: absolute;
131+
z-index: 6;
132+
display: none;
133+
}
134+
.CodeMirror-vscrollbar {
135+
right: 0; top: 0;
136+
overflow-x: hidden;
137+
overflow-y: scroll;
138+
}
139+
.CodeMirror-hscrollbar {
140+
bottom: 0; left: 0;
141+
overflow-y: hidden;
142+
overflow-x: scroll;
143+
}
144+
.CodeMirror-scrollbar-filler {
145+
right: 0; bottom: 0;
146+
z-index: 6;
147+
}
148+
149+
.CodeMirror-gutters {
150+
position: absolute; left: 0; top: 0;
151+
height: 100%;
152+
padding-bottom: 30px;
153+
z-index: 3;
154+
}
155+
.CodeMirror-gutter {
156+
height: 100%;
157+
display: inline-block;
158+
/* Hack to make IE7 behave */
159+
*zoom:1;
160+
*display:inline;
161+
}
162+
.CodeMirror-gutter-elt {
163+
position: absolute;
164+
cursor: default;
165+
z-index: 4;
166+
}
167+
168+
.CodeMirror-lines {
169+
cursor: text;
170+
}
171+
.CodeMirror pre {
172+
/* Reset some styles that the rest of the page might have set */
173+
-moz-border-radius: 0; -webkit-border-radius: 0; -o-border-radius: 0; border-radius: 0;
174+
border-width: 0;
175+
background: transparent;
176+
font-family: inherit;
177+
font-size: inherit;
178+
margin: 0;
179+
white-space: pre;
180+
word-wrap: normal;
181+
line-height: inherit;
182+
color: inherit;
183+
z-index: 2;
184+
position: relative;
185+
overflow: visible;
186+
}
187+
.CodeMirror-wrap pre {
188+
word-wrap: break-word;
189+
white-space: pre-wrap;
190+
word-break: normal;
191+
}
192+
.CodeMirror-linebackground {
193+
position: absolute;
194+
left: 0; right: 0; top: 0; bottom: 0;
195+
z-index: 0;
196+
}
197+
198+
.CodeMirror-linewidget {
199+
position: relative;
200+
z-index: 2;
201+
overflow: auto;
202+
}
203+
204+
.CodeMirror-widget {
205+
display: inline-block;
206+
}
207+
208+
.CodeMirror-wrap .CodeMirror-scroll {
209+
overflow-x: hidden;
210+
}
211+
212+
.CodeMirror-measure {
213+
position: absolute;
214+
width: 100%; height: 0px;
215+
overflow: hidden;
216+
visibility: hidden;
217+
}
218+
.CodeMirror-measure pre { position: static; }
219+
220+
.CodeMirror div.CodeMirror-cursor {
221+
position: absolute;
222+
visibility: hidden;
223+
border-right: none;
224+
width: 0;
225+
}
226+
.CodeMirror-focused div.CodeMirror-cursor {
227+
visibility: visible;
228+
}
229+
230+
.CodeMirror-selected { background: #d9d9d9; }
231+
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
232+
233+
.cm-searching {
234+
background: #ffa;
235+
background: rgba(255, 255, 0, .4);
236+
}
237+
238+
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
239+
.CodeMirror span { *vertical-align: text-bottom; }
240+
241+
@media print {
242+
/* Hide the cursor when printing */
243+
.CodeMirror div.CodeMirror-cursor {
244+
visibility: hidden;
245+
}
246+
}

‎codemirror/gallery/codemirror/3.1.0/codemirror-debug.js

+5,371
Large diffs are not rendered by default.

‎codemirror/gallery/codemirror/3.1.0/codemirror.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎codemirror/gallery/codemirror/3.1.0/codemirror.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎codemirror/package.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"family": "gallery",
3+
"name": "codemirror",
4+
"version": "3.1.0",
5+
"title": "CodeMirror",
6+
"description": "CodeMirror is a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code, and comes with a number of language modes and addons that implement more advanced editing functionality.",
7+
"docs": "http://codemirror.net/doc/manual.html",
8+
"homepage": "hhttp://codemirror.net/",
9+
"demo": "http://codemirror.net/index.html",
10+
"author": {
11+
"name" : "http://codemirror.net/index.html",
12+
"url" : "http://codemirror.net/index.html"
13+
},
14+
"keywords": [
15+
"edit code"
16+
],
17+
"licenses": "https://github.com/marijnh/CodeMirror/blob/master/LICENSE",
18+
"dependencies": {
19+
"jquery": "*"
20+
},
21+
"repository": {
22+
"type": "git",
23+
"url": "git://github.com/marijnh/CodeMirror.git"
24+
},
25+
"spm": {
26+
"output": [
27+
"codemirror.js",
28+
"codemirror.css"
29+
]
30+
}
31+
}

‎index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<body>
3232
<div id="mocha">Modules in Gallery</div>
3333
<script>
34-
seajs.use('gallery/expect/1.0.0/expect', function(expect) {
34+
(function() {
3535
mocha.setup('bdd');
3636

3737
var modules = [
@@ -58,7 +58,7 @@
5858
mocha.run()
5959
}
6060
})
61-
});
61+
})();
6262
</script>
6363
</body>
6464
</html>

‎jstree/Gruntfile.js

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
module.exports = function(grunt) {
2+
var pkg = grunt.file.readJSON('package.json');
3+
4+
grunt.initConfig({
5+
pkg: pkg,
6+
7+
download: {
8+
options: {
9+
dest: 'src'
10+
},
11+
src: {
12+
options: {
13+
transform: function(code) {
14+
code = 'define(function(require, exports, module) {\n' + code;
15+
code += '});';
16+
code = code.replace("require('jquery')", "require(\"$\")");
17+
return code;
18+
}
19+
},
20+
url: 'https://raw.githubusercontent.com/vakata/jstree/<%= pkg.version %>/dist/jstree.js',
21+
name: 'jstree.js'
22+
},
23+
css: {
24+
url: 'https://raw.githubusercontent.com/vakata/jstree/3.0.2/dist/themes/default/style.css',
25+
name: 'default.css'
26+
},
27+
png: {
28+
url: 'https://raw.githubusercontent.com/vakata/jstree/3.0.2/dist/themes/default/32px.png',
29+
name: '32px.png'
30+
},
31+
png2: {
32+
url: 'https://raw.githubusercontent.com/vakata/jstree/3.0.2/dist/themes/default/40px.png',
33+
name: '40px.png'
34+
},
35+
gif: {
36+
url: 'https://raw.githubusercontent.com/vakata/jstree/3.0.2/dist/themes/default/throbber.gif',
37+
name: 'throbber.gif'
38+
}
39+
}
40+
});
41+
42+
grunt.loadGlobalTasks('spm-build');
43+
grunt.util._.merge(grunt.config.data, require('spm-build').config);
44+
45+
grunt.loadTasks('../_tasks/download/tasks');
46+
grunt.registerTask('build', ['download', 'spm-build']);
47+
};
48+

‎jstree/README.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# jstree
2+
3+
[jsTree][jstree] is a tree view for jQuery (depends on 1.9.1 or later).
4+
It is absolutely free (MIT licence) and supports all modern browsers and IE from version 8 up.
5+
jsTree can display trees by parsing HTML or JSON and supports AJAX, it is themeable and easy to configure and customize. Events are fired when the user interacts with the tree. Other notable features are inline editing, drag'n'drop support, fuzzy searching (with optional server side calls), tri-state checkbox support, configurable node types, AMD compatibility, easily extendable via plugins.
6+
[jstree]: http://www.jstree.com/
7+
8+
## Getting Started
9+
10+
Download or checkout the latest copy and include the scripts and styles in your web page. Then create an instance (in this case using the inline HTML).
11+
12+
```html
13+
<link rel="stylesheet" href="dist/themes/default/style.min.css" />
14+
<script src="dist/libs/jquery.js"></script>
15+
<script src="dist/jstree.min.js"></script>
16+
<script>
17+
$(function() {
18+
$('#container').jstree(/* optional config object here */);
19+
});
20+
</script>
21+
<div id="container">
22+
<ul>
23+
<li>Root node
24+
<ul>
25+
<li id="child_node">Child node</li>
26+
</ul>
27+
</li>
28+
</ul>
29+
</div>
30+
```
31+
32+
Listen for changes on the tree using events:
33+
34+
```html
35+
<script>
36+
$(function () {
37+
$('#container').on('changed.jstree', function (e, data) {
38+
console.log(data.selected);
39+
});
40+
});
41+
</script>
42+
```
43+
44+
And interact with the tree:
45+
46+
```html
47+
<script>
48+
$(function () {
49+
$('#container').jstree(true).select_node('child_node');
50+
});
51+
</script>
52+
```
53+
54+
For a complete list of configuration options, events and available functions refer to the [documentation][docs] and [demos][demo].
55+
[docs]: http://jstree.com/docs
56+
[demo]: http://jstree.com/demo
57+
58+
## Contributing
59+
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/gruntjs/grunt).
60+
61+
_Please do NOT edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "src" subdirectory!_
62+
63+
If you want to you can always [donate a small amount][paypal] to help the development of jstree.
64+
[paypal]: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal@vakata.com&currency_code=USD&amount=&return=http://jstree.com/donation&item_name=Buy+me+a+coffee+for+jsTree
65+
66+
## License
67+
Copyright (c) 2014 Ivan Bozhanov (http://vakata.com)
68+
69+
Licensed under the [MIT license][mit].
70+
[mit]: http://www.opensource.org/licenses/mit-license.php

‎jstree/dist/32px.png

3.05 KB
Loading

‎jstree/dist/40px.png

1.84 KB
Loading

‎jstree/dist/default-debug.css

+982
Large diffs are not rendered by default.

‎jstree/dist/default.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎jstree/dist/jstree-debug.js

+6,996
Large diffs are not rendered by default.

‎jstree/dist/jstree.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎jstree/dist/throbber.gif

1.68 KB
Loading

‎jstree/package.json

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"family": "gallery",
3+
"name": "jstree",
4+
"title": "jsTree",
5+
"description": "jQuery tree plugin",
6+
"version": "3.0.2",
7+
"homepage": "http://jstree.com",
8+
"author": {
9+
"name": "Ivan Bozhanov",
10+
"email": "jstree@jstree.com",
11+
"url": "http://vakata.com"
12+
},
13+
"repository": {
14+
"type": "git",
15+
"url": "git://github.com/vakata/jstree.git"
16+
},
17+
"bugs": {
18+
"url": "https://github.com/vakata/jstree/issues"
19+
},
20+
"licenses": [
21+
{
22+
"type": "MIT",
23+
"url": "https://github.com/vakata/jstree/blob/master/LICENSE-MIT"
24+
}
25+
],
26+
"keywords": [],
27+
"devDependencies": {
28+
"grunt": "~0.4.0",
29+
"grunt-contrib-uglify": "*",
30+
"grunt-contrib-jshint": "*",
31+
"grunt-contrib-concat": "*",
32+
"grunt-contrib-copy": "*",
33+
"dox": "~0.4.4",
34+
"grunt-contrib-less": "~0.8.2",
35+
"grunt-contrib-watch": "~0.5.3",
36+
"grunt-contrib-imagemin": "~0.4.0",
37+
"grunt-contrib-qunit": "~v0.3.0",
38+
"grunt-text-replace": "~0.3.11"
39+
},
40+
"dependencies": {
41+
"jquery": ">=1.9.1"
42+
},
43+
"npmName": "jstree",
44+
"npmFileMap": [
45+
{
46+
"basePath": "/dist/",
47+
"files": [
48+
"jstree.min.js",
49+
"themes/**/*.png",
50+
"themes/**/*.gif",
51+
"themes/**/*.min.css"
52+
]
53+
}
54+
],
55+
"spm": {
56+
"alias": {
57+
"$": "$"
58+
},
59+
"output": [
60+
"jstree.js",
61+
"default.css",
62+
"32px.png",
63+
"40px.png",
64+
"throbber.gif"
65+
]
66+
}
67+
}

‎mergely/Gruntfile.js

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
module.exports = function(grunt) {
2+
var pkg = grunt.file.readJSON('package.json');
3+
4+
grunt.initConfig({
5+
pkg: pkg,
6+
7+
download: {
8+
options: {
9+
dest: 'src'
10+
},
11+
mergely: {
12+
options: {
13+
transform: function(code) {
14+
return [
15+
'define(function(require, exports, module) {',
16+
'var previousJQuery = this.jQuery;',
17+
'this.jQuery = require("$");',
18+
'var CodeMirror = require("codemirrorjs")',
19+
code,
20+
'module.exports = window.Mgly;',
21+
'this.jQuery = previousJQuery;',
22+
code,
23+
"});"
24+
].join('\n');
25+
}
26+
},
27+
url: 'https://raw.githubusercontent.com/wickedest/Mergely/master/lib/mergely.js',
28+
name: 'mergely.js'
29+
},
30+
css: {
31+
url: 'https://raw.githubusercontent.com/wickedest/Mergely/master/lib/mergely.css',
32+
name: 'mergely.css'
33+
}
34+
}
35+
});
36+
37+
grunt.loadGlobalTasks('spm-build');
38+
grunt.util._.merge(grunt.config.data, require('spm-build').config);
39+
40+
grunt.loadTasks('../_tasks/download/tasks');
41+
grunt.registerTask('build', ['download', 'spm-build']);
42+
};

‎mergely/dist/mergely-debug.css

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*! define gallery/mergely/2.5.0/mergely-debug.css */
2+
/* required */
3+
.mergely-column textarea { width: 80px; height: 200px; }
4+
.mergely-column { float: left; }
5+
.mergely-margin { float: left; }
6+
.mergely-canvas { float: left; width: 28px; }
7+
8+
/* resizeable */
9+
.mergely-resizer { width: 100%; height: 100%; }
10+
11+
/* style configuration */
12+
.mergely-column { border: 1px solid #ccc; }
13+
.mergely-active { border: 1px solid #a3d1ff; }
14+
15+
.mergely.a.rhs.start { border-top: 1px solid #a3d1ff; }
16+
.mergely.a.lhs.start.end,
17+
.mergely.a.rhs.end { border-bottom: 1px solid #a3d1ff; }
18+
.mergely.a.rhs { background-color: #ddeeff; }
19+
.mergely.a.lhs.start.end.first { border-bottom: 0; border-top: 1px solid #a3d1ff; }
20+
21+
.mergely.d.lhs { background-color: #edc0c0; }
22+
.mergely.d.lhs.end,
23+
.mergely.d.rhs.start.end { border-bottom: 1px solid #ff7f7f; }
24+
.mergely.d.rhs.start.end.first { border-bottom: 0; border-top: 1px solid #ff7f7f; }
25+
.mergely.d.lhs.start { border-top: 1px solid #ff7f7f; }
26+
27+
.mergely.c.lhs,
28+
.mergely.c.rhs { background-color: #fafafa; }
29+
.mergely.c.lhs.start,
30+
.mergely.c.rhs.start { border-top: 1px solid #a3a3a3; }
31+
.mergely.c.lhs.end,
32+
.mergely.c.rhs.end { border-bottom: 1px solid #a3a3a3; }
33+
34+
.mergely.ch.a.rhs { background-color: #ddeeff; }
35+
.mergely.ch.d.lhs { background-color: #edc0c0; text-decoration: line-through; color: #888; }

‎mergely/dist/mergely-debug.js

+3,057
Large diffs are not rendered by default.

‎mergely/dist/mergely.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎mergely/dist/mergely.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*! define gallery/mergely/2.5.0/mergely-debug.css */
2+
/* required */
3+
.mergely-column textarea { width: 80px; height: 200px; }
4+
.mergely-column { float: left; }
5+
.mergely-margin { float: left; }
6+
.mergely-canvas { float: left; width: 28px; }
7+
8+
/* resizeable */
9+
.mergely-resizer { width: 100%; height: 100%; }
10+
11+
/* style configuration */
12+
.mergely-column { border: 1px solid #ccc; }
13+
.mergely-active { border: 1px solid #a3d1ff; }
14+
15+
.mergely.a.rhs.start { border-top: 1px solid #a3d1ff; }
16+
.mergely.a.lhs.start.end,
17+
.mergely.a.rhs.end { border-bottom: 1px solid #a3d1ff; }
18+
.mergely.a.rhs { background-color: #ddeeff; }
19+
.mergely.a.lhs.start.end.first { border-bottom: 0; border-top: 1px solid #a3d1ff; }
20+
21+
.mergely.d.lhs { background-color: #edc0c0; }
22+
.mergely.d.lhs.end,
23+
.mergely.d.rhs.start.end { border-bottom: 1px solid #ff7f7f; }
24+
.mergely.d.rhs.start.end.first { border-bottom: 0; border-top: 1px solid #ff7f7f; }
25+
.mergely.d.lhs.start { border-top: 1px solid #ff7f7f; }
26+
27+
.mergely.c.lhs,
28+
.mergely.c.rhs { background-color: #fafafa; }
29+
.mergely.c.lhs.start,
30+
.mergely.c.rhs.start { border-top: 1px solid #a3a3a3; }
31+
.mergely.c.lhs.end,
32+
.mergely.c.rhs.end { border-bottom: 1px solid #a3a3a3; }
33+
34+
.mergely.ch.a.rhs { background-color: #ddeeff; }
35+
.mergely.ch.d.lhs { background-color: #edc0c0; text-decoration: line-through; color: #888; }

‎mergely/gallery/mergely/2.5.0/mergely-debug.js

+3,057
Large diffs are not rendered by default.

‎mergely/gallery/mergely/2.5.0/mergely.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎mergely/gallery/mergely/2.5.0/mergely.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎mergely/mergely.zip

44 KB
Binary file not shown.

‎mergely/package.json

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"family": "gallery",
3+
"name": "mergely",
4+
"version": "2.5.0",
5+
"title": "Mergely",
6+
"description": "Mergely is a powerful online web application for viewing and merging changes between documents online. It is a pure-Javascript library that can be used to enhance your online CMS system. Mergely is open source and also available for commerical use.",
7+
"docs": "http://www.mergely.com/doc",
8+
"homepage": "http://www.mergely.com/",
9+
"demo": "http://www.mergely.com/",
10+
"author": {
11+
"name" : "http://www.mergely.com/",
12+
"url" : "http://www.mergely.com/"
13+
},
14+
"keywords": [
15+
"edit code"
16+
],
17+
"licenses": "https://github.com/wickedest/Mergely/blob/master/LICENSE.html",
18+
"dependencies": {
19+
"jquery": "*"
20+
},
21+
"repository": {
22+
"type": "git",
23+
"url": "git://github.com/marijnh/CodeMirror.git"
24+
},
25+
"spm": {
26+
"alias": {
27+
"$": "$",
28+
"codemirrorjs": "gallery/codemirror/3.1.0/codemirror.js",
29+
"codemirrorcss": "gallery/codemirror/3.1.0/codemirror.css"
30+
},
31+
"output": [
32+
"mergely.js",
33+
"mergely.css"
34+
]
35+
}
36+
}

‎moment/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,25 @@ grunt # this runs tests and jshint
4747
Changelog
4848
=========
4949

50+
### 2.6.0 [See changelog](https://gist.github.com/ichernev/10544682)
51+
52+
* languages
53+
* [#1529] Serbian-Cyrillic (sr-cyr)
54+
* [#1544], [#1546] Khmer Cambodia (km)
55+
56+
* features
57+
* [#1419](https://github.com/moment/moment/issues/1419), [#1468](https://github.com/moment/moment/issues/1468), [#1467](https://github.com/moment/moment/issues/1467), [#1546](https://github.com/moment/moment/issues/1546) better handling of timezone-d moments around DST
58+
* [#1462](https://github.com/moment/moment/issues/1462) add weeksInYear and isoWeeksInYear
59+
* [#1475](https://github.com/moment/moment/issues/1475) support ordinal parsing
60+
* [#1499](https://github.com/moment/moment/issues/1499) composer support
61+
* [#1577](https://github.com/moment/moment/issues/1577), [#1604](https://github.com/moment/moment/issues/1604) put Date parsing in moment.createFromInputFallback so it can be properly deprecated and controlled in the future
62+
* [#1545](https://github.com/moment/moment/issues/1545) extract two-digit year parsing in moment.parseTwoDigitYear, so it can be overwritten
63+
* [#1590](https://github.com/moment/moment/issues/1590) (see [#1574](https://github.com/moment/moment/issues/1574)) set AMD global before module definition to better support non AMD module dependencies used in AMD environment
64+
* [#1589](https://github.com/moment/moment/issues/1589) remove global in Node.JS environment (was not working before, nobody complained, was scheduled for removal anyway)
65+
* [#1586](https://github.com/moment/moment/issues/1586) support quarter setting and parsing
66+
67+
* 18 bugs fixed
68+
5069
### 2.5.1
5170

5271
* languages

‎spin/dist/spin-debug.js

+8-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
define("gallery/spin/1.3.3/spin-debug", [], function(require, exports, module) {
1+
define("gallery/spin/2.0.0/spin-debug", [], function(require, exports, module) {
22
/**
3-
* Copyright (c) 2011-2013 Felix Gnass
3+
* Copyright (c) 2011-2014 Felix Gnass
44
* Licensed under the MIT license
55
*/
66
(function(root, factory) {
@@ -125,15 +125,14 @@ define("gallery/spin/1.3.3/spin-debug", [], function(require, exports, module) {
125125
// Use a high z-index by default
126126
className: "spinner",
127127
// CSS class to assign to the element
128-
top: "auto",
128+
top: "50%",
129129
// center vertically
130-
left: "auto",
130+
left: "50%",
131131
// center horizontally
132-
position: "relative"
132+
position: "absolute"
133133
};
134134
/** The constructor */
135135
function Spinner(o) {
136-
if (typeof this == "undefined") return new Spinner(o);
137136
this.opts = merge(o || {}, Spinner.defaults, defaults);
138137
}
139138
// Global defaults that override the built-ins:
@@ -152,15 +151,12 @@ define("gallery/spin/1.3.3/spin-debug", [], function(require, exports, module) {
152151
position: o.position,
153152
width: 0,
154153
zIndex: o.zIndex
155-
}), mid = o.radius + o.length + o.width, ep, tp;
156-
// target position
154+
}), mid = o.radius + o.length + o.width;
157155
if (target) {
158156
target.insertBefore(el, target.firstChild || null);
159-
tp = pos(target);
160-
ep = pos(el);
161157
css(el, {
162-
left: (o.left == "auto" ? tp.x - ep.x + (target.offsetWidth >> 1) : parseInt(o.left, 10) + mid) + "px",
163-
top: (o.top == "auto" ? tp.y - ep.y + (target.offsetHeight >> 1) : parseInt(o.top, 10) + mid) + "px"
158+
left: o.left,
159+
top: o.top
164160
});
165161
}
166162
el.setAttribute("role", "progressbar");

‎spin/dist/spin.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎spin/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "spin",
33
"family": "gallery",
44
"description": "An animated CSS3 loading spinner with VML fallback for IE.",
5-
"version": "1.3.3",
5+
"version": "2.0.0",
66
"main": "spin.js",
77
"homepage": "http://fgnass.github.io/spin.js/",
88
"directories": {

0 commit comments

Comments
 (0)
Please sign in to comment.