Ítalo Rossi 4e79ac1363 Merge pull request #406 in FS/freeswitch from ~JMESQUITA/freeswitch:feature/FS-8013-user-bower-to-install-javacript-dependencies to master
* commit '22658c79459926590a6b041812a23137fbd8a7c1':
  FS-8013 #resolve Make use of bower to manage dependencies and use wiredep to inject them on the main index.html file.
2015-08-21 12:38:06 -05:00

69 lines
1.4 KiB
JavaScript

/*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: [
'index.html',
'partials/{,*/}*.html',
'js/{,*/}*.js',
'images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
]
}
},
wiredep: {
app: {
src: ['index.html'],
ignorePath: /\.\.\//
}
},
connect: {
options: {
port: 9001,
// Change this to '0.0.0.0' to access the server from outside.
hostname: 'localhost',
livereload: 35729,
protocol: 'https'
},
livereload: {
options: {
open: false,
middleware: function (connect) {
return [
connect().use(
'/js/src',
connect.static('../js/src')
),
connect.static('.')
];
}
}
},
},
});
grunt.registerTask('serve', ['wiredep', 'connect:livereload', 'watch']);
};