File tree Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Original file line number Diff line number Diff line change
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 += '\n});'
16
+ return code
17
+ }
18
+ } ,
19
+ url : 'https://raw.github.com/sakabako/scrollMonitor/<%= pkg.version %>/scrollMonitor.js' ,
20
+ name : 'scrollmonitor.js'
21
+ }
22
+ }
23
+ } ) ;
24
+
25
+ grunt . loadGlobalTasks ( 'spm-build' ) ;
26
+ grunt . util . _ . merge ( grunt . config . data , require ( 'spm-build' ) . config ) ;
27
+
28
+ grunt . loadTasks ( '../_tasks/download/tasks' ) ;
29
+ grunt . registerTask ( 'build' , [ 'download' , 'spm-build' ] ) ;
30
+ } ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " scrollmonitor" ,
3
- "root " : " gallery" ,
3
+ "family " : " gallery" ,
4
4
"version" : " 1.0.0" ,
5
5
"author" : " Stu Kabakoff <stukabakoff@gmail.com>" ,
6
6
"homepage" : " https://github.com/sakabako/scrollMonitor" ,
23
23
" scroll" ,
24
24
" dom"
25
25
],
26
- "output " : {
27
- "scrollmonitor.js " : " . "
26
+ "spm " : {
27
+ "output " : [ " scrollmonitor.js " ]
28
28
}
29
29
}
You can’t perform that action at this time.
0 commit comments