Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Commit

Permalink
feat(build): Replace regard with contrib-watch
Browse files Browse the repository at this point in the history
  • Loading branch information
passy committed May 21, 2013
1 parent da89e70 commit edf0056
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions templates/common/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({ port: LIVERELOAD_PORT });
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
Expand All @@ -21,6 +22,9 @@ module.exports = function (grunt) {
grunt.initConfig({
yeoman: yeomanConfig,
watch: {
options: {
nospawn: true
},
coffee: {
files: ['<%%= yeoman.app %>/scripts/{,*/}*.coffee'],
tasks: ['coffee:dist']
Expand All @@ -34,13 +38,15 @@ module.exports = function (grunt) {
tasks: ['compass']
},
livereload: {
options: {
livereload: LIVERELOAD_PORT
},
files: [
'<%%= yeoman.app %>/{,*/}*.html',
'{.tmp,<%%= yeoman.app %>}/styles/{,*/}*.css',
'{.tmp,<%%= yeoman.app %>}/scripts/{,*/}*.js',
'<%%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
],
tasks: ['livereload']
]
}
},
connect: {
Expand Down Expand Up @@ -260,13 +266,10 @@ module.exports = function (grunt) {
}
});

grunt.renameTask('regarde', 'watch');

grunt.registerTask('server', [
'clean:server',
'coffee:dist',
'compass:server',
'livereload-start',
'connect:livereload',
'open',
'watch'
Expand Down
4 changes: 2 additions & 2 deletions templates/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"grunt-contrib-clean": "~0.4.1",
"grunt-contrib-htmlmin": "~0.1.3",
"grunt-contrib-imagemin": "~0.1.4",
"grunt-contrib-livereload": "~0.1.2",
"grunt-contrib-watch": "~0.4.0",
"grunt-bower-requirejs": "~0.4.2",
"grunt-usemin": "~0.1.11",
"grunt-regarde": "~0.1.1",
"grunt-rev": "~0.1.0",
"grunt-karma": "~0.4.3",
"grunt-open": "~0.2.0",
"matchdep": "~0.1.2",
"connect-livereload": "~0.1.0",
"grunt-google-cdn": "~0.1.2",
"grunt-ngmin": "~0.0.2"
},
Expand Down

0 comments on commit edf0056

Please sign in to comment.