@sladdky/asset-optimizer v0.6.9
ASSET-OPTIMIZER
Optimizing videos, photos, svgs from one folder to another.
Supported extensions: JPG, JPEG, PNG, TIFF, SVG, MP4, MOV ...(more to be added)
Why?
There are other options like webpack, gulp, vite, nuxt/next plugins, etc. to optimize assets. This library makes optimizing assets framework agnostic, doesn't slow down building your app and gives you callbacks to customize what to do with the files and you don't have to rely on pre-coded options.
Drawbacks:
- with current implementation doesn't scale well for infinite number of file => use for large projects is not suitable at the moment
Table of contents
CLI
Programmable
CLI
Instalation
npm install --location=global @sladdky/asset-optimizer
Usage
asset-optimizer
[--inputcwd=<path>] default: public-src
[--outputcwd=<path>] default: public
[--ui=<true|false>] default: false
Programmable
Instalation
npm install --save-dev @sladdky/asset-optimizer
Usage
const { join } = require('path')
const { createAssetOptimizer } = require('@sladdky/asset-optimizer')
const ao = createAssetOptimizer({
core: {
inputCwd: join(__dirname, 'public-src'),
outputCwd: join(__dirname, 'public'), //optimized|processed files
}
})
ao.watch()
9 months ago
10 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
12 months ago
11 months ago
12 months ago
12 months ago
12 months ago
11 months ago
11 months ago
12 months ago
11 months ago
11 months ago
12 months ago
11 months ago
11 months ago
12 months ago
11 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago