FS-8009 #resolve Create a grunt project with livereload support. From now on, use npm install && grunt serve to develop on this project.
This commit is contained in:
parent
7303631fbc
commit
be73c4f1e6
|
@ -0,0 +1,60 @@
|
|||
/*jslint node: true */
|
||||
'use strict';
|
||||
|
||||
var pkg = require('./package.json');
|
||||
|
||||
module.exports = function (grunt) {
|
||||
|
||||
// load all grunt tasks
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
watch: {
|
||||
js: {
|
||||
files: ['js/{,*/}*.js'],
|
||||
tasks: ['newer:jshint:all'],
|
||||
options: {
|
||||
livereload: true
|
||||
}
|
||||
},
|
||||
gruntfile: {
|
||||
files: ['Gruntfile.js']
|
||||
},
|
||||
livereload: {
|
||||
options: {
|
||||
livereload: true
|
||||
},
|
||||
files: [
|
||||
'partials/{,*/}*.html',
|
||||
'js/{,*/}*.js',
|
||||
'images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
|
||||
]
|
||||
}
|
||||
},
|
||||
connect: {
|
||||
options: {
|
||||
port: 9001,
|
||||
// Change this to '0.0.0.0' to access the server from outside.
|
||||
hostname: 'localhost',
|
||||
livereload: 35729
|
||||
},
|
||||
livereload: {
|
||||
options: {
|
||||
open: false,
|
||||
middleware: function (connect) {
|
||||
return [
|
||||
connect().use(
|
||||
'/js/src',
|
||||
connect.static('../js/src')
|
||||
),
|
||||
connect.static('.')
|
||||
];
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
grunt.registerTask('serve', ['connect:livereload', 'watch']);
|
||||
};
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "verto_communicator",
|
||||
"version": "0.0.1",
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-contrib-connect": "^0.9.0",
|
||||
"grunt-contrib-jshint": "~0.10.0",
|
||||
"grunt-contrib-watch": "^0.6.1",
|
||||
"load-grunt-tasks": "^3.2.0"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue