mirror of
https://github.com/toddbluhm/env-cmd.git
synced 2025-12-08 18:23:33 +00:00
Documentation updates and lint command changes
- Fixed some minor documentation issues - Added tsc command to npm run lint to check for typescript errors when linting
This commit is contained in:
parent
b7cb14651b
commit
b1ad7e4902
@ -1,3 +1,4 @@
|
||||
.DS_Store
|
||||
.nyc_output
|
||||
.vscode
|
||||
coverage/
|
||||
@ -6,4 +7,4 @@ src/
|
||||
test/
|
||||
*.yml
|
||||
tsconfig.json
|
||||
.eslintrc.json
|
||||
.eslintrc.json
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
# Changelog
|
||||
## 9.0.1 - Unreleased
|
||||
- **Change**: Fixed some documentation issues
|
||||
- **Change**: `npm run lint` command now includes calling `tsc` to check for typescript errors
|
||||
|
||||
## 9.0.0
|
||||
- ***BREAKING***: Converted project to Typescript
|
||||
- ***BREAKING***: Changes to all option flags, see docs for new options
|
||||
|
||||
@ -42,7 +42,7 @@ Usage: _ [options] <command> [...args]
|
||||
|
||||
Options:
|
||||
-v, --version output the version number
|
||||
-f, --file [path] Custom env file file path (default path: ./.env)
|
||||
-f, --file [path] Custom env file path (default path: ./.env)
|
||||
-r, --rc-file [path] Custom rc file path (default path: ./.env-cmdrc(|.js|.json)
|
||||
-e, --environments [env1,env2,...] The rc file environment(s) to use
|
||||
--fallback Fallback to default env file path, if custom env file path not found
|
||||
@ -61,7 +61,7 @@ use from the `.env-cmdrc` file. Using multiple environment names will merge the
|
||||
together. Later environments overwrite earlier ones in the list if conflicting environment variables
|
||||
are found.
|
||||
|
||||
**.rc file `.env-cmdrc`**
|
||||
**.rc file `./.env-cmdrc`**
|
||||
|
||||
```json
|
||||
{
|
||||
@ -104,7 +104,7 @@ commands together that share the same environment variables.
|
||||
|
||||
**Terminal**
|
||||
```sh
|
||||
./node_modules/.bin/env-cmd -f ./test/.env --use-shell "node run lint && node test"
|
||||
./node_modules/.bin/env-cmd -f ./test/.env --use-shell "npm run lint && npm test"
|
||||
```
|
||||
|
||||
### Asynchronous env file support
|
||||
@ -205,4 +205,4 @@ added. Before opening a PR please make sure to run the following scripts:
|
||||
|
||||
- `npm run lint` checks for code errors and format according to [js-standard](https://github.com/feross/standard)
|
||||
- `npm test` make sure all tests pass
|
||||
- `npm run test-cover` make sure the coverage has not decreased from current master
|
||||
- `npm run test-cover` make sure the coverage has not decreased from current master
|
||||
10
dist/help.js
vendored
10
dist/help.js
vendored
@ -1,10 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
* Prints out some minor help text
|
||||
* @return {String} Help text
|
||||
*/
|
||||
function PrintHelp() {
|
||||
return "\nUsage: env-cmd [options] [env_file | env_name] command [command options]\n\nA simple utility for running a cli application using an env config file.\n\nAlso supports using a .env-cmdrc json file in the execution directory to support multiple\nenvironment configs in one file.\n\nOptions:\n --no-override - do not override existing process env vars with file env vars\n --fallback - if provided env file does not exist, attempt to use fallback .env file in root dir\n ";
|
||||
}
|
||||
exports.PrintHelp = PrintHelp;
|
||||
2
dist/parse-args.js
vendored
2
dist/parse-args.js
vendored
@ -10,7 +10,7 @@ function parseArgs(args) {
|
||||
program
|
||||
.version('9.0.0', '-v, --version')
|
||||
.usage('[options] <command> [...args]')
|
||||
.option('-f, --file [path]', 'Custom env file file path (default path: ./.env)')
|
||||
.option('-f, --file [path]', 'Custom env file path (default path: ./.env)')
|
||||
.option('-r, --rc-file [path]', 'Custom rc file path (default path: ./.env-cmdrc(|.js|.json)')
|
||||
.option('-e, --environments [env1,env2,...]', 'The rc file environment(s) to use', utils_1.parseArgList)
|
||||
.option('--fallback', 'Fallback to default env file path, if custom env file path not found')
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "env-cmd",
|
||||
"version": "9.0.0",
|
||||
"description": "Executes a command using the envs in the provided env file",
|
||||
"version": "9.0.1",
|
||||
"description": "Executes a command using the environment variables in an env file",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"engines": {
|
||||
@ -15,7 +15,7 @@
|
||||
"test-cover": "nyc --reporter=lcov --reporter=text npm test",
|
||||
"test-lint": "eslint ./src/**/*.ts ./test/**/*.ts",
|
||||
"coveralls": "coveralls < coverage/lcov.info",
|
||||
"lint": "eslint --fix ./src/**/*.ts ./test/**/*.ts",
|
||||
"lint": "eslint --fix ./src/**/*.ts ./test/**/*.ts && tsc --noEmit",
|
||||
"build": "tsc"
|
||||
},
|
||||
"repository": {
|
||||
|
||||
@ -10,7 +10,7 @@ export function parseArgs (args: string[]): EnvCmdOptions {
|
||||
program
|
||||
.version('9.0.0', '-v, --version')
|
||||
.usage('[options] <command> [...args]')
|
||||
.option('-f, --file [path]', 'Custom env file file path (default path: ./.env)')
|
||||
.option('-f, --file [path]', 'Custom env file path (default path: ./.env)')
|
||||
.option('-r, --rc-file [path]', 'Custom rc file path (default path: ./.env-cmdrc(|.js|.json)')
|
||||
.option('-e, --environments [env1,env2,...]', 'The rc file environment(s) to use', parseArgList)
|
||||
.option('--fallback', 'Fallback to default env file path, if custom env file path not found')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user