Skip to content

Instantly share code, notes, and snippets.

@michaelilyin
Created March 29, 2018 09:46
Show Gist options
  • Save michaelilyin/f2cb01ab391a5994d83c114e6d2e6792 to your computer and use it in GitHub Desktop.
Save michaelilyin/f2cb01ab391a5994d83c114e6d2e6792 to your computer and use it in GitHub Desktop.
Angular configs
image: weboaks/node-karma-protractor-chrome:xvfb
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- node_modules/
before_script:
- npm install
stages:
- lint
- spec
- e2e
- build
lint:
stage: lint
tags:
- runner-tag
script: npm run lint
spec:
stage: spec
tags:
- runner-tag
before_script:
- export DISPLAY=:99.0
- node ./node_modules/.bin/webdriver-manager update
script: npm run test:ci
artifacts:
paths:
- coverage/
e2e:
stage: e2e
tags:
- runner-tag
before_script:
- export DISPLAY=:99.0
- node ./node_modules/.bin/webdriver-manager update
script: npm run e2e
build:
stage: build
tags:
- runner-tag
script: npm run build
artifacts:
paths:
- dist/
const PROXY_CONFIG = {
"/api/*": {
"target": "http://localhost:8080",
"secure": false,
"changeOrigin": true
},
"logLevel": "debug"
};
module.exports = PROXY_CONFIG;
"scripts": {
"ng": "./node_modules/.bin/ng",
"start": "./node_modules/.bin/ng serve -host 0.0.0.0 ",
"start:prod": "./node_modules/.bin/ng serve --prod --env=dev -host 0.0.0.0 ",
"start:proxy": "./node_modules/.bin/ng serve --proxy-config backend-local-proxy.conf.js --env=prod -host 0.0.0.0 ",
"start:proxy:prod": "./node_modules/.bin/ng serve --prod --proxy-config backend-local-proxy.conf.js -host 0.0.0.0 ",
"build": "./node_modules/.bin/ng build --prod",
"test": "./node_modules/.bin/ng test --code-coverage",
"test:ci": "./node_modules/.bin/ng test --single-run true -w false --code-coverage",
"lint": "./node_modules/.bin/ng lint",
"e2e": "./node_modules/.bin/ng e2e"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment