Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98341353
Gruntfile.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jan 12, 06:47
Size
3 KB
Mime Type
text/plain
Expires
Tue, Jan 14, 06:47 (1 d, 14 h)
Engine
blob
Format
Raw Data
Handle
23504701
Attached To
R2664 SHRINE MedCo Fork
Gruntfile.js
View Options
module
.
exports
=
function
(
grunt
)
{
grunt
.
initConfig
({
stylus
:
{
compile
:
{
options
:
{
compress
:
false
},
files
:
{
'src/assets/css/app.css'
:
'src/assets/styl/app.styl'
}
},
connect
:
{
livereload
:
{
options
:
{
port
:
9000
,
hostname
:
'localhost'
,
middleware
:
function
(
connect
)
{
return
[
function
(
req
,
res
,
next
)
{
res
.
setHeader
(
'Access-Control-Allow-Origin'
,
'*'
);
res
.
setHeader
(
'Access-Control-Allow-Methods'
,
'GET,PUT,POST,DELETE'
);
res
.
setHeader
(
'Access-Control-Allow-Headers'
,
'Content-Type'
);
return
next
();
}
];
}
}
}
}
},
watch
:
{
stylus
:
{
files
:
[
'src/assets/styl/**.styl'
],
tasks
:
[
'stylus:compile'
]
},
css
:
{
options
:
{
livereload
:
true
},
files
:
[
'src/assets/css/**.css'
]
},
html
:
{
options
:
{
livereload
:
true
},
files
:
[
'*.html'
,
'src/app/**/*.html'
]
},
script
:
{
options
:
{
livereload
:
true
},
files
:
[
'src/app/**/*.js'
]
}
},
uglify
:
{
options
:
{
mangle
:
false
},
build
:
{
files
:
[{
expand
:
true
,
src
:
[
'src/app/**/*.js'
,
'!src/app/**/*.spec.js'
],
dest
:
'build/'
}]
}
},
copy
:
{
build
:
{
files
:
[
{
expand
:
true
,
src
:
[
'index.html'
,
'index-1.19.html'
],
dest
:
'build/'
},
{
expand
:
true
,
src
:
[
'config/*'
],
dest
:
'build/'
},
{
expand
:
true
,
src
:
[
'src/app/**/*'
,
"src/assets/**/*"
,
"src/vendor/**/*"
,
"!src/app/**/*.spec.js"
],
dest
:
'build/'
},
{
expand
:
true
,
src
:
[
'happy/**/*'
],
dest
:
'build/'
}
]
},
deploy
:
{
files
:
[
{
cwd
:
'build/'
,
src
:
[
'**/*'
],
dest
:
'../resources/client/'
,
expand
:
true
}
]
}
},
// Deletes all .js files
clean
:
{
options
:
{
force
:
true
},
js
:
[
"build/"
,
'../resources/client/*'
]
},
karma
:
{
options
:
{
// point all tasks to karma config file
configFile
:
'karma.conf.js'
},
unit
:
{
// run tests once instead of continuously
singleRun
:
true
}
}
});
grunt
.
loadNpmTasks
(
'grunt-contrib-stylus'
);
grunt
.
loadNpmTasks
(
'grunt-contrib-watch'
);
grunt
.
loadNpmTasks
(
'grunt-contrib-copy'
);
grunt
.
loadNpmTasks
(
'grunt-contrib-uglify'
);
grunt
.
loadNpmTasks
(
'grunt-contrib-clean'
);
grunt
.
loadNpmTasks
(
'grunt-karma'
);
grunt
.
registerTask
(
'test'
,
[
'karma'
]);
grunt
.
registerTask
(
'build'
,
[
'test'
,
'clean'
,
'copy:build'
,
'uglify:build'
]);
grunt
.
registerTask
(
'deploy'
,
[
'copy:deploy'
]);
grunt
.
registerTask
(
'default'
,
[
'clean'
,
'copy:build'
,
/*'uglify:build',*/
'copy:deploy'
]);
};
Event Timeline
Log In to Comment