Skip to content

Commit 9d7a8db

Browse files
committedJan 3, 2018
升级npm,去除不必要的组件
1 parent 6a647dd commit 9d7a8db

File tree

226 files changed

+153
-185406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+153
-185406
lines changed
 

‎Gruntfile.coffee

+36-52
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ module.exports = (grunt) ->
55
grunt.initConfig
66
pkg: pkg
77
clean:
8-
build: ["dest/work", "dist"]
9-
workTemp: ["dest/work/cola"]
10-
dev: ["dest/dev"]
11-
"core-widget": ["dist/cola-widget.js"]
8+
build: [ "dest/work", "dist" ]
9+
workTemp: [ "dest/work/cola" ]
10+
dev: [ "dest/dev" ]
11+
"core-widget": [ "dist/cola-widget.js" ]
1212
coffee:
1313
dev:
1414
options:
@@ -64,34 +64,21 @@ module.exports = (grunt) ->
6464
libs:
6565
expand: true
6666
cwd: "src"
67-
src: ["lib/**"]
67+
src: [ "lib/**" ]
6868
dest: "dest/dev"
6969

7070
semantic:
7171
expand: true
7272
cwd: "src/lib/semantic-ui"
73-
src: ["themes/**", "semantic.css", "semantic.js"]
73+
src: [ "themes/**", "semantic.css", "semantic.js" ]
7474
dest: "dist"
7575

7676
apiResources:
7777
expand: true
7878
cwd: "node_modules/grunt-cola-ui-build"
79-
src: ["resources/**"]
79+
src: [ "resources/**" ]
8080
dest: "api"
8181

82-
mochaTest:
83-
test:
84-
options:
85-
mocha:
86-
ui: "qunit"
87-
reporter: "spec"
88-
src: ["test/mocha/*.js"]
89-
qunit:
90-
all:
91-
options:
92-
urls: [
93-
"http://localhost:9001/test/qunit/all.html"
94-
]
9582
uglify:
9683
options:
9784
expand: true
@@ -111,24 +98,19 @@ module.exports = (grunt) ->
11198
files: [
11299
expand: true
113100
cwd: "src"
114-
src: ["**/*.yaml"]
101+
src: [ "**/*.yaml" ]
115102
dest: "api"
116103
]
117104
watch:
118105
coffee:
119-
files: ["src/**/*.coffee"]
106+
files: [ "src/**/*.coffee" ]
120107
tasks: "coffee:dev"
121108
less:
122-
files: ["src/**/*.less"]
109+
files: [ "src/**/*.less" ]
123110
tasks: "less:dev"
124111
libs:
125-
files: ["src/lib/**"]
112+
files: [ "src/lib/**" ]
126113
tasks: "copy:libs"
127-
connect:
128-
testServer:
129-
options:
130-
port: 9001
131-
base: "."
132114
yamlToDoc:
133115
api:
134116
options:
@@ -138,7 +120,7 @@ module.exports = (grunt) ->
138120
{
139121
expand: true
140122
cwd: "src"
141-
src: ["**/*.yaml"]
123+
src: [ "**/*.yaml" ]
142124
dest: "api"
143125
}
144126
]
@@ -153,7 +135,7 @@ module.exports = (grunt) ->
153135
"cola-ui-license":
154136
options:
155137
license: """
156-
/*! Colla - #{pkg.version}
138+
/*! Cola - #{pkg.version}
157139
* Copyright (C) 2015-2017 Benny Bao & Alex Tong.
158140
* Licensed under the MIT license */
159141
@@ -172,18 +154,18 @@ module.exports = (grunt) ->
172154
"dist/3rd.js": sources.lib.js
173155
cola:
174156
files:
175-
"dist/cola.js": ["dist/cola-core.js", "dist/cola-widget.js"]
157+
"dist/cola.js": [ "dist/cola-core.js", "dist/cola-widget.js" ]
176158
all:
177159
files:
178-
"dist/all/javascript.js": ["dist/3rd.js", "dist/semantic.js", "dist/cola.js"]
179-
"dist/all/css.js": ["dist/semantic.css", "dist/cola.css"]
160+
"dist/all/javascript.js": [ "dist/3rd.js", "dist/semantic.js", "dist/cola.js" ]
161+
"dist/all/css.js": [ "dist/semantic.css", "dist/cola.css" ]
180162
cssmin:
181163
target:
182164
files: [
183165
{
184166
expand: true
185167
cwd: "dist"
186-
src: ["cola.css", "semantic.css"]
168+
src: [ "cola.css", "semantic.css" ]
187169
dest: "dist"
188170
ext: ".min.css"
189171
}
@@ -226,34 +208,36 @@ module.exports = (grunt) ->
226208

227209
grunt.loadNpmTasks "grunt-contrib-coffee"
228210
grunt.loadNpmTasks "grunt-contrib-less"
229-
grunt.loadNpmTasks "grunt-mocha-test"
230-
grunt.loadNpmTasks "grunt-contrib-qunit"
231211
grunt.loadNpmTasks "grunt-contrib-uglify"
232212
grunt.loadNpmTasks "grunt-yaml"
233213
grunt.loadNpmTasks "grunt-contrib-watch"
234214
grunt.loadNpmTasks "grunt-contrib-copy"
235215
grunt.loadNpmTasks "grunt-contrib-clean"
236-
grunt.loadNpmTasks "grunt-contrib-connect"
237216
grunt.loadNpmTasks "grunt-cola-ui-build"
238217
grunt.loadNpmTasks "grunt-contrib-concat"
239218
grunt.loadNpmTasks "grunt-contrib-rename"
240219
grunt.loadNpmTasks "grunt-contrib-cssmin"
241220
grunt.loadNpmTasks "grunt-contrib-compress"
242221

243-
grunt.registerTask "mochaTask", ["mochaTest"]
244-
grunt.registerTask "qunitTask", ["connect:testServer", "qunit"]
245-
grunt.registerTask "test", ["mochaTask", "qunitTask"]
246-
247-
grunt.registerTask "compile", ["clean:dev", "coffee:dev", "less:dev", "copy:libs"]
248-
grunt.registerTask "api", ["yamlToDoc", "copy:apiResources"]
249-
grunt.registerTask "all", ["clean", "coffee", "less", "mochaTest", "uglify", "copy"]
250-
grunt.registerTask "w", ["watch"]
251-
grunt.registerTask "build", ["clean:build", "cola-ui-clean", "coffee:cola-core", "coffee:cola-widget",
222+
grunt.registerTask "compile", [ "clean:dev", "coffee:dev", "less:dev", "copy:libs" ]
223+
grunt.registerTask "api", [ "yamlToDoc", "copy:apiResources" ]
224+
grunt.registerTask "all", [ "clean", "coffee", "less", "uglify", "copy" ]
225+
grunt.registerTask "w", [ "watch" ]
226+
grunt.registerTask "build", [
227+
"clean:build",
228+
"cola-ui-clean",
229+
"coffee:cola-core",
230+
"coffee:cola-widget",
252231
"coffee:i18n",
253-
"less:build", "cola-ui-license", "concat:3rd-core", "concat:3rd", "concat:cola",
254-
"clean:core-widget", "copy:semantic",
232+
"less:build",
233+
"cola-ui-license",
234+
"concat:3rd-core",
235+
"concat:3rd",
236+
"concat:cola",
237+
"clean:core-widget",
238+
"copy:semantic",
255239
"uglify:build",
256240
"cssmin",
257-
# "compress",
258-
"clean:workTemp"]
259-
grunt.registerTask "concat-all", ["build", "concat:all"]
241+
#"compress",
242+
"clean:workTemp" ]
243+
grunt.registerTask "concat-all", [ "build", "concat:all" ]

‎api/$.html

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)