
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@flatxph/environment
Advanced tools
This builder converts the dotenv to its equivalent environment.ts that can be used by the angular cli
This builder converts the dotenv to its equivalent environment.ts that can be used by the angular cli
This builder followed and improved on Angular CLI 6 under the hood — builders demystified. This also follows Step by step: Building and publishing an NPM Typescript package.
npm i -D @flatxph/environment
npm i -D dotenv
npm i -D @types/dotenv
"environment": {
"builder": "@flatxph/environment:file",
"options": {}
},
import { Environment } from './model';
export const environment: Environment = {
production: !!process.env.PRODUCTION || false,
maps: {
apiKey: process.env.MAPS_API_KEY,
libraries: process.env.MAPS_LIBRARIES ? process.env.MAPS_LIBRARIES.split(',') : [],
},
title: process.env.TITLE || '',
description: process.env.DESCRIPTION || '',
fbAppId: parseInt(process.env.FB_APP_ID, 10) || 0,
url: process.env.URL || '',
twitter: process.env.TWITTER || '',
image: process.env.IMAGE || '',
imageWidth: parseInt(process.env.IMAGE_WIDTH, 10) || 0,
imageHeight: parseInt(process.env.IMAGE_HEIGHT, 10) || 0,
appId: process.env.APP_ID || '',
};
ng run [relevant-project]:environment
Where [relevant-project] is the project to which you've added the target.gitignore for cleaner repository
...
/src/environments/*.js
/src/environments/*.js.map
package.json to automate the process
"scripts" {
...
"environment": "ng run [relevant-project]:environment",
"prestart": "npm environment",
...
}
src - path to the file with build environment, Defaults to src/environments/environment.build. The .ts part of the file should be omitted.dotenvConfigOptions - This is a DotenvConfigOption based on package @types/dotenv. Defaults to {}model - The model used as environment check. Typically named Environment. Defaults to nullmodelPath - This is the path of the model for the environment. Typically app/environments/model. Defaults to nulltemplate - This is the template file to use to render the environment. Defaults to nulloutput - This is the output file. Default to src/environments/environment.tsIf you want to create your own builder like this, to upload to npm, run yarn public to publish.
Sample Projects are provided in the examples directory.
FAQs
This builder converts the dotenv to its equivalent environment.ts that can be used by the angular cli
We found that @flatxph/environment demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.