Polymer CLI --env type global option from application - development-environment

There is a --env type global option available for polymer cli. I'm looking for way to use dev environment specific code that doesn't compile into production application. Is there a way to access --env type from application?
or any other workaround ?

Related

Is vue.config.js file executed on building or starting the Vue App?

I am using vue.config.js to inject configuration on App start.
It works on my dev machine, when I execute a vue-cli-service serve command.
As stated in docs, this command "starts a dev server".
I thought when my App is run inside a Docker pod, it would launch a similar command, but obviously, it is not the case because my configuration is not loaded.
So I may misunderstand the step where this file is used: building or starting?

vue cli, production built files but use develop env file

I am using vue 2 to build a firefox extension - the same codebase is also being used to build the chromium extensions.
I want to be able to build using the dev urls.. however when adding the develop flag to vue-cli, the output contains the usual webpack "eval"... which firefox doesn't support in extensions.
How can i use the .env.development values while ensuring the code output is no using eval with vue cli?
Related answer (2018) How to remove eval and Function constructor from webpack build to avoid CSP issues

Codeship with Testim.io - Am I testing my latest version?

Sorry for the dumb question but I could not find an answer for that.
Codeship + Testim.io + Heroku.
In my Staging env - I use Testim.io to test the app once it deployed.
The following tutorial is guiding me how to invoke my tests - but I see the tests are being invoked BEFORE the new app has been deployed - so isn't it testing one version before my latest?
I expected the tests to run after the deploy.
Probably I am missing here something.
In that tutorial - the tests aren't supposed to run against your deployed version they are supposed to run against the version being tested.
The flow is:
You set up a local environment - for example by checking out your code and running npm start. If it's containerized then do that.
You run the Testim CLI and point its base url to local how testim --token ... --project ... --suite ... --base-url=localhost:PORT.
After the tests pass, you deploy.
If you test the version after you deploy you can't be sure the version deployed actually passes your tests.
An alternative flow would be to lean into Heroku's deployment model. Note this isn't actually specific to them and there are similar alternatives in aws/azure/gcp/whatever:
In your CI, you set up a staging environment in heroku heroku create --remote staging-BRANCH-NAME-<COMMIT-NAME>
You deploy there.
You run the tests against that enviroment (by passing --base-url to the Testim CLI, navigating there in your test or using a config file)
When tests pass you deploy to master

Why ng e2e builds modules?

I used selenium webdriver before, in custom build project. It just opened web page of my project right away and immediately started running test cases. The only prerequisite was to start project server before launching it.
Now after creating generic project using 'ng new' I started it with 'ng serve'. Then I ran 'ng e2e' to test UI. It works, but for some reason it goes through whole module building thing again. It takes some time while I would like tests to start as fast as possible, and I know from my experience that it can be done.
The question: Can module building phase of ng e2e be omitted?
with the angular 6 and on --no-serve is not available anymore, so use instead:
ng e2e "--dev-server-target="
(yes empty value after the '=')
this will work if you have another window running an ng serve command.
Try with --no-serve option
ng e2e --no-serve

How to Serve an Aurelia.io app without using Gulp watch

How do you run an Aurelia app without running gulp watch and just going to localhost:9000. Ideally I would like to just run my nodejs server and it all just works without having to run a separate task (a gulp task).
I would like to build Aurelia and just start using it in the same way that I can with Durandal.
take a look at the Aurelia-Node Repo for a quick start. It uses ExpressJS to provide a simple REST api as well as static serve the Aurelia App.
You'd still need the Gulp task (inside public/app) to build your es6 modules etc. but the hosting then works from node itself, so gulp build should be enough.
EDIT:
The repo provides a gulpfile in the root as well. The big difference using this one is that it not only transpiles the frontend code but also browserSyncs the node application via nodemon. Again all of this is not necessary for final hosting. A normal node app.js would be enough. Gulp etc. is just used during the development process.
I download Aurelia repository from
https://github.com/aurelia/
And run project successfully via webstrom on different port not on localhost:9000 without "gulp watch" .
But I installed Aurelia dependency then started project on webstorm its run successfully.
Steps for run project without "gulp watch"...
Run given command on command line from project folder.
Install the Apps dependencies - **npm install**
Install JSPM dependencies - **jspm install -y**
Install Gulp - **npm install gulp**
then explore your index.html page on chrome. Make sure you running Aurelia in Chrome, IE and Firefox.
I tested Aurelia application in Chrome, IE , Safari and Firefox result
Chrome - Pass
IE - Pass
Firefox - Pass
Safari - Fail
But in safari that was fail.