Skip to content

Commit 1dcb4de

Browse files
committed
Updated README.md
1 parent 1aef2a8 commit 1dcb4de

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
webapp-annotated-build-scaffolding
22
==================================
33

4-
[Grunt](http://gruntjs.com/) scaffolding to build [LESS](http://lesscss.org/), [SASS](http://sass-lang.com/), [JavaScript source maps](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/), [AMD](http://requirejs.org/docs/optimization.html) and [CommonJS](http://browserify.org/) for web apps based on annotated HTML. It is heavily inspired by [Yoeman](http://yeoman.io/)'s [generator-webapp](https://github.com/yeoman/generator-webapp). I really liked the concept of [grunt-usemin](https://github.com/yeoman/grunt-usemin), but I'm extremely obsessed with the exact things that I want. So I started building a scaffolding for myself.
4+
[Grunt](http://gruntjs.com/) scaffolding to build [LESS](http://lesscss.org/), [SASS](http://sass-lang.com/), [JavaScript source maps](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/), [AMD](http://requirejs.org/docs/optimization.html) and [CommonJS](http://wiki.commonjs.org/wiki/CommonJS) for web apps based on annotated HTML. It is heavily inspired by [Yoeman](http://yeoman.io/)'s [generator-webapp](https://github.com/yeoman/generator-webapp). I really liked the concept of [grunt-usemin](https://github.com/yeoman/grunt-usemin), but I'm extremely obsessed with the exact things that I want. So I started building a scaffolding for myself.
55

66
The purpose behind this scaffolding is similar to [generator-webapp](https://github.com/yeoman/generator-webapp). That is you can write HTML files, which link raw JavaScript and CSS files for development. Then you can use [Grunt](http://gruntjs.com/) to process the same HTML files to generate and minify JavaScript and CSS files that are linked. Finally, new HTML files will be generated to link these minified JavaScript and CSS files.
77

@@ -17,7 +17,7 @@ Key Features
1717
* [htmlrefs](https://github.com/tactivos/grunt-htmlrefs) is ran ahead of time, so you can perform even more magic.
1818
* Build AMD modules and dependencies with [RequireJS Optimizer](http://requirejs.org/docs/optimization.html).
1919
* Build CommonJS modules and dependencies with [Browserify](http://browserify.org/).
20-
* [grunt-contrib-watch](https://github.com/gruntjs/grunt-contrib-watch) integration such that CommonJS modules can be built whenever changes are saved. (Under development.)
20+
* [grunt-contrib-watch](https://github.com/gruntjs/grunt-contrib-watch) integration such that CommonJS modules can be built whenever changes are saved.
2121

2222
Samples
2323
-------
@@ -133,6 +133,13 @@ Now you can build your project with: `grunt dev`, `grunt qa` and `grunt prd`. He
133133
* `grunt qa` copies QA configs to `src` as well as `dist` direcotry. It then compiles, minifies and generates JavaScript, CSS and HTML with JavaScript source maps. Everything inside `dist` directory is ready for distribution. (You should be able to just ZIP up `dist` directory and send it to QA.)
134134
* `grunt prd` copies production configs to `src` as well as `dist` direcotry. It is very similar to QA build, except it doesn't generate JavaScript source map. Again, `dist` directory is ready for distribution.
135135

136+
Due to the fact that [CommonJS](http://wiki.commonjs.org/wiki/CommonJS) moduels need to be wrapped with [Browserify](http://browserify.org/) before running in a browser. There are tasks specially made for this.
137+
138+
* `devCommonJs` builds [CommonJS](http://wiki.commonjs.org/wiki/CommonJS) modules with minimun amount of process. It does not perform any kind of minification or even full clean to keep things running as fast as possible. But we will have to run your app from `dist` directory instead.
139+
* `watch:devCommonJs` uses [grunt-contrib-watch](https://github.com/gruntjs/grunt-contrib-watch) to watch changes you make. It will automatically run `devCommonJs` task whenever you save files. You should take a quick look at the `watch` task configs in `Gruntfile.js` to make sure that it ignored all the files you modify during build to avoid infinite build calls.
140+
141+
Additionally, there's a `watch:dev` task to watch for changes to config files then run `dev` task. This taks could come in handy when you are actively editing your config files, otherwise it's pretty useless.
142+
136143
Of course, there's `grunt clean` task to clean everything generated by [Grunt](http://gruntjs.com/).
137144

138145
License

0 commit comments

Comments
 (0)