1.0.5 • Published 3 years ago
@krishnawijaya/vue-secret-key-generator v1.0.5
Installation
Install to your VueJs project
npm install --save @krishnawijaya/vue-secret-key-generator
Usage
- Move to your project directory
cd /your/project/path
Configure "generate" command
- Open package.json file of your project
- Add generate command to your project
"generate-key": "generate"
- So that your code in the script section looks like this
"scripts": { "your": "another-script", "generate-key": "generate", "your": "others-script" },
- Then save your package.json file
Generate the secret key
Generate with default settings:
15 digits length and consist of A-Z, a-z, 0-9 without I, O alphabets
Automatically added to your VUE_APP_SECRET_KEY variable in your .env file
generate-key
Generate with your own settings:
Example:
generate-key -- --length 20 --chars "abcdefg12345" --variable "YOUR_CUSTOM_VARIABLE_NAME" --filepath "/your/custom/path"
Use in other file:
If you want to use the new secret key outside the .env file
You can pass the "-m" or "--manual" flag in the command
generate-key -- --manual
Then copy and paste the key wherever you want
Show help information
See complete usage info:
generate --help