Socket
Book a DemoInstallSign in
Socket

@assetpack/cli

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@assetpack/cli

A simple CLI to run AssetPack

0.8.0
latest
Source
npmnpm
Version published
Weekly downloads
245
-23.91%
Maintainers
1
Weekly downloads
 
Created
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

assetpack

FAQs

Package 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.