1
- /*
2
- * monoco
3
- * A Model and a NoSQL Database for Components
4
- * http://monoco.io/
1
+ /*
2
+ * SyrupJS
3
+ * The System Runtime Platform
4
+ * http://syrupjs.systemdesigner.io
5
5
* @ecarriou
6
- *
7
- * Copyright (C) 2015 - Erwan Carriou
8
- *
9
- * This program is free software: you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation, either version 3 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
6
+ *
7
+ * Copyright (c) 2016 Erwan Carriou
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
21
26
*/
22
27
23
-
24
28
module . exports = function ( grunt ) {
25
29
grunt . initConfig ( {
26
30
pkg : grunt . file . readJSON ( 'package.json' ) ,
@@ -48,7 +52,7 @@ module.exports = function (grunt) {
48
52
files : [ 'build/system/*.js' , 'build/system/*.json' ]
49
53
} ,
50
54
yuidoc : {
51
- monoco : {
55
+ syrup : {
52
56
name : '<%= pkg.name %>' ,
53
57
description : '<%= pkg.description %>' ,
54
58
version : '<%= pkg.version %>' ,
@@ -79,43 +83,43 @@ module.exports = function (grunt) {
79
83
} ,
80
84
customReporters : [ ]
81
85
} ,
82
- monoco : {
86
+ syrup : {
83
87
specs : [
84
88
"test/module/**" ,
85
- "test/monoco /**"
89
+ "test/syrup /**"
86
90
]
87
91
}
88
92
} ,
89
93
karma : {
90
- monoco : {
94
+ syrup : {
91
95
configFile : 'karma.conf.js'
92
96
}
93
97
} ,
94
98
browserify : {
95
- monocoDebug : {
96
- src : [ 'src/monoco .js' ] ,
97
- dest : 'build/monoco .js' ,
99
+ syrupDebug : {
100
+ src : [ 'src/syrup .js' ] ,
101
+ dest : 'build/system-runtime .js' ,
98
102
options : {
99
103
browserifyOptions : {
100
- standalone : 'monoco ' ,
104
+ standalone : 'syrup ' ,
101
105
debug : true
102
106
}
103
107
}
104
108
} ,
105
- monoco : {
106
- src : [ 'src/monoco .js' ] ,
107
- dest : 'build/monoco .min.js' ,
109
+ syrup : {
110
+ src : [ 'src/syrup .js' ] ,
111
+ dest : 'build/system-runtime .min.js' ,
108
112
options : {
109
113
browserifyOptions : {
110
- standalone : 'monoco '
114
+ standalone : 'syrup '
111
115
}
112
116
}
113
117
}
114
118
} ,
115
119
uglify : {
116
120
dist : {
117
121
files : {
118
- 'build/<%= pkg.name %>.min.js' : [ '<%= browserify.monoco .dest %>' ]
122
+ 'build/<%= pkg.name %>.min.js' : [ '<%= browserify.syrup .dest %>' ]
119
123
}
120
124
}
121
125
} ,
@@ -140,7 +144,7 @@ module.exports = function (grunt) {
140
144
}
141
145
} ,
142
146
files : {
143
- 'build/monoco .json' : [ 'src/template/banner/system.txt' ]
147
+ 'build/syrup .json' : [ 'src/template/banner/system.txt' ]
144
148
}
145
149
} ,
146
150
systemBehaviors : {
@@ -173,7 +177,7 @@ module.exports = function (grunt) {
173
177
}
174
178
} ,
175
179
files : {
176
- 'build/monoco .json' : [ 'build/monoco .json' , 'src/system/behaviors/*/*.json' ]
180
+ 'build/syrup .json' : [ 'build/syrup .json' , 'src/system/behaviors/*/*.json' ]
177
181
}
178
182
} ,
179
183
systemSchemas : {
@@ -195,7 +199,7 @@ module.exports = function (grunt) {
195
199
}
196
200
} ,
197
201
files : {
198
- 'build/monoco .json' : [ 'build/monoco .json' , 'src/system/schemas/*.json' ]
202
+ 'build/syrup .json' : [ 'build/syrup .json' , 'src/system/schemas/*.json' ]
199
203
}
200
204
} ,
201
205
systemTypes : {
@@ -217,7 +221,7 @@ module.exports = function (grunt) {
217
221
}
218
222
} ,
219
223
files : {
220
- 'build/monoco .json' : [ 'build/monoco .json' , 'src/system/types/*.json' ]
224
+ 'build/syrup .json' : [ 'build/syrup .json' , 'src/system/types/*.json' ]
221
225
}
222
226
} ,
223
227
systemComponents : {
@@ -251,7 +255,7 @@ module.exports = function (grunt) {
251
255
}
252
256
} ,
253
257
files : {
254
- 'build/monoco .json' : [ 'build/monoco .json' , 'src/system/components/*/*.json' ]
258
+ 'build/syrup .json' : [ 'build/syrup .json' , 'src/system/components/*/*.json' ]
255
259
}
256
260
} ,
257
261
systemFill : {
@@ -266,15 +270,15 @@ module.exports = function (grunt) {
266
270
system . behaviors = grunt . option ( 'behaviors' ) ;
267
271
268
272
// process addon in order to insert subsytem
269
- system . components . MonocoSystem = { } ;
273
+ system . components . SyrupSystem = { } ;
270
274
271
275
grunt . file . recurse ( 'src/addons' , loadSubSystem ) ;
272
276
273
277
function loadSubSystem ( abspath , rootdir , subdir , filename ) {
274
278
if ( filename . indexOf ( '.' ) !== 0 ) {
275
279
var subSystem = grunt . file . readJSON ( abspath ) ;
276
280
277
- system . components . MonocoSystem [ subSystem . _id ] = {
281
+ system . components . SyrupSystem [ subSystem . _id ] = {
278
282
"_id" : subSystem . _id ,
279
283
"name" : subSystem . name ,
280
284
"version" : subSystem . version ,
@@ -289,23 +293,23 @@ module.exports = function (grunt) {
289
293
}
290
294
} ,
291
295
files : {
292
- 'build/monoco .json' : [ 'build/monoco .json' ]
296
+ 'build/syrup .json' : [ 'build/syrup .json' ]
293
297
}
294
298
} ,
295
299
systemModule : {
296
300
files : {
297
- 'build/system/system.js' : [ 'src/template/banner/systemmodule.txt' , 'build/monoco .json' , 'src/template/footer/systemmodule.txt' ]
301
+ 'build/system/system.js' : [ 'src/template/banner/systemmodule.txt' , 'build/syrup .json' , 'src/template/footer/systemmodule.txt' ]
298
302
}
299
303
} ,
300
304
licence : {
301
- src : [ 'src/template/banner/licence.txt' , 'build/monoco .min.js' ] ,
302
- dest : 'build/monoco .min.js'
305
+ src : [ 'src/template/banner/licence.txt' , 'build/system-runtime .min.js' ] ,
306
+ dest : 'build/system-runtime .min.js'
303
307
}
304
308
} ,
305
309
"merge-json" : {
306
- monoco : {
307
- src : [ "src/addons/*.json" , "build/monoco .json" ] ,
308
- dest : "build/monoco .json"
310
+ syrup : {
311
+ src : [ "src/addons/*.json" , "build/syrup .json" ] ,
312
+ dest : "build/syrup .json"
309
313
}
310
314
}
311
315
@@ -349,7 +353,7 @@ module.exports = function (grunt) {
349
353
350
354
// test task
351
355
grunt . registerTask ( 'test' , [
352
- 'jasmine_nodejs:monoco '
356
+ 'jasmine_nodejs:syrup '
353
357
] ) ;
354
358
355
359
// debug task
@@ -360,7 +364,7 @@ module.exports = function (grunt) {
360
364
'jsbeautifier' ,
361
365
'jshint' ,
362
366
'test' ,
363
- 'browserify:monocoDebug '
367
+ 'browserify:syrupDebug '
364
368
] ) ;
365
369
366
370
// build task
@@ -371,11 +375,11 @@ module.exports = function (grunt) {
371
375
'jsbeautifier' ,
372
376
'jshint' ,
373
377
'test' ,
374
- 'browserify:monocoDebug ' ,
375
- 'browserify:monoco ' ,
378
+ 'browserify:syrupDebug ' ,
379
+ 'browserify:syrup ' ,
376
380
'uglify' ,
377
381
'concat:licence' ,
378
- 'karma:monoco ' ,
382
+ 'karma:syrup ' ,
379
383
'yuidoc'
380
384
] ) ;
381
385
} ;
0 commit comments