Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/2do2go/node-appmaker
helper script for creating production build of web application (compile less to css, etc)
https://github.com/2do2go/node-appmaker
Last synced: 29 days ago
JSON representation
helper script for creating production build of web application (compile less to css, etc)
- Host: GitHub
- URL: https://github.com/2do2go/node-appmaker
- Owner: 2do2go
- Created: 2013-04-18T12:02:28.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-11-25T11:29:40.000Z (about 5 years ago)
- Last Synced: 2024-11-07T03:49:34.971Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 2
- Watchers: 5
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# appmaker
helper script for creating production build of web application (compile less to
css, optimize js using requirejs optimizer, etc)## Installation
```bash
npm install appmaker
```
## Usage
create your own `makeApp.js` build script (e.g. at root directory of your
project), define your `tasks` and use helper methods within them, e.g.```js
#!/usr/bin/env node
var appMaker = require('./lib/2do2go/node_utils/appMaker'),
path = require('path');var tasks = {};
tasks.build = function() {
tasks.clean();
tasks.compileLess();
tasks.requirejsOptimize();
};tasks.compileLess = function() {
appMaker.compileLess({files: 'static/css/*.less'});
};tasks.requirejsOptimize = function() {
appMaker.requirejsOptimize({
modulesDir: 'static/js/views/',
baseUrl: 'static/js/',
dir: 'static/scripts',
mainConfigFile: 'views/template/requirejs/development.js'
});
};tasks.clean = function() {
appMaker.clean(
['static/scripts', 'static/js/sharedmodules/*.js', 'static/css/*.css'],
'-Rf'
);
};appMaker.process(tasks);
```
after that you can call `./makeApp.js` (don't forget to make him executable via
`chmod +rx`) to see available commands