This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const oldSelectedList = [ | |
| {id: 1, name: 'apple', serverAttribute1: 'some value', serverAttribute2: 'some value'}, | |
| {id: 2, name: 'orange', serverAttribute1: 'some value', serverAttribute2: 'some value'} | |
| ]; | |
| const newlySelectedList = [ | |
| {id: 3, name: 'grape'}, | |
| {id: 2, name: 'orange'} | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let _ = require('lodash'); | |
| const unionList = _.unionWith(oldSelectedList, newlySelectedList, (o, n) => o.id === n.id); | |
| const finalList = _.intersectionWith(unionList, newlySelectedList, (u, n) => u.id === n.id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let _ = require('lodash'); | |
| const finalList = _.chain(oldSelectedList) | |
| .unionWith(newlySelectedList, (o, n) => o.id === n.id) | |
| .intersectionWith(newlySelectedList, (u, n) => u.id === n.id) | |
| .value(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| # Host Database | |
| # | |
| # localhost is used to configure the loopback interface | |
| # when the system is booting. Do not change this entry. | |
| ## | |
| 127.0.0.1 localhost | |
| 255.255.255.255 broadcasthost | |
| ::1 localhost | |
| # Add your domain name here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "angular-with-ci-cd", | |
| "version": "0.0.0", | |
| "scripts": { | |
| "ng": "ng", | |
| "start": "ng serve", | |
| "build": "ng build", | |
| "test": "ng test", | |
| "lint": "ng lint", | |
| "e2e": "ng e2e" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| language: node_js | |
| node_js: | |
| - "10.4.1" | |
| sudo: true | |
| addons: | |
| chrome: stable | |
| branches: | |
| only: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| capabilities: { | |
| chromeOptions: { | |
| args: [ "--headless" ] | |
| }, | |
| 'browserName': 'chrome' | |
| }, | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "angular-with-ci-cd", | |
| "version": "0.0.0", | |
| "scripts": { | |
| "ng": "ng", | |
| "start": "ng serve", | |
| "build": "ng build", | |
| "test": "ng test", | |
| "lint": "ng lint", | |
| "e2e": "ng e2e", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| script: | |
| - yarn all_tests #Uses yarn to run our custom script all_tests | |
| - yarn build --prod --base-href $base_href |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| script: | |
| - yarn lint | |
| - ng test --watch false --browsers ChromeHeadless | |
| - ng e2e --protractor-config='e2e/protractor.ci.conf.js' | |
| - yarn build --prod --base-href $base_href | |