Skip to content

Commit

Permalink
Merge pull request #15 from worktile/why520crazy/assets-loader-helper…
Browse files Browse the repository at this point in the history
…s-test

test(travis): add .travis.yml for test script
  • Loading branch information
walkerkay authored Sep 10, 2019
2 parents 468d7e2 + 77f2418 commit 19bbf8a
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 30 deletions.
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
dist: trusty
sudo: false

language: node_js
node_js:
- 10.16.0

addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable

cache:
directories:
- ./node_modules

install:
- npm install

script:
- npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# ngx-planet
# ngx-planet [![Build Status](https://travis-ci.org/worktile/ngx-planet.svg?branch=master)](https://travis-ci.org/worktile/ngx-planet)

An Angular 7+ Micro Frontend library.

## Installation

```
npm i @worktile/planet --save
```
Expand All @@ -13,6 +15,7 @@ npm i @worktile/planet --save
## Usage

### 1. Loading the module in the portal app module

```
import { NgxPlanetModule } from '@worktile/planet';
Expand All @@ -24,7 +27,9 @@ import { NgxPlanetModule } from '@worktile/planet';
})
class AppModule {}
```
### 2. Register Applications to planet use Planet Service in portal app

### 2. Register Applications to planet use Planet Service in portal app

```
@Component({
selector: 'app-portal-root',
Expand Down Expand Up @@ -102,7 +107,9 @@ export class AppComponent implements OnInit {
}
}
```

### 3. Sub Apps define app to bootstrap app module

```
defineApplication('app1', (portalApp: PlanetPortalApplication) => {
return platformBrowserDynamic([
Expand All @@ -129,7 +136,7 @@ npm run serve:portal // 3000
npm run serve:app1 // 3001
npm run serve:app2 // 3002
or
or
npm start
```
Expand Down
60 changes: 33 additions & 27 deletions packages/planet/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
customLaunchers: {
ChromeHeadlessCI: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
}
});
};

0 comments on commit 19bbf8a

Please sign in to comment.