js-scaffold/Gruntfile.js
Mark Moser cf0e086cc1 move to src dir with updated npm dependencies
upgraded package.json
moved the source files into /src and cleaned up Grunt.js pointers
2016-07-01 23:00:06 -05:00

80 lines
1.5 KiB
JavaScript

'use strict';
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
var site = {
source: 'src',
dest: 'dist',
temp: '.tmp',
};
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
all: site.source + '/**/*.js',
},
csslint: {
options: { csslintrc: '.csslintrc' },
check: {
src: site.source + '/**/*.css',
}
},
watch: {
options: {
interrupt: true,
livereload: true,
livereloadOnError: false
},
js: {
files: site.source + '/**/*.js',
tasks: ['jshint:all']
},
css: {
files: site.source + '/**/*.css',
tasks: ['csslint:check']
},
html: {
files: site.source + '/**/*.html',
},
configFiles: {
files: [ 'Gruntfile.js' ],
options: { reload: true }
}
},
connect: {
server: {
options: {
base: ['bower_components', site.source],
directory: site.source,
hostname: '*',
livereload: true,
open: {
appName: 'open',
target: 'http://localhost:3000',
},
port: 3000,
}
}
}
});
// Tasks
grunt.registerTask('serve', function () {
grunt.task.run([
'jshint:all',
'csslint:check',
'connect',
'watch'
]);
});
grunt.registerTask('default', ['serve']);
};