Browse Source

add monitoring to Gruntfile. updates README

generic-ui
Matias Alejo Garcia 11 years ago
parent
commit
ec3f05cb75
  1. 33
      Gruntfile.js
  2. 12
      README.md
  3. 2
      package.json

33
Gruntfile.js

@ -3,23 +3,16 @@
module.exports = function(grunt) { module.exports = function(grunt) {
//Load NPM tasks //Load NPM tasks
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-css'); grunt.loadNpmTasks('grunt-css');
grunt.loadNpmTasks('grunt-markdown'); grunt.loadNpmTasks('grunt-markdown');
grunt.loadNpmTasks('grunt-macreload');
// Project Configuration // Project Configuration
grunt.initConfig({ grunt.initConfig({
pkg: grunt.file.readJSON('package.json'), pkg: grunt.file.readJSON('package.json'),
jshint: {
all: {
src: ['Gruntfile.js', 'public/src/js/**/*.js'],
options: {
jshintrc: true
}
}
},
concat: { concat: {
options: { options: {
process: function(src, filepath) { process: function(src, filepath) {
@ -83,15 +76,33 @@ module.exports = function(grunt) {
} }
] ]
} }
},
macreload: {
chrome: {
browser: 'chrome',
editor: 'macvim'
} }
},
watch: {
main: {
files: ['public/src/js/**/*.js'],
tasks: ['concat:main', 'uglify:main', 'macreload'],
},
css: {
files: ['public/src/css/**/*.css'],
tasks: ['concat:css', 'cssmin', 'macreload'],
},
},
}); });
//Making grunt default to force in order not to break the project. //Making grunt default to force in order not to break the project.
grunt.option('force', true); grunt.option('force', true);
//Default task(s). //Default task(s).
grunt.registerTask('default', ['jshint']); grunt.registerTask('default', ['watch']);
//Compile task (concat + minify) //Compile task (concat + minify)
grunt.registerTask('compile', ['concat', 'uglify', 'cssmin']); grunt.registerTask('compile', ['concat', 'uglify', 'cssmin', 'macreload']);
}; };

12
README.md

@ -59,10 +59,20 @@ To compile and minify the web application's assets:
```$ grunt compile``` ```$ grunt compile```
There is a convinent Gruntfile.js for automation during editing the code
```$ grunt```
and if you are develping the API also, run:
```INSIGHT_PUBLIC_PATH=../insight/public grunt```
**also** in the insight-api path. (So you will have to grunt process running, one for insight and one for insight-api).
## Note ## Note
For more details about the *insight API* configs and end-poinst, just go to [insight API github repository](https://github.com/bitpay/insight-api) or read the [documentation](https://github.com/bitpay/insight-api/blob/master/README.md) For more details about the *insight API* configs and end-point, just go to [insight API github repository](https://github.com/bitpay/insight-api) or read the [documentation](https://github.com/bitpay/insight-api/blob/master/README.md)
## Contribute ## Contribute

2
package.json

@ -56,6 +56,8 @@
"grunt-contrib-jshint": "~0.8.0", "grunt-contrib-jshint": "~0.8.0",
"grunt-contrib-concat": "~0.3.0", "grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.3.2", "grunt-contrib-uglify": "~0.3.2",
"grunt-contrib-watch": "*",
"grunt-macreload": "*",
"grunt-css": "~0.5.4", "grunt-css": "~0.5.4",
"grunt-markdown": "~0.5.0" "grunt-markdown": "~0.5.0"
} }

Loading…
Cancel
Save