vue2/Gruntfile.js

72 lines
1.7 KiB
JavaScript
Raw Normal View History

2013-07-28 05:04:21 +08:00
module.exports = function( grunt ) {
grunt.initConfig({
component_build: {
dev: {
2013-07-28 05:04:21 +08:00
output: './dist/',
2013-07-29 00:35:03 +08:00
name: 'seed',
2013-08-08 03:44:07 +08:00
dev: true,
sourceUrls: true,
2013-07-28 05:04:21 +08:00
styles: false,
verbose: true
},
build: {
output: './dist/',
name: 'seed',
styles: false
2013-07-28 05:04:21 +08:00
}
},
jshint: {
build: {
src: ['src/**/*.js'],
options: {
jshintrc: "./.jshintrc"
}
}
},
mocha: {
build: {
src: ['test/test.html'],
options: {
reporter: 'Spec',
run: true
}
}
},
2013-08-08 03:44:07 +08:00
uglify: {
build: {
options: {
compress: true,
mangle: true
},
files: {
'dist/seed.min.js': 'dist/seed.js'
}
}
},
2013-07-28 05:04:21 +08:00
watch: {
2013-07-29 11:23:56 +08:00
options: {
livereload: true
},
2013-07-28 05:04:21 +08:00
component: {
files: ['src/**/*.js', 'component.json'],
tasks: 'component_build:dev'
2013-07-28 05:04:21 +08:00
}
}
})
grunt.loadNpmTasks( 'grunt-contrib-watch' )
grunt.loadNpmTasks( 'grunt-contrib-jshint' )
2013-08-08 03:44:07 +08:00
grunt.loadNpmTasks( 'grunt-contrib-uglify' )
2013-07-28 05:04:21 +08:00
grunt.loadNpmTasks( 'grunt-component-build' )
grunt.loadNpmTasks( 'grunt-mocha' )
grunt.registerTask( 'test', ['mocha'] )
grunt.registerTask( 'default', ['jshint', 'component_build:build', 'uglify'] )
2013-07-28 05:04:21 +08:00
}