pon-task-compile

5.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i pon-task-compile

Weekly Downloads

13

Version

5.0.0

License

Apache-2.0

Unpacked Size

26.7 kB

Total Files

25

Last publish

Collaborators

  • realglobe