pon-task-compile
Pon task to compile file
Last updated a month ago by realglobe .
Apache-2.0 · Repository · Bugs · Original npm · Tarball
$ cnpm install pon-task-compile 
SYNC missed versions from official npm registry.

pon-task-compile

Build Status npm Version JS Standard

Pon task to compile file

Installation

$ npm install pon-task-compile --save

Usage

'use strict'

const pon = require('pon')
const compile = require('pon-task-compile')

async function tryExample () {
  let run = pon({
    'compile:foo': compile('src/foo.txt', 'dest/bar.txt', (src, dest) => {
      let compiled = '...'
      let map = '...'
      return [ compiled, map ]
    })
  })

  run('compile:foo')
}

tryExample()

Signatures

byPattern(srcDir, destDir, compiler, options)

Define compile task by pattern

Param type Description
srcDir string Source directory name
destDir string Destination directory name
compiler function Compiler function
options Object Optional settings
options.pattern string|string[] File name pattern
options.watchDelay number Delay after watch
options.watchTargets string[] Additional watch target filenames
options.namer function Filename convert function

define(src, dest, compiler, options) -> function

Define task

Param type Description
src string Source filename
dest string Destination filename
compiler function Compiler function
options Object Optional settings

License

This software is released under the Apache-2.0 License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (4)
Dev Dependencies (14)

Copyright 2014 - 2017 © taobao.org |