0.8.0 • Published 6 months ago

@assetpack/cli v0.8.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@assetpack/cli

AssetPack CLI is a command line tool for AssetPack.

Installation

npm install --save-dev @assetpack/cli

Usage

{
    "scripts": {
        "build": "assetpack -c .assetpack.js",
        "watch": "assetpack -c .assetpack.js -w"
    }
}

Config File

AssetPack uses a config file to define what assets you want to optimise and how you want to optimise them. The config file is a JavaScript file that exports an object with the following properties:

  • entry: The directory where your raw assets are located.
  • output: The directory where you want your optimised assets to be outputted to.
  • plugins: An object containing the plugins you want to use. The key is the name of the plugin, and the value is the plugin itself.
  • ignore: an optional array of ignore patterns. Any file path matching the patterns will not be processed by assetpack
  • cache: an optional boolean to enable or disable caching. Defaults to true.
  • logLevel: an optional string to set the log level. Defaults to 'info'.
  • files: an optional object to override the settings and tags of any assets. See Config Overrides for more details.

Example

// .assetpack.js

export default {
  entry: "./raw-assets",
  output: "./public",
  plugins: {},
};
0.8.0

6 months ago

0.7.0

10 months ago

0.6.2

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.6.1

1 year ago

0.3.4

1 year ago

0.6.0

1 year ago

0.5.1

1 year ago

0.3.3

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago