Name: apps-b-builder
Owner: InterMine
Description: A component.io based builder for making JS packages
Created: 2013-08-02 15:14:12.0
Updated: 2013-12-17 08:57:56.0
Pushed: 2013-11-04 12:54:47.0
Homepage: null
Size: 222
Language: CoffeeScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A component.io based builder for making modular JS components.
Globally install the npm package:
do npm install apps-b-builder -g
Then specify the input and output path to build a component:
lative to current working directory
ps-b ./src/ ./build/
A component consists of one component.json
config file and one or more source file. Script source files use the CommonJS Modules/1.1 implementation so you use require
and module.exports
to link between modules & components. This is a standard in the Node.js community.
To write a component config file in JSON refer to the standard.
"name": "app",
// Which file do we require as the main file.
"main": "app.js",
"version": "1.0.0",
// Other components.
"dependencies": {
"visionmedia/superagent": "*",
"necolas/normalize.css": "*",
"component/marked": "*"
},
"scripts": [
"app.coffee",
"template.eco"
],
"styles": [
"styles/fonts.css",
"styles/app.styl"
]
Have a look into the test/fixtures
directory for examples of supported filetypes:
scripts
sectionstyles
sectionscripts
sectionscripts
sectionscripts
sectionstyles
sectionYou can programatically build files too:
d = require './build.coffee'
d [ './src/', './build/' ], (err) ->
throw err if err
Tests using Mocha:
m install -d
ke test