1.0.8 • Published 5 years ago

npm-dist v1.0.8

Weekly downloads
12
License
MIT
Repository
github
Last release
5 years ago

npm-dist

Trim node_modules, copy to dist/node_modules, smaller and faster than before, for server side

Installation

Install via npm:

$ npm i npm-dist

Usage

const Trim = require('npm-dist')

// Installed joi@17.3.0
// total 109 files, 905kb
Trim('joi')  // 64 file 504kb

Trim(pkgName, distPath)

fieldrequireddesc
pkgNametrueString, 'joi'
distPathfalseString, default is 'dist'
returns-
throwsError

Rules

  1. Delete package.json, pkg.main is no longer needed
  2. Save only reference files
  3. When there is only one file, move the package to the root directory

Beofre Directory After Directory

Authors

Yanglin (i@yangl.in)

License

Copyright (c) 2020 Yanglin

Released under the MIT license

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago