Socket
Socket
Sign inDemoInstall

@assetpack/cli

Package Overview
Dependencies
4
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@assetpack/cli

A simple CLI to run AssetPack


Version published
Weekly downloads
814
decreased by-17.69%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@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: {},
};

Keywords

FAQs

Last updated on 17 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc