3.5.5 • Published 4 years ago

@appius-digital/task-build-scripts v3.5.5

Weekly downloads
10
License
MIT
Repository
-
Last release
4 years ago

Appius Build Tool: Build Scripts

Use this tool to process Javascript into production-ready code as part of your build process.

Installation

Run the following command from your project root.

npm install @appius-digital/task-build-scripts --save

Usage

Add the following to your gulpfile.js

require('@appius-digital/task-build-scripts')(gulp, {
  task: 'build-scripts',
  src: ['src/js/main.js'],
  dest: 'dist/js' });

Options

NameTypeRequiredDefaultDescription
taskStringNo'build-scripts'The name of the task to be initialised
srcArrayYesThe globs to be processed
destStringYesDirectory to place the processed files
plugins.terser.enabledBooleanNotrueEnable or disable terser (minifier)
plugins.terser.configObjectNo{}A set of terser options
plugins.sourcemaps.enabledBooleanNotrueEnable or disable sourcemaps
plugins.browserify.enabledBooleanNotrueEnable or disable browserify (bundler)
plugins.browserify.outputStringNo'main.js'The output bundle file name
plugins.babel.enabledBooleanNotrueEnable or disable babel (ES6 compiler)
plugins.babel.configObjectNo{}A set of babel options
plugins.include.enabledBooleanNofalseEnable or disable include
plugins.include.configBooleanNo{}A set of gulp-include options

Configuration

This is a zero-config task. Some optional configuration can be set on the terser plugin, but is not required. Bable is pre-configured to use the standard @babel/preset-env preset.

Note on include and sourcemaps

The include plugin will break the output sourcemap if the source files use Windows line endings (CRLF). If you need to use includes, please ensure all source files use Unix line endings (LF) instead.

Copyright and license

Code and documentation Copyright 2019 Appius. Code released under the MIT License.

3.5.5

4 years ago

3.5.4

4 years ago

3.5.3

4 years ago

3.5.2

5 years ago

3.5.1

5 years ago

3.5.0

5 years ago

3.4.0

5 years ago

3.3.0

5 years ago

3.2.2

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.1.0

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago