@dupy/move-package v0.0.2
What is it ?
move-package
is a command line is a command line interface who allow you to refactor our package.json
and package-lock.json
file.
This command line also copy the readme.md file. (The file is not refactored)
How to install it ?
The easier way it to install it via npm or yarn with the following command: npm install @dupy/move-package (or yarn install @dupy/move-package for yarn).
Options
Options key | Description | Is required ? |
---|---|---|
input | Set the entry directory to the dirname of the input package.json and package-lock.json files | :heavy_check_mark: |
output | Set the output directory | :heavy_check_mark: |
remove-script | Remove the given scripts keys names (the name will be separate with , ) | :x: |
with-readme | A boolean to copy the readme.md file or not. The default value is false . | :x: |
Understand with an example
I have got my package.json
an my package-lock.json
files into my current folder. I want to refactor my packages files into the dist
folder, and then to publish the dist
folder.
in this case, my root
package.json
file have the entrypoint./dist/index.js
. When I will run themove-package
command, my./dist/package.json
will be factorised with to entrypoint./index.js
. (Same for the relative directory folders packages)
Here is a command to remove the publish
and test
scripts keys, and move the ./package.json
, package-lock.json
, readme.md
files into the dist folder:
move-package --input=\"./\" --output=\"./dist\" --remove-script=\"publish,test\"
Incoming features
- Adding test to manage this package
- Export the command line tools library as a package