1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- module.exports = function(grunt) {
- grunt.initConfig({
- pkg: grunt.file.readJSON('package.json'),
- jshint: {
- files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
- options: {
- globals: {
- jQuery: true
- }
- }
- },
- watch: {
- files: ['<%= jshint.files %>'],
- tasks: ['jshint']
- },
- concat: {
- options: {
-
- separator: ';'
- },
- dist: {
-
- src: ['src/**/*.js'],
-
- dest: 'dist/<%= pkg.name %>.js'
- }
- },
- uglify: {
- options: {
-
- banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
- },
- dist: {
- files: {
- 'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
- }
- }
- },
- qunit: {
- files: ['test/**/*.html']
- },
- wiredep: {
- task: {
-
-
- src: [
- 'app/*.html',
- 'app/views/**/*.html',
- 'app/views/**/*.jade',
- 'app/styles/main.scss',
- 'app/config.yml'
- ],
- options: {
-
-
-
- }
- }
- },
- serve: {
- options: {
- port: 8000,
- }
- }
- });
- grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.loadNpmTasks('grunt-contrib-jshint');
- grunt.loadNpmTasks('grunt-contrib-qunit');
- grunt.loadNpmTasks('grunt-contrib-watch');
- grunt.loadNpmTasks('grunt-contrib-concat');
- grunt.loadNpmTasks('grunt-wiredep');
- grunt.loadNpmTasks('grunt-serve');
-
- grunt.registerTask('test', ['jshint', 'qunit']);
-
- grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'wiredep']);
- };
|