Permalink
Browse files

Better grunt tasks to open examples and tests

  • Loading branch information...
1 parent 8eb15f7 commit edb03c87e2b13b68d46645d61550addccfe8c825 Marlow Payne committed Mar 26, 2016
Showing with 20 additions and 3 deletions.
  1. +3 −1 Gruntfile.js
  2. +1 −1 README.md
  3. +12 −0 tasks/config/open.js
  4. +4 −1 tasks/config/watch.js
View
@@ -36,6 +36,7 @@ module.exports = function(grunt) {
'grunt-contrib-watch',
'grunt-eslint',
'grunt-mocha-phantomjs',
+ 'grunt-open',
'grunt-sass',
'grunt-sass-lint',
'grunt-shell',
@@ -48,10 +49,11 @@ module.exports = function(grunt) {
}
});
+ grunt.registerTask('examples', ['build', 'connect:server', 'open:examples', 'watch']);
grunt.registerTask('serve', ['build', 'connect:server', 'watch']);
grunt.registerTask('build', ['sasslint', 'lint:prod', 'copy', 'uglify', 'version:all', 'sass', 'autoprefixer']);
grunt.registerTask('release', ['test', 'shell:tagRelease']);
grunt.registerTask('test', ['build', 'connect:test', 'mocha_phantomjs']);
- grunt.registerTask('test:browser', ['build', 'connect:test:keepalive']);
+ grunt.registerTask('test:browser', ['build', 'open:tests', 'connect:test:keepalive']);
grunt.registerTask('default', 'build');
};
View
@@ -9,7 +9,7 @@ A mobile-first accordion UI module for progressive disclosure on the web.
## Demo
-You can find a simple demo on [the Documentation page](http://mobify.github.io/bellows). More demos can be found inside the `examples` folder in the repo.
+You can find a simple demo on [the Documentation page](http://mobify.github.io/bellows). More demos can be found inside the `examples` folder in the repo. Run `grunt examples` to see them in Chrome (mobile device emulation is recommended).
## Requirements
View
@@ -0,0 +1,12 @@
+module.exports = function(grunt) {
+ return {
+ examples: {
+ path: 'http://localhost:3000/examples',
+ app: 'Google Chrome'
+ },
+ tests: {
+ path: 'http://localhost:8888/tests/runner',
+ app: 'Google Chrome'
+ }
+ };
+};
@@ -1,6 +1,9 @@
module.exports = function(grunt) {
return {
- files: ["src/**/*"],
+ files: [
+ 'src/**/*',
+ 'examples/**/*'
+ ],
tasks: ['build']
};
};

0 comments on commit edb03c8

Please sign in to comment.