Installations
npm install ng-extra-build
Developer Guide
Typescript
No
Module System
N/A
Node Version
10.16.0
NPM Version
6.9.0
Score
44.9
Supply Chain
89.7
Quality
66.4
Maintenance
40
Vulnerability
92.3
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (99.8%)
CSS (0.2%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
quenice
Download Statistics
Total Downloads
6,449
Last Day
1
Last Week
1
Last Month
28
Last Year
235
GitHub Statistics
1 Stars
20 Commits
9 Branches
1 Contributors
Updated on Jul 26, 2019
Package Meta Information
Latest Version
1.4.0
Package Id
ng-extra-build@1.4.0
Unpacked Size
22.34 kB
Size
5.87 kB
File Count
15
NPM Version
6.9.0
Node Version
10.16.0
Total Downloads
Cumulative downloads
Total Downloads
6,449
Last Day
-50%
1
Compared to previous day
Last Week
-80%
1
Compared to previous week
Last Month
16.7%
28
Compared to previous month
Last Year
-24.9%
235
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
ng-extra-build
ng-extra-build
is a build tool for angular-cli
, you can use this for extra building tasks that angular-cli
can't do, especially for multi-environment.
Features
- Copy resources for the specified environment.
- Compile and compress
css
file for the specified environment. - Merge
i18n
files for the specified environment. - Replace contents in final packaged file for the specified environment.
- Delete files
- Compress files
Getting Started
Installation
npm install ng-extra-build --save-dev
Usage
Configuration
After ng-extra-build
installation is completed, you can find a configuration file named build.conf.json
in $your_project_dir
, you should modify this file as your requirements. See Configuration Reference.
Command
Append below command after angular-cli
build command:
ng-extra-build -env=envName -config=config-file-path
For example, if neware
is one of your envoriment name, add below json content in $Your_project_dir/package.json
:
1{ 2 ... 3 "scripts": { 4 "ng": "ng", 5 "start": "ng serve", 6 "neware": "ng build -prod -sm=false -aot -e neware && ng-extra-build -env=neware" 7 }, 8 ... 9}
And then execute command
npm run neware
to build application for production.
Command Arguments
Argument | Required | Default | Description |
---|---|---|---|
-env | true | null | Envrionment name |
-config | false | build.conf.json | Configuration file path. The file path is relative to current working direction (same as path.cwd() in nodejs ) |
Configuration Reference
-
base (
object
): The base config.- outDir (
string
): The output directory for build results.This value must set be same asoutDir
in Angular CLI.
- outDir (
-
copy (
array
): Copy resources intooutDir
.- from (
string
): Source file which will be copied. - to (
string
): Destination file which will be copied to.
- from (
-
css (
object
): Css compile options.- from (
string
): Source css file. - to (
string
): Destination css file. - devUrl (
string
): The csshref
in tag<link>
inindex.html
for the development environment.After build, will replace thishref
with production environmenthref
.
- from (
-
i18n (
object
): Build options for i18n files- source (
string
): Directory of source i18n files - extra (
string
): Directory of extra i18n files - target (
string
): Directory of target i18n files
- source (
-
replacement (
array
): Replacement configurations- file (
string
): The file (path) you want to execute the replacement. - contents (
array
): Contents you want to replace.- replace (
string
): Contents you want to replace. - with (
string
): Contents you want to replace with - withEnv (
object
): Contents you want to replace with for the specified environment. key is environment name, value is corresponding content you want to replace with.
- replace (
- file (
-
deletion (
array
): Files you want to delete. -
compression (
object
): Compression configurations.
Example Configuration File
1{ 2 "$schema": "./node_modules/ng-extra-build/schema.json", 3 "base": { 4 "outDir": "dist" 5 }, 6 "copy": [ 7 { 8 "from": "$root/src/env/$env/favicon.ico", 9 "to": "$dist/favicon.ico" 10 } 11 ], 12 "css": { 13 "from": "$root/src/env/$env/css/theme.css", 14 "to": "$dist/assets/css", 15 "devUrl": "env/neware/css/theme.css" 16 }, 17 "i18n": { 18 "source": "$root/src/assets/i18n", 19 "extra": "$root/src/env/$env/i18n", 20 "target": "$dist/assets/i18n" 21 }, 22 "replacement": [ 23 { 24 "file": "$dist/index.html", 25 "contents": [ 26 { 27 "replace": "Neware Club", 28 "withEnv": { 29 "neware": "Neware RSP", 30 "joy": "Joytele RSP" 31 } 32 } 33 ] 34 } 35 ], 36 "deletion": [ 37 "$dist/env" 38 ], 39 "compression": { 40 "from": "$dist", 41 "to": "$root" 42 } 43} 44

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/20 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
26 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-pp7h-53gx-mx7r
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-9v62-24cr-58cx
- Warn: Project is vulnerable to: GHSA-r8f7-9pfq-mjmv
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-7mwh-4pqv-wmr8
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
1.3
/10
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More