Comments (6)
No need to apologize, thanks to you I just discovered that they replaced --env
by --configuration
, among other breaking changes in angular-cli 6 that were not documented 😞
So I need to change the flag in ngx-script too, I'll push a fix ASAP
from scripts.
I just published version 3.0.0
to NPM, so you just have to npm i ngx-scripts@latest
in your project 😉
Had to make it a major version bump since I changed the --env
option to --configuration
to match angular/cli new behavior.
from scripts.
@enhendrickson Angular CLI changed the way it works, the --configuration
flag does not behave the same as the previous --environment
flag: it now selects a whole build configuration defined in angular.json
, not just the environment file.
And by default you have one for production
, but not for dev, so you have 2 options here:
-
use the
--dev
flag of ngx-scripts that bascially set the--prod=false
flag on Angular CLI, ie:ngx-scripts cordova build --dev --device --debug
, but it will also disable minifications and code optiomization beside changing the environment -
create a new
dev
configuration inangular.json
that extends the existingproduction
one but with a different enviromnent file, and then your command will work.
Yes, that's a lot of bother for something that just used to work 😞
from scripts.
Oh, okay... I wondered if that was it... thanks. When you push, would I need to pull from Github or will an npm update grab it?
from scripts.
This should work, right?
ngx-scripts cordova build --device --debug -- --configuration=dev
It doesn't. It still uses production.
from scripts.
@sinedied thanks for the awesome explanation!!
from scripts.
Related Issues (8)
- env script shouldn't use default export apparently HOT 5
- output from env script not compiling with Angular 8.2.1 HOT 2
- How can i use the cordova scripts with an angular workspace with multiple projects HOT 2
- Failed to exec env script HOT 1
- "npm run env -s" doesn't create .env file HOT 1
- Can't Include --target="iPad Air 2" (or similar) HOT 7
- env should allow undefined environment variables and pass them along as falsy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scripts.