You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.1 KiB
53 lines
1.1 KiB
module.exports = function(grunt) {
|
|
|
|
grunt.initConfig({
|
|
pkg: grunt.file.readJSON('package.json'),
|
|
connect: {
|
|
server: {
|
|
options: {
|
|
hostname: 'localhost',
|
|
base: 'prod/',
|
|
port: 9001,
|
|
keepalive: true
|
|
}
|
|
}
|
|
},
|
|
instrument: {
|
|
files: 'prod/js/main.js',
|
|
options: {
|
|
basePath: 'prod/js/instrumented/',
|
|
flatten: true
|
|
}
|
|
},
|
|
clean: {
|
|
dev: ['prod/']
|
|
},
|
|
copy: {
|
|
dev: {
|
|
files: [{
|
|
expand: true,
|
|
cwd: 'src/',
|
|
src: ['**/*.*'],
|
|
dest: 'prod/'
|
|
}]
|
|
}
|
|
},
|
|
makeReport: {
|
|
src: 'coverage/coverage.json',
|
|
options: {
|
|
type: 'lcov',
|
|
dir: 'coverage'
|
|
}
|
|
}
|
|
});
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
|
grunt.loadNpmTasks('grunt-contrib-connect');
|
|
grunt.loadNpmTasks('grunt-istanbul');
|
|
|
|
grunt.registerTask('server', ['connect']);
|
|
grunt.registerTask('dev', ['clean','copy','instrument']);
|
|
grunt.registerTask('report', ['makeReport']);
|
|
// Need jasmine-node at global level
|
|
}; |