Home

Awesome

start-uglify

npm linux build windows build coverage deps

UglifyJS task for Start.

Install

npm install --save-dev start-uglify
# or
yarn add --dev start-uglify

Usage

import start from 'start';
import reporter from 'start-pretty-reporter';
import files from 'start-files';
import clean from 'start-clean';
import read from 'start-read';
import babel from 'start-babel';
import rename from 'start-rename';
import uglify from 'start-uglify';
import write from 'start-write';

export const build = () => start(reporter())(
  files('build/'),
  clean(),
  files('lib/**/*.js'),
  read(),
  babel({ sourceMaps: true }),
  write('build/'),
  rename(file => file.replace(/\.js$/, '.min.js')),
  uglify({ outSourceMap: true }),
  write('build/')
);

This task relies on [{ path, data, map }] input and provides the same, see documentation for details.

Arguments

uglify(options)