You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Install launchpad: `npm i @bluecadet/launchpad`
34
34
2. Create a `launchpad.config.js` config (see [configuration](#configuration))
35
-
3.*Optional: [Bootstrap](/packages/scaffold) your PC with `npx launchpad scaffold`*
35
+
3._Optional: [Bootstrap](/packages/scaffold) your PC with `npx launchpad scaffold`_
36
36
4. Run `npx launchpad`
37
37
38
38

39
39
40
40
Run `npx launchpad --help` to see all available commands.
41
41
42
-
*Note: Launchpad is typically triggered run by a startup task (e.g. Windows Task Scheduler) using `npx launchpad`. When installed globally (`npm i -g @bluecadet/launchpad`), you can use the `launchpad` command instead. See [config loading](#config-loading) for more info.*
42
+
_Note: Launchpad is typically triggered run by a startup task (e.g. Windows Task Scheduler) using `npx launchpad`. When installed globally (`npm i -g @bluecadet/launchpad`), you can use the `launchpad` command instead. See [config loading](#config-loading) for more info._
43
43
44
44
## Configuration
45
45
@@ -49,32 +49,34 @@ Each [launchpad package](#packages) is configured via its own section in `launch
*Note: [Scaffold](/packages/scaffold) is configured separately in a PowerShell file. This is a guided process when you run `npx launchpad scaffold`.*
79
+
_Note: [Scaffold](/packages/scaffold) is configured separately in a PowerShell file. This is a guided process when you run `npx launchpad scaffold`._
78
80
79
81
### Documentation
80
82
@@ -94,19 +96,42 @@ All available config settings across packages can be found in the links below:
94
96
### Config Loading
95
97
96
98
- By default, Launchpad looks for `launchpad.config.js`, `launchpad.config.mjs`, `launchpad.json` or `config.json` at the cwd (where you ran `npx launchpad`/`launchpad` from)
97
-
- You can change the default path with `--config=<YOUR_FILE_PATH>` (e.g. `npx launchpad --config=../settings/my-config.json`)
99
+
- You can change the default path with `--config=<YOUR_FILE_PATH>`or `-c=<YOUR_FILE_PATH>`(e.g. `npx launchpad --config=../settings/my-config.json`)
98
100
- If no config is found, Launchpad will traverse up directories (up to 64) to find one
99
101
- All config values can be overridden via `--foo=bar` (e.g. `--logging.level=debug`)
100
102
103
+
### `.env` Files
104
+
105
+
Launchpad uses [dotenv](https://github.com/motdotla/dotenv) to load in environment variables from `.env` and `.env.local` files located in the same directory as your config file.
106
+
107
+
Environment variables are loaded before the config file is parsed, so you can use them in your config file. For example, you can use `process.env.MY_ENV_VAR` in your config file to access the value of `MY_ENV_VAR` in your `.env` file.
108
+
109
+
> [!WARNING]
110
+
> We recommend using `.env.local` for sensitive credentials that should not be committed to source control. You should add `*.local` to your `.gitignore` to avoid them being checked into git.
111
+
112
+
All Launchpad CLI commands also accept `--env <ENV_FILE_PATH(S)>` (alias `-e`) options to manually specify one or more `.env` files to load. These paths are relative to the CWD (where you ran `npx launchpad`/`launchpad` from).
113
+
114
+
```sh
115
+
# Load ../.env then ../.env.develop
116
+
npx launchpad -e ../.env -e ../.env.develop
117
+
```
118
+
119
+
Additionally, the `--cascade-env=<ENV_NAME>` (alias `-E`) option which will load the following files located alongside your config file:
120
+
121
+
-`.env`
122
+
-`.env.local`
123
+
-`.env.<ENV_NAME>`
124
+
-`.env.<ENV_NAME>.local`
125
+
101
126
## Packages
102
127
103
128
This repo is a monorepo that includes the following packages:
Each of these packages can be launched and configured independently (except for utils), so if you only need app-monitoring or content updates, you can install only `@bluecadet/launchpad-monitor` or `@bluecadet/launchpad-content`.
0 commit comments