Skip to content

Commit

Permalink
Add grunt watch
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed Apr 22, 2015
1 parent 5a446ef commit fccb6d0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
16 changes: 15 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,19 @@ module.exports = function(grunt) {
options: {
command: 'node_modules/.bin/grunt'
}
},

watch: {
src: {
files: ['src/**/*', 'test/**/*', 'examples/**/*'],
tasks: ['build']
},
options: {
spawn: false,

// Use browser extensions of LiveReload
livereload: true
}
}
});

Expand All @@ -125,12 +138,13 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-csscomb');
grunt.loadNpmTasks('grunt-githooks');
grunt.loadNpmTasks('grunt-jscs');

// Tasks.
// Tasks
grunt.registerTask('lint', ['jshint', 'jscs']);
grunt.registerTask('test', ['connect', 'lint', 'qunit']);
grunt.registerTask('build', ['concat', 'autoprefixer', 'csscomb', 'uglify', 'githooks']);
Expand Down
4 changes: 2 additions & 2 deletions examples/index-zepto.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>Remodal example</title>
<meta name="description" content="Remodal example">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../src/jquery.remodal.css">
<link rel="stylesheet" href="../dist/jquery.remodal.css">
</head>
<body>
<div class="remodal-bg">
Expand Down Expand Up @@ -118,7 +118,7 @@ <h1>Another one window</h1>
</script>

<script src="../libs/zepto/zepto.min.js"></script>
<script src="../src/jquery.remodal.js"></script>
<script src="../dist/jquery.remodal.js"></script>

<!-- Events -->
<script>
Expand Down
4 changes: 2 additions & 2 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>Remodal example</title>
<meta name="description" content="Remodal example">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../src/jquery.remodal.css">
<link rel="stylesheet" href="../dist/jquery.remodal.css">
</head>
<body>
<div class="remodal-bg">
Expand Down Expand Up @@ -119,7 +119,7 @@ <h1>Another one window</h1>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="../libs/jquery/dist/jquery.min.js"><\/script>')</script>
<script src="../src/jquery.remodal.js"></script>
<script src="../dist/jquery.remodal.js"></script>

<!-- Events -->
<script>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"grunt-contrib-jshint": "^0.11.1",
"grunt-contrib-qunit": "^0.7.0",
"grunt-contrib-uglify": "^0.8.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-csscomb": "^3.0.0",
"grunt-githooks": "^0.3.1",
"grunt-jscs": "^1.6.0"
Expand Down

0 comments on commit fccb6d0

Please sign in to comment.