Skip to content

ローカルパッケージ用のpackage.jsonを生成

License

Notifications You must be signed in to change notification settings

npm-packages01/pkg-local

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pkg-local

Generate package.json for local package

usage

pkg-local targetPath

example

  • Original state

[pakage.json]

{
  "name": "example",
  "version": "1.0.0",
  "main": "dist/index.js",
  "types": "dist/index.d.ts",
  "bin":{"abc":"dist/abc.js"}
}
  • Execute command pkg-local dist

[dist/package.json]

{
  "name": "example",
  "version": "1.0.0",
  "main": "index.js",
  "types": "index.d.ts",
  "bin":{"abc":"abc.js"}
}

Install local module

  • You can install packages that do not include node_modules
npm install ../example/dist