Getting Started
AssetBox provides a visualization of the asset based on your front-end repository. It also provides a way to efficiently manage within a project by analyzing redundant management and the assets in use.
Installation
- pnpm
- yarn
- npm
$ pnpm install @assetbox/cli -D
$ yarn add @assetbox/cli -D
$ npm install @assetbox/cli --save-dev
Setup
Create config file
- pnpm
- yarn
- npm
$ pnpm assetbox init
$ yarn assetbox init
$ npm run assetbox init
Assume that you have the following folder structures.
- src
- assets/icons
- heart.svg
- fill-heart.svg
- ...
- assets/images
- background.png
- background.jpeg
- ...
- assets/animations
- person.json (lottie)
- ...
- ...
- assets/icons
assetbox.config.cjs
/**
* @type {import('@assetbox/cli').AssetBoxScheme}
*/
const config = {
categories: {
Icons: ["./src/assets/icons/**/*"],
Images: ["./public/images/**/*"],
},
trackingPaths: ["./src/**/*"],
};
module.exports = config;
Usage
- pnpm
- yarn
- npm
$ pnpm assetbox manage
$ yarn assetbox manage
$ npm run assetbox manage