Skip to content
React compile task for pon
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ci
doc
example
lib
misc/mocks
test
.LICENSE.bud
.README.md.bud
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
package-lock.json
package.json

README.md

pon-task-react

Build Status npm Version JS Standard

React compile task for pon

Installation

$ npm install pon-task-react --save

Usage

'use strict'

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

async function tryExample () {
  let run = pon({
    // Compile js files under "ui" directory into "shim" directory
    'shim:ui': react('ui', 'shim', {
      pattern: [ '**/*.js', '**/*.jsx' ]
    })
  })

  run('shim:*')
}

tryExample()

Signatures

define(srcDir, destDir, options) -> function

Define task

Param type Description
srcDir string Source directory name
destDir string Destination directory name
options Object Optional settings
options.pattern string|string[] File name pattern
options.presets string[] Babel preset names
options.plugins string[] Babel plugin names
options.watchTargets string[] Additional watch target filenames
options.watchDelay number Delay after watch

License

This software is released under the Apache-2.0 License.

Links

You can’t perform that action at this time.