| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- module.exports = function( grunt ) {
- grunt.initConfig({
- component_build: {
- dev: {
- output: './dist/',
- name: 'seed',
- dev: true,
- sourceUrls: true,
- styles: false,
- verbose: true
- },
- build: {
- output: './dist/',
- name: 'seed',
- styles: false
- }
- },
- jshint: {
- build: {
- src: ['src/**/*.js'],
- options: {
- jshintrc: "./.jshintrc"
- }
- }
- },
- mocha: {
- build: {
- src: ['test/test.html'],
- options: {
- reporter: 'Spec',
- run: true
- }
- }
- },
- uglify: {
- build: {
- options: {
- compress: true,
- mangle: true
- },
- files: {
- 'dist/seed.min.js': 'dist/seed.js'
- }
- }
- },
- watch: {
- options: {
- livereload: true
- },
- component: {
- files: ['src/**/*.js', 'component.json'],
- tasks: 'component_build:dev'
- }
- }
- })
- grunt.loadNpmTasks( 'grunt-contrib-watch' )
- grunt.loadNpmTasks( 'grunt-contrib-jshint' )
- grunt.loadNpmTasks( 'grunt-contrib-uglify' )
- grunt.loadNpmTasks( 'grunt-component-build' )
- grunt.loadNpmTasks( 'grunt-mocha' )
- grunt.registerTask( 'test', ['mocha'] )
- grunt.registerTask( 'default', ['jshint', 'component_build:build', 'uglify'] )
-
- }
|