1.0.20 • Published 1 year ago

clean-assets-master v1.0.20

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Description

Delete the images and media file that are not imported in your project.
.jpg .png .jpeg .mp3 .wav

Before

  • src
    • assets
      • icons
        • file1.png
        • file1@2x.png
        • file1@3x.png
        • unimportable.png <!-- This file will be deleted after cleaning as it is not imported
        • unimportable@2x.png <!-- This file will be deleted after cleaning as it is not imported
        • unimportable@3x.png <!-- This file will be deleted after cleaning as it is not imported
    • components
      • Example.tsx
  • package.json

Example.tsx

import icon from 'assets/icons/file1.png

After Clean

- src
- assets
    -icons
        - file1.png
        - file1@2x.png
        - file1@3x.png
        - unimportable.png  <!--this file deleted 
        - unimportable@2x.png  <!--this file deleted 
        - unimportable@3x.png  <!--this file deleted 

Example

Alt textAlt text Click để xem demo

Install

npm i clean-assets-master

Setting

.package.json

"scripts": {
    "clean:assets": "node node_modules/clean-assets-master/index.js pathImage pathSource"
}

Example

"scripts": {
    "clean:assets": "node node_modules/clean-assets-master/index.js src/assets src"
}

Run script

npm run clean:assets
1.0.19

1 year ago

1.0.18

1 year ago

1.0.20

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago