Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

cooker

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cooker

a minimalism style version manager for static files

Source
npmnpm
Version
0.0.4
Version published
Weekly downloads
14
180%
Maintainers
1
Weekly downloads
 
Created
Source

logo cooker npm

123

a minimalism style version manager for static files.

How to install

$ sudo npm install cooker -g

Usage

Use CLI

// watch files change and create zipfile automatically
$ cooker or $ cooker ./demo

// create cooker.configs.json
$ cooker -c

// fill cooker.configs.json and rewatch changes
$ cooker

// update version by youself
$ cooker up

Sample code

var cooker = require('cooker');

// using cooker to watch psd changes
cooker.watch('./psd',function(changes){
  console.log(changes);
});

// watch file changes and created when new psd added.
cooker.watch('./psd',function(changes){
  // if new psd added to './psd'
  if (changes.type == 'new') {
    // using defalut zip config
    cooker.zip('./psd',function(zipfile){
      // zipfile should be 'psd_v0.0.x.zip'
      console.log(zipfile)
    })
  }
});

API

cooker.watch(config,callback)

  • config [Object] or [String] :
    • ingore: [Array] : filetypes to ignore.
    • dir: [String] : dir for watch
  • callback [Function]
    • err
    • changes: [Array] list every changes here.

cooker.zip(config,callback)

  • config [Object] or [String]:
    • fileDir: [String] dir wanna to zip
    • dist: [String] mv zip file to selected dist dir
    • start: [Number] : like 0.0.1 or 1.0.0
    • divider: [String] : divider that divide filename from version-stamps , e.g: "-" or "." or ("_" -> "filename_v0.1.0" )
    • afterfix : [String] : string after version-stamp. e.g: "filename_v1.0.1_2013-20-20.zip"
  • fileDir [String]
  • callback [Function]
    • err
    • pkg zipped package dir

Run unit-test (Mocha)

$ git clone https://github.com/turingou/cooker.git
$ cd cooker
$ npm install 
$ npm test

Changelog

  • 0.0.1 logo added

Keywords

cooker

FAQs

Package last updated on 30 Aug 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