1.1.3 • Published 2 years ago

yarn-no-save v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

yarn-no-save

Enabling --no-save / -N option to Yarn cli commands. The option prevents saving to package.json when you do yarn add stuff.

How to Use

Basicly

  1. First you should have yarn installed globally. See more at the official site

  2. install yarn-no-save globally:

    $ yarn global add yarn-no-save
  3. Now you can use Yarn with --no-save / -N option in your command:

    $ yarn add --no-save xxxxxxxx

Advanced

Firstly, let's see how it works. Basically, we are making a feature injection to Yarn:

  • before saving to the root manifest (package.json), we try to stop the saving operation if --no-save / -N option is given.

  • to prevent yarn to throw an exception when we are trying to remove packages which are not found in the manifest file (package.json).

  • to update the help message.

Also, the "feature injection" will fail if Yarn in updated or reinstalled, so we need to check if any changes (including file replacement) are made to the file. Therefore, we build a watcher to surveil the changes. In order to ease you up, we register it as a system service at startup. So there is nothing more to do when you reinstall Yarn by default.

In advance, we offered you someway to control the service. Here are the advanced usages (These commands are ONLY available for MacOS):

  1. Stop watching and reset Yarn to default:

    $ yns reset

    This will reinstall Yarn from your current registry. If you want --no-save / -N option back, you should run the following commands:

    $ yns
    $ yns start
  2. Start watching service:

    $ yns start
  3. Stop watching service:

    $ yns stop
  4. Reload watching service:

    This doesn't unload watching configs, just reloads the service (quick reload).

    	```bash
    	$ yns reload
    	```
  5. Restart watching service:

    This unloads watching configs and starts from the beginning (full restart).

    	```bash
    	$ yns restart
    	```
  6. Check if --no-save / -N option is available:

    $ yns check

    or

    $ yns validate

To Mention

  1. The --no-save / -N option will be available in help message by typing "yarn help add" or "yarn add --help".

  2. You are free to uninstall any packages installed with --no-save / -N option by executing "yarn uninstall xxxxx" (postuninstall scripts will be executed by doing this, while the same thing won't happen by just deleting the folders from node_modules).

  3. Please contact me if you have any problems into this tool.

Author

@shuangwhywhy

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.0.34

2 years ago

1.0.33

2 years ago

1.0.32

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago