ecopages 0.1.95 → 0.1.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +7 -6
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -53,6 +53,7 @@ function buildEnvOverrides(options) {
|
|
|
53
53
|
if (options.hostname) env.ECOPAGES_HOSTNAME = options.hostname;
|
|
54
54
|
if (options.baseUrl) env.ECOPAGES_BASE_URL = options.baseUrl;
|
|
55
55
|
if (options.debug) env.ECOPAGES_LOGGER_DEBUG = 'true';
|
|
56
|
+
if (options.nodeEnv) env.NODE_ENV = options.nodeEnv;
|
|
56
57
|
return env;
|
|
57
58
|
}
|
|
58
59
|
|
|
@@ -116,7 +117,7 @@ const serverOptions = (cmd) =>
|
|
|
116
117
|
serverOptions(
|
|
117
118
|
program.command('dev').description('Start the development server').argument('[entry]', 'Entry file', 'app.ts'),
|
|
118
119
|
).action((entry, opts) => {
|
|
119
|
-
runBunCommand(['--dev'], opts, entry);
|
|
120
|
+
runBunCommand(['--dev'], { ...opts, nodeEnv: 'development' }, entry);
|
|
120
121
|
});
|
|
121
122
|
|
|
122
123
|
serverOptions(
|
|
@@ -125,7 +126,7 @@ serverOptions(
|
|
|
125
126
|
.description('Start the development server with watch mode (restarts on file changes)')
|
|
126
127
|
.argument('[entry]', 'Entry file', 'app.ts'),
|
|
127
128
|
).action((entry, opts) => {
|
|
128
|
-
runBunCommand(['--dev'], { ...opts, watch: true }, entry);
|
|
129
|
+
runBunCommand(['--dev'], { ...opts, watch: true, nodeEnv: 'development' }, entry);
|
|
129
130
|
});
|
|
130
131
|
|
|
131
132
|
serverOptions(
|
|
@@ -134,7 +135,7 @@ serverOptions(
|
|
|
134
135
|
.description('Start the development server with hot reload (HMR without restart)')
|
|
135
136
|
.argument('[entry]', 'Entry file', 'app.ts'),
|
|
136
137
|
).action((entry, opts) => {
|
|
137
|
-
runBunCommand(['--dev'], { ...opts, hot: true }, entry);
|
|
138
|
+
runBunCommand(['--dev'], { ...opts, hot: true, nodeEnv: 'development' }, entry);
|
|
138
139
|
});
|
|
139
140
|
|
|
140
141
|
program
|
|
@@ -142,19 +143,19 @@ program
|
|
|
142
143
|
.description('Build the project for production')
|
|
143
144
|
.argument('[entry]', 'Entry file', 'app.ts')
|
|
144
145
|
.action((entry) => {
|
|
145
|
-
runBunCommand(['--build'], {}, entry);
|
|
146
|
+
runBunCommand(['--build'], { nodeEnv: 'production' }, entry);
|
|
146
147
|
});
|
|
147
148
|
|
|
148
149
|
serverOptions(
|
|
149
150
|
program.command('start').description('Start the production server').argument('[entry]', 'Entry file', 'app.ts'),
|
|
150
151
|
).action((entry, opts) => {
|
|
151
|
-
runBunCommand([], opts, entry);
|
|
152
|
+
runBunCommand([], { ...opts, nodeEnv: 'production' }, entry);
|
|
152
153
|
});
|
|
153
154
|
|
|
154
155
|
serverOptions(
|
|
155
156
|
program.command('preview').description('Preview the production build').argument('[entry]', 'Entry file', 'app.ts'),
|
|
156
157
|
).action((entry, opts) => {
|
|
157
|
-
runBunCommand(['--preview'], opts, entry);
|
|
158
|
+
runBunCommand(['--preview'], { ...opts, nodeEnv: 'production' }, entry);
|
|
158
159
|
});
|
|
159
160
|
|
|
160
161
|
program.parse();
|