Socket
Socket
Sign inDemoInstall

coffee-fast-compile

Package Overview
Dependencies
13
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    coffee-fast-compile

Module for fast compilation whole directories with very simple API


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
4.03 MB
Created
Weekly downloads
 

Readme

Source

coffee-fast-compile

There are situations when you start thinking for coffee-script support in you lib/module. But interface provided by official cooffee-script module is ugly and don't allow you to watch dir inside your script. This module is built to solve such problems providing simple interface for compiling and watching whole directories built on top nodejs streams.

build

It just compiles everything from example dir and outputs code to output dir saving all relatives paths.

compile = require('coffee-fast-compile');
var pipe = compile.build('example', 'output', function(files) {
  console.log(files, ' was compiled');
});

pipe.on('data', function(file) {
  if(file === 'compiled') {
    console.log('compiled');
  } else {
    console.log(file, ' compiled');
  }
});

watch

The same as build, but recompiles changed files on the fly. You also can use pipe to monitor results. When initially called, it invokes build, so first compilation can be long. While watching it only compiles changed files.

compile = require('coffee-fast-compile');
var pipe = compile.watch('example', 'output', function(files) {
  console.log(files, ' was compiled');
});

FAQs

Last updated on 30 Apr 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc