coffeepress
helps combine multiple (coffee|java)script files into a single file
Last updated 8 years ago .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install coffeepress 
SYNC missed versions from official npm registry.

Coffeepress

Helps package coffeescript files into a single file for evaluation to js.

Notes:

Coffeepress uses synchronous fs calls, as this is mainly used as a utility before
an app is loaded, and therefore the performance of async calls shouldn't really matter.

Usage

new Coffeepress([options]).run(callback);

The options hash takes several parameters:

Example

var Coffeepress = require('coffeepress');

new Coffeepress({
  filename : './lib/formloader.coffee'
}).run(function(err, data){
  if (err) throw err
  fs.writeFile('./public/javascripts/formloader.coffee', data, 'UTF-8', function() {
    fs.writeFile('./public/javascripts/formloader.js', coffee.compile(data), 'UTF-8', function() {
      console.log('done');
    });
  });
});

Templating

The following functions are available for use within the templates processed by coffeepress

License

MIT

Current Tags

  • 0.0.0                                ...           latest (8 years ago)

1 Versions

  • 0.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |