Skip to content

Commit

Permalink
Add NPM_BUILD environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
whenlit authored and zmiklank committed Apr 10, 2024
1 parent 75e4647 commit ce1e482
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 8 deletions.
3 changes: 3 additions & 0 deletions 14-minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ Application developers can use the following environment variables to configure
**`DEV_MODE`**
When set to "true", `nodemon` will be used to automatically reload the server while you work (default: "false"). Setting `DEV_MODE` to "true" will change the `NODE_ENV` default to "development" (if not explicitly set).

**`NPM_BUILD`**
Select an alternate / custom build command, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "build"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

**`NPM_RUN`**
Select an alternate / custom runtime mode, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "start"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

Expand Down
2 changes: 1 addition & 1 deletion 14-minimal/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ else

#do not fail when there is no build script
echo "---> Building in production mode"
npm run build --if-present
npm run ${NPM_BUILD:-build} --if-present

echo "---> Pruning the development dependencies"
npm prune
Expand Down
3 changes: 3 additions & 0 deletions 14/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ Application developers can use the following environment variables to configure
**`DEV_MODE`**
When set to "true", `nodemon` will be used to automatically reload the server while you work (default: "false"). Setting `DEV_MODE` to "true" will change the `NODE_ENV` default to "development" (if not explicitly set).

**`NPM_BUILD`**
Select an alternate / custom build command, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "build"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

**`NPM_RUN`**
Select an alternate / custom runtime mode, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "start"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

Expand Down
2 changes: 1 addition & 1 deletion 14/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ else

#do not fail when there is no build script
echo "---> Building in production mode"
npm run build --if-present
npm run ${NPM_BUILD:-build} --if-present

echo "---> Pruning the development dependencies"
npm prune
Expand Down
3 changes: 3 additions & 0 deletions 16-minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ Application developers can use the following environment variables to configure
**`DEV_MODE`**
When set to "true", `nodemon` will be used to automatically reload the server while you work (default: "false"). Setting `DEV_MODE` to "true" will change the `NODE_ENV` default to "development" (if not explicitly set).

**`NPM_BUILD`**
Select an alternate / custom build command, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "build"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

**`NPM_RUN`**
Select an alternate / custom runtime mode, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "start"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

Expand Down
2 changes: 1 addition & 1 deletion 16-minimal/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ else

#do not fail when there is no build script
echo "---> Building in production mode"
npm run build --if-present
npm run ${NPM_BUILD:-build} --if-present

echo "---> Pruning the development dependencies"
npm prune
Expand Down
3 changes: 3 additions & 0 deletions 16/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ Application developers can use the following environment variables to configure
**`DEV_MODE`**
When set to "true", `nodemon` will be used to automatically reload the server while you work (default: "false"). Setting `DEV_MODE` to "true" will change the `NODE_ENV` default to "development" (if not explicitly set).

**`NPM_BUILD`**
Select an alternate / custom build command, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "build"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

**`NPM_RUN`**
Select an alternate / custom runtime mode, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "start"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

Expand Down
2 changes: 1 addition & 1 deletion 16/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ else

#do not fail when there is no build script
echo "---> Building in production mode"
npm run build --if-present
npm run ${NPM_BUILD:-build} --if-present

echo "---> Pruning the development dependencies"
npm prune
Expand Down
3 changes: 3 additions & 0 deletions 18-minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ Application developers can use the following environment variables to configure
**`DEV_MODE`**
When set to "true", `nodemon` will be used to automatically reload the server while you work (default: "false"). Setting `DEV_MODE` to "true" will change the `NODE_ENV` default to "development" (if not explicitly set).

**`NPM_BUILD`**
Select an alternate / custom build command, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "build"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

**`NPM_RUN`**
Select an alternate / custom runtime mode, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "start"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

Expand Down
2 changes: 1 addition & 1 deletion 18-minimal/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ else

#do not fail when there is no build script
echo "---> Building in production mode"
npm run build --if-present
npm run ${NPM_BUILD:-build} --if-present

echo "---> Pruning the development dependencies"
npm prune
Expand Down
3 changes: 3 additions & 0 deletions 18/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ Application developers can use the following environment variables to configure
**`DEV_MODE`**
When set to "true", `nodemon` will be used to automatically reload the server while you work (default: "false"). Setting `DEV_MODE` to "true" will change the `NODE_ENV` default to "development" (if not explicitly set).

**`NPM_BUILD`**
Select an alternate / custom build command, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "build"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

**`NPM_RUN`**
Select an alternate / custom runtime mode, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "start"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

Expand Down
2 changes: 1 addition & 1 deletion 18/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ else

#do not fail when there is no build script
echo "---> Building in production mode"
npm run build --if-present
npm run ${NPM_BUILD:-build} --if-present

echo "---> Pruning the development dependencies"
npm prune
Expand Down
3 changes: 3 additions & 0 deletions 20-minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ Application developers can use the following environment variables to configure
**`DEV_MODE`**
When set to "true", `nodemon` will be used to automatically reload the server while you work (default: "false"). Setting `DEV_MODE` to "true" will change the `NODE_ENV` default to "development" (if not explicitly set).

**`NPM_BUILD`**
Select an alternate / custom build command, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "build"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

**`NPM_RUN`**
Select an alternate / custom runtime mode, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "start"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

Expand Down
2 changes: 1 addition & 1 deletion 20-minimal/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ else

#do not fail when there is no build script
echo "---> Building in production mode"
npm run build --if-present
npm run ${NPM_BUILD:-build} --if-present

echo "---> Pruning the development dependencies"
npm prune
Expand Down
3 changes: 3 additions & 0 deletions 20/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ Application developers can use the following environment variables to configure
**`DEV_MODE`**
When set to "true", `nodemon` will be used to automatically reload the server while you work (default: "false"). Setting `DEV_MODE` to "true" will change the `NODE_ENV` default to "development" (if not explicitly set).

**`NPM_BUILD`**
Select an alternate / custom build command, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "build"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

**`NPM_RUN`**
Select an alternate / custom runtime mode, defined in your `package.json` file's [`scripts`](https://docs.npmjs.com/misc/scripts) section (default: npm run "start"). These user-defined run-scripts are unavailable while `DEV_MODE` is in use.

Expand Down
2 changes: 1 addition & 1 deletion 20/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ else

#do not fail when there is no build script
echo "---> Building in production mode"
npm run build --if-present
npm run ${NPM_BUILD:-build} --if-present

echo "---> Pruning the development dependencies"
npm prune
Expand Down

0 comments on commit ce1e482

Please sign in to comment.