0.6.9 • Published 9 months ago

@sladdky/asset-optimizer v0.6.9

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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()
0.6.7

9 months ago

0.6.6

10 months ago

0.6.9

9 months ago

0.6.8

9 months ago

0.6.3

10 months ago

0.6.2

10 months ago

0.6.5

10 months ago

0.6.4

10 months ago

0.6.1

10 months ago

0.6.0

10 months ago

0.1.0

12 months ago

0.3.0

11 months ago

0.1.2

12 months ago

0.2.0

12 months ago

0.1.1

12 months ago

0.5.0

11 months ago

0.3.2

11 months ago

0.1.4

12 months ago

0.4.0

11 months ago

0.3.1

11 months ago

0.1.3

12 months ago

0.5.2

11 months ago

0.3.4

11 months ago

0.1.6

12 months ago

0.5.1

11 months ago

0.3.3

11 months ago

0.1.5

12 months ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago