Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 1.58 KB

tasks.md

File metadata and controls

70 lines (50 loc) · 1.58 KB

Available NPM Tasks

The following npm tasks are available by default after installing fe-build, but you need to add them manually to your package.json file.

Compile JavaScript/ECMAScript

Add nc-fe-build --task=webpack task in package.json scripts

  "scripts": {
    "build:js": "nc-fe-build --task=webpack"
  },

To execute it, open the terminal and run npm run build:js from the same folder where the file package.json is.

Compile Sass

  "scripts": {
    "build:css": "nc-fe-build --task=styles"
  },

Create ClientLibrary Files

  "scripts": {
    "build:clientlibs": "nc-fe-build --task=clientlibs"
  }

Run an Specific Config File

You can run the build from a single configuration file:

  "scripts": {
    "build:config": "nc-fe-build --config-file=path/to/configFile"
  }

Watch Sass and JS

  "scripts": {
    "watch:js": "nc-fe-build --task=webpack --watch",
    "watch:css": "nc-fe-build --task=styles --watch",
  }

Analyze JS

Analyze the bundles with Webpack Bundle Analyzer.

  "scripts": {
    "analyze": "nc-fe-build --task=webpack --analyze --development"
  }

To change the port number, you can append the argument --port= followed by a valid port number.

Additional Arguments

You can add the following arguments to the nc-fe-build command in order to change its behavior.

Argument Description
--quiet Displays less messages in the output
--disable-styelint Disables Stylelint