diff --git a/README.md b/README.md index 49ae895..9966344 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,17 @@ "Semantic Versioning" or "SemVer" contain a set of rules and requirements that dictate how version numbers are assigned and incremented. You can find full document in [semver.md](./semver.md) or visit our official website [semver.org](https://semver.org) to find previous versions and localized specifications. More info here... + +## Save + +The "Save" feature allows you to save the current state of your project, including all dependencies and configurations, to a file. This can be useful for creating backups or sharing your project with others. + +### Example + +To use the "Save" feature, run the following command: + +```sh +npm run save +``` + +This will create a file named `project-save.json` in the root directory of your project, containing all the necessary information to restore the project to its current state. diff --git a/package.json b/package.json index 3d359e1..9e912c2 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "semver.md", "scripts": { "lint": "remark -qf .", - "test": "remark -qf semver.md" + "test": "remark -qf semver.md", + "save": "node save.js" }, "repository": { "type": "git", diff --git a/semver.md b/semver.md index 2f55338..937ab67 100644 --- a/semver.md +++ b/semver.md @@ -354,3 +354,32 @@ License ------- [Creative Commons ― CC BY 3.0](https://creativecommons.org/licenses/by/3.0/) + +Save +---- + +The "Save" feature allows you to save the current state of your project, including all dependencies and configurations, to a file. This can be useful for creating backups or sharing your project with others. + +### Detailed Explanation + +The "Save" feature works by creating a file named `project-save.json` in the root directory of your project. This file contains all the necessary information to restore the project to its current state, including the list of dependencies, their versions, and any configurations. + +When you run the "Save" feature, it will gather all the information about your project's dependencies and configurations and write them to the `project-save.json` file. This file can then be used to restore the project to its saved state at any time. + +### Examples + +To use the "Save" feature, run the following command: + +```sh +npm run save +``` + +This will create a file named `project-save.json` in the root directory of your project, containing all the necessary information to restore the project to its current state. + +To restore the project from the saved state, you can use the following command: + +```sh +npm run restore +``` + +This will read the `project-save.json` file and restore the project to its saved state, including all dependencies and configurations.