Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cake-async

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cake-async

Asynchronous tasks for Cakefiles

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

cake-async

Asynchronous cakefile tasks.

Simply add the async keyword before a task definition, and call the done callback once finished.

To run async tasks, use invoke async 'task_name' - there are no callbacks, instead invocations are queued and guaranteed to run in order within a task.

The function given to async.end() will be called when all tasks have finished.

Without
task 'compile', ->
    compileAsync files

task 'minify', ->
    minifyAsync files

task 'build', ->
    invoke 'compile'
    invoke 'minify'
    # might or might not work depending on your luck
With cake-async
async task 'compile', (o, done) ->
    compileAsync files, done

async task 'minify', (o, done) ->
    minifyAsync files, done

task 'build', ->
    invoke async 'compile'
    invoke async 'minify'
    async.end => console.log 'done!'

Tests

npm install
npm install mocha -g # skip if you already have it
./mocha

FAQs

Package last updated on 06 Jan 2013

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc