Static Build
Deploying static files in places such as s3 allows designers and developers to share the asset that exists in the project. It's like an in-house icon viewer.
Create a static file in the assetbox.config.cjs
file based on the category
.
Build output folder is assetbox-dist
In this case, the administrative portion is lost and replaced with read-only. Can be used as an icon viewer
Setup
assetbox.config.cjs
/**
* @type {import('@assetbox/cli').AssetBoxScheme}
*/
const config = {
...
staticBuild: {
/**
Build Output Folder
Default value is "assetbox-dist"
*/
outDir: "assetbox-dist",
/**
base path for both static resources and routing in a web application.
Default value is "/"
*/
base: "/",
/**
mode: "library" will change the asset name to camelCase.
clicking on the asset will copy the asset name to the clipboard.
Recommended for use with `icon-build`.
Default value is "app"
*/
mode: "library" // or "app"
},
};
module.exports = config;
Usage
- pnpm
- yarn
- npm
$ pnpm assetbox static-build
$ yarn assetbox static-build
$ npm run assetbox static-build