├── LICENSE
├── README.md
├── build_widgets.sh
├── dashboard.gif
├── dashboard
├── .angular-cli.json
├── .editorconfig
├── .gitignore
├── README.md
├── e2e
│ ├── app.e2e-spec.ts
│ ├── app.po.ts
│ └── tsconfig.e2e.json
├── karma.conf.js
├── package.json
├── protractor.conf.js
├── proxy.conf.json
├── src
│ ├── app
│ │ ├── app.component.css
│ │ ├── app.component.html
│ │ ├── app.component.ts
│ │ ├── app.module.ts
│ │ └── dashboard
│ │ │ ├── dashboard.module.ts
│ │ │ ├── dashboard.service.ts
│ │ │ ├── dashboard
│ │ │ ├── dashboard.component.css
│ │ │ ├── dashboard.component.html
│ │ │ └── dashboard.component.ts
│ │ │ └── widget-config.model.ts
│ ├── assets
│ │ └── .gitkeep
│ ├── environments
│ │ ├── environment.prod.ts
│ │ └── environment.ts
│ ├── favicon.ico
│ ├── index.html
│ ├── main.ts
│ ├── polyfills.ts
│ ├── styles.css
│ ├── test.ts
│ ├── tsconfig.app.json
│ ├── tsconfig.spec.json
│ └── typings.d.ts
├── tsconfig.json
├── tslint.json
└── yarn.lock
├── widget-hello
├── .gitignore
├── package.json
├── rollup.config.js
├── src
│ ├── main.ts
│ └── widget-hello
│ │ ├── a-nested.component.ts
│ │ ├── widget-hello.component.ts
│ │ └── widget-hello.module.ts
├── tsconfig.json
└── yarn.lock
├── widget-quotes
├── .gitignore
├── package.json
├── rollup.config.js
├── src
│ ├── main.ts
│ └── widget-quotes
│ │ ├── quotes.model.ts
│ │ ├── quotes.service.ts
│ │ ├── widget-quotes.component.ts
│ │ └── widget-quotes.module.ts
├── tsconfig.json
└── yarn.lock
├── widget-todays-date
├── .gitignore
├── package.json
├── rollup.config.js
├── src
│ ├── main.ts
│ └── widget-todays-date
│ │ ├── widget-todays-date.component.ts
│ │ └── widget-todays-date.module.ts
├── tsconfig.json
└── yarn.lock
└── widgets-repo
├── .gitignore
├── package.json
├── widgets
├── widget-hello.bundle.js
├── widget-quotes.bundle.js
├── widget-todays-date.bundle.js
└── widgets.config.json
└── yarn.lock
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Paulo Clavijo
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # angular-pluggable-architecture
2 | This is the code example for my article [Angular pluggable architecture?](https://paucls.wordpress.com/2018/05/10/angular-pluggable-architecture/), an Angular application that allows to dynamically plug functionality.
3 |
4 | The application is a simple Dashboard with Widgets that are loaded
5 | at runtime from external sources.
6 |
7 | 
8 |
9 | This repo contains:
10 | - dahboard - An Angular CLI project that provides a widgets dashboard. To keep it simple all the logic in charge of dinamically fetching and compilings widgets is in the `dashboard.component.ts`.
11 | - widgets-repo - External repository from where the widgets configuration and bundles are served. (for this demo it is only static content served via http-server).
12 | - wiget-hello - An example of widget component containing nested sub-components.
13 | - wiget-quotes - An example of widget component that uses a service to retrieve quotes from an API.
14 | - widget-todays-date - Another widget component.
15 |
16 | ## Running the demo
17 | - Build all widgets
18 | ```
19 | ./build_widgets.sh
20 | ```
21 | - Start the widgets-repo
22 | ```
23 | cd widgets-repo && yarn start
24 | ```
25 | - Start dashboard app
26 | ```
27 | cd dashboard && yarn start
28 | ```
29 |
30 | ## To do
31 | - Support production build with AOT.
32 | - Widgets with separated template and css files should be compiled and inlined during the bundle build. Configure rollup to do that or use ng-packagr.
33 |
34 | ## References
35 | - Developing with Angular, Denys Vuika.
36 | https://github.com/DenisVuyka/developing-with-angular/tree/master/angular/plugins
37 | - As busy as a bee — lazy loading in the Angular CLI, David Herges
38 | https://blog.angularindepth.com/as-busy-as-a-bee-lazy-loading-in-the-angular-cli-d2812141637f
39 | ... how does lazy loading in the Angular CLI work under the hood?
40 | - How to load dynamic external components into Angular application?
41 | https://stackoverflow.com/questions/45503497/how-to-load-dynamic-external-components-into-angular-application/45506470#45506470
42 | - Here is what you need to know about dynamic components in Angular, Maxim Koretskyi
43 | https://blog.angularindepth.com/here-is-what-you-need-to-know-about-dynamic-components-in-angular-ac1e96167f9e
44 | - Modules are not what you think they are, Maxim Koretskyi
45 | https://youtu.be/pERhnBBae2k
46 | - Extension mechanism demo
47 | https://github.com/maximusk/extension-mechanism-demo
48 | - JIT Complier needed with AOT Build for Dynamic Component.
49 | https://github.com/angular/angular/issues/20875
50 |
--------------------------------------------------------------------------------
/build_widgets.sh:
--------------------------------------------------------------------------------
1 | cd ./widget-hello
2 | yarn install
3 | yarn build
4 | cp dist/widget-hello.bundle.js ../widgets-repo/widgets/
5 | cd ..
6 |
7 | cd ./widget-todays-date
8 | yarn install
9 | yarn build
10 | cp dist/widget-todays-date.bundle.js ../widgets-repo/widgets/
11 | cd ..
12 |
13 | cd ./widget-quotes
14 | yarn install
15 | yarn build
16 | cp dist/widget-quotes.bundle.js ../widgets-repo/widgets/
17 | cd ..
18 |
--------------------------------------------------------------------------------
/dashboard.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paucls/angular-pluggable-architecture/de28bf8e02819a5f830117792c2b920280a50d6e/dashboard.gif
--------------------------------------------------------------------------------
/dashboard/.angular-cli.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "project": {
4 | "name": "dashboard"
5 | },
6 | "apps": [
7 | {
8 | "root": "src",
9 | "outDir": "dist",
10 | "assets": [
11 | "assets",
12 | "favicon.ico"
13 | ],
14 | "index": "index.html",
15 | "main": "main.ts",
16 | "polyfills": "polyfills.ts",
17 | "test": "test.ts",
18 | "tsconfig": "tsconfig.app.json",
19 | "testTsconfig": "tsconfig.spec.json",
20 | "prefix": "app",
21 | "styles": [
22 | "../node_modules/@clr/ui/clr-ui.min.css",
23 | "styles.css"
24 | ],
25 | "scripts": [
26 | "../node_modules/systemjs/dist/system.js"
27 | ],
28 | "environmentSource": "environments/environment.ts",
29 | "environments": {
30 | "dev": "environments/environment.ts",
31 | "prod": "environments/environment.prod.ts"
32 | }
33 | }
34 | ],
35 | "e2e": {
36 | "protractor": {
37 | "config": "./protractor.conf.js"
38 | }
39 | },
40 | "lint": [
41 | {
42 | "project": "src/tsconfig.app.json",
43 | "exclude": "**/node_modules/**"
44 | },
45 | {
46 | "project": "src/tsconfig.spec.json",
47 | "exclude": "**/node_modules/**"
48 | },
49 | {
50 | "project": "e2e/tsconfig.e2e.json",
51 | "exclude": "**/node_modules/**"
52 | }
53 | ],
54 | "test": {
55 | "karma": {
56 | "config": "./karma.conf.js"
57 | }
58 | },
59 | "defaults": {
60 | "styleExt": "css",
61 | "component": {}
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/dashboard/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/dashboard/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /dist-server
6 | /tmp
7 | /out-tsc
8 |
9 | # dependencies
10 | /node_modules
11 |
12 | # IDEs and editors
13 | /.idea
14 | .project
15 | .classpath
16 | .c9/
17 | *.launch
18 | .settings/
19 | *.sublime-workspace
20 |
21 | # IDE - VSCode
22 | .vscode/*
23 | !.vscode/settings.json
24 | !.vscode/tasks.json
25 | !.vscode/launch.json
26 | !.vscode/extensions.json
27 |
28 | # misc
29 | /.sass-cache
30 | /connect.lock
31 | /coverage
32 | /libpeerconnection.log
33 | npm-debug.log
34 | yarn-error.log
35 | testem.log
36 | /typings
37 |
38 | # e2e
39 | /e2e/*.js
40 | /e2e/*.map
41 |
42 | # System Files
43 | .DS_Store
44 | Thumbs.db
45 |
--------------------------------------------------------------------------------
/dashboard/README.md:
--------------------------------------------------------------------------------
1 | # Dashboard
2 |
3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.4.
4 |
5 | ## Development server
6 |
7 | Run `yarn start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8 |
--------------------------------------------------------------------------------
/dashboard/e2e/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { AppPage } from './app.po';
2 |
3 | describe('dashboard App', () => {
4 | let page: AppPage;
5 |
6 | beforeEach(() => {
7 | page = new AppPage();
8 | });
9 |
10 | it('should display welcome message', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('Welcome to app!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/dashboard/e2e/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class AppPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/dashboard/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "baseUrl": "./",
6 | "module": "commonjs",
7 | "target": "es5",
8 | "types": [
9 | "jasmine",
10 | "jasminewd2",
11 | "node"
12 | ]
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/dashboard/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/1.0/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular/cli'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-jasmine-html-reporter'),
12 | require('karma-coverage-istanbul-reporter'),
13 | require('@angular/cli/plugins/karma')
14 | ],
15 | client:{
16 | clearContext: false // leave Jasmine Spec Runner output visible in browser
17 | },
18 | coverageIstanbulReporter: {
19 | reports: [ 'html', 'lcovonly' ],
20 | fixWebpackSourcePaths: true
21 | },
22 | angularCli: {
23 | environment: 'dev'
24 | },
25 | reporters: ['progress', 'kjhtml'],
26 | port: 9876,
27 | colors: true,
28 | logLevel: config.LOG_INFO,
29 | autoWatch: true,
30 | browsers: ['Chrome'],
31 | singleRun: false
32 | });
33 | };
34 |
--------------------------------------------------------------------------------
/dashboard/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dashboard",
3 | "version": "0.0.0",
4 | "license": "MIT",
5 | "scripts": {
6 | "ng": "ng",
7 | "start": "ng serve --aot=true --proxy-config proxy.conf.json",
8 | "build": "ng build --prod --aot=false",
9 | "test": "ng test",
10 | "lint": "ng lint",
11 | "e2e": "ng e2e"
12 | },
13 | "private": true,
14 | "dependencies": {
15 | "@angular/animations": "^5.2.0",
16 | "@angular/common": "^5.2.0",
17 | "@angular/compiler": "^5.2.0",
18 | "@angular/core": "^5.2.0",
19 | "@angular/forms": "^5.2.0",
20 | "@angular/http": "^5.2.0",
21 | "@angular/platform-browser": "^5.2.0",
22 | "@angular/platform-browser-dynamic": "^5.2.0",
23 | "@angular/router": "^5.2.0",
24 | "@clr/ui": "^0.11.15",
25 | "core-js": "^2.4.1",
26 | "rxjs": "^5.5.6",
27 | "systemjs": "^0.21.3",
28 | "zone.js": "^0.8.19"
29 | },
30 | "devDependencies": {
31 | "@angular/cli": "~1.7.4",
32 | "@angular/compiler-cli": "^5.2.0",
33 | "@angular/language-service": "^5.2.0",
34 | "@types/jasmine": "~2.8.3",
35 | "@types/jasminewd2": "~2.0.2",
36 | "@types/node": "~6.0.60",
37 | "@types/systemjs": "^0.20.6",
38 | "codelyzer": "^4.0.1",
39 | "jasmine-core": "~2.8.0",
40 | "jasmine-spec-reporter": "~4.2.1",
41 | "karma": "~2.0.0",
42 | "karma-chrome-launcher": "~2.2.0",
43 | "karma-coverage-istanbul-reporter": "^1.2.1",
44 | "karma-jasmine": "~1.1.0",
45 | "karma-jasmine-html-reporter": "^0.2.2",
46 | "protractor": "~5.1.2",
47 | "ts-node": "~4.1.0",
48 | "tslint": "~5.9.1",
49 | "typescript": "~2.5.3"
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/dashboard/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './e2e/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: 'e2e/tsconfig.e2e.json'
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/dashboard/proxy.conf.json:
--------------------------------------------------------------------------------
1 | {
2 | "/widgets-repo/*": {
3 | "target": "http://localhost:4201",
4 | "secure": false,
5 | "pathRewrite": {
6 | "^/widgets-repo": ""
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/dashboard/src/app/app.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paucls/angular-pluggable-architecture/de28bf8e02819a5f830117792c2b920280a50d6e/dashboard/src/app/app.component.css
--------------------------------------------------------------------------------
/dashboard/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/dashboard/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {}
9 |
--------------------------------------------------------------------------------
/dashboard/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { NgModule } from '@angular/core';
3 | import { HttpClientModule } from '@angular/common/http';
4 |
5 | import { COMPILER_OPTIONS, CompilerFactory, Compiler } from '@angular/core';
6 | import { JitCompilerFactory } from '@angular/platform-browser-dynamic';
7 |
8 | import { AppComponent } from './app.component';
9 | import { DashboardModule } from './dashboard/dashboard.module';
10 |
11 | export function createCompiler(fn: CompilerFactory): Compiler {
12 | return fn.createCompiler();
13 | }
14 |
15 | @NgModule({
16 | declarations: [
17 | AppComponent
18 | ],
19 | imports: [
20 | BrowserModule,
21 | HttpClientModule,
22 | DashboardModule
23 | ],
24 | providers: [
25 | {
26 | provide: COMPILER_OPTIONS,
27 | useValue: {},
28 | multi: true
29 | },
30 | {
31 | provide: CompilerFactory,
32 | useClass: JitCompilerFactory,
33 | deps: [COMPILER_OPTIONS]
34 | },
35 | {
36 | provide: Compiler,
37 | useFactory: createCompiler,
38 | deps: [CompilerFactory]
39 | }
40 | ],
41 | bootstrap: [AppComponent]
42 | })
43 | export class AppModule { }
44 |
--------------------------------------------------------------------------------
/dashboard/src/app/dashboard/dashboard.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { DashboardComponent } from './dashboard/dashboard.component';
4 | import { DashboardService } from './dashboard.service';
5 |
6 | @NgModule({
7 | imports: [CommonModule],
8 | declarations: [DashboardComponent],
9 | providers: [DashboardService],
10 | exports: [DashboardComponent]
11 | })
12 | export class DashboardModule { }
13 |
--------------------------------------------------------------------------------
/dashboard/src/app/dashboard/dashboard.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { HttpClient } from '@angular/common/http';
3 | import { Observable } from 'rxjs/Observable';
4 | import { WidgetConfig } from './widget-config.model';
5 |
6 | @Injectable()
7 | export class DashboardService {
8 |
9 | constructor(private http: HttpClient) { }
10 |
11 | private readonly url = 'widgets-repo/widgets.config.json';
12 |
13 | getWidgetConfigs(): Observable {
14 | return this.http.get(this.url);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/dashboard/src/app/dashboard/dashboard/dashboard.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paucls/angular-pluggable-architecture/de28bf8e02819a5f830117792c2b920280a50d6e/dashboard/src/app/dashboard/dashboard/dashboard.component.css
--------------------------------------------------------------------------------
/dashboard/src/app/dashboard/dashboard/dashboard.component.html:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/dashboard/src/app/dashboard/dashboard/dashboard.component.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Set existing vendor modules into SystemJS registry.
3 | * This way SystemJS won't make HTTP requests to fetch imported modules
4 | * needed by the dynamicaly loaded Widgets.
5 | */
6 | import { System } from 'systemjs';
7 | declare const SystemJS: System;
8 |
9 | import * as angularCore from '@angular/core';
10 | import * as angularCommon from '@angular/common';
11 | import * as angularCommonHttp from '@angular/common/http';
12 | import * as angularForms from '@angular/forms';
13 | import * as angularAnimations from '@angular/animations';
14 | import * as angularPlatformBrowser from '@angular/platform-browser';
15 | import * as angularPlatformBrowserDynamic from '@angular/platform-browser-dynamic';
16 |
17 | SystemJS.set('@angular/core', SystemJS.newModule(angularCore));
18 | SystemJS.set('@angular/common', SystemJS.newModule(angularCommon));
19 | SystemJS.set('@angular/common/http', SystemJS.newModule(angularCommonHttp));
20 | SystemJS.set('@angular/forms', SystemJS.newModule(angularForms));
21 | SystemJS.set('@angular/animations', SystemJS.newModule(angularAnimations));
22 | SystemJS.set('@angular/platform-browser', SystemJS.newModule(angularPlatformBrowser));
23 | SystemJS.set('@angular/platform-browser-dynamic', SystemJS.newModule(angularPlatformBrowserDynamic));
24 |
25 | SystemJS.config({ meta: { '*': { authorization: true } } });
26 | /** --------- */
27 |
28 | import { AfterViewInit, Component, Compiler, Injector, OnInit, ViewChild, ViewContainerRef } from '@angular/core';
29 | import { DashboardService } from '../dashboard.service';
30 | import { WidgetConfig } from '../widget-config.model';
31 |
32 | @Component({
33 | selector: 'app-dashboard',
34 | templateUrl: './dashboard.component.html',
35 | styleUrls: ['./dashboard.component.css']
36 | })
37 | export class DashboardComponent implements AfterViewInit {
38 |
39 | @ViewChild('content', { read: ViewContainerRef }) content: ViewContainerRef;
40 |
41 | constructor(private compiler: Compiler, private dashboardService: DashboardService,
42 | private injector: Injector) { }
43 |
44 | ngAfterViewInit() {
45 | this.loadWidgets();
46 | }
47 |
48 | private async loadWidgets() {
49 | const widgets = await this.dashboardService.getWidgetConfigs().toPromise();
50 | widgets.forEach((widget) => this.createWidget(widget));
51 | }
52 |
53 | private async createWidget(widget: WidgetConfig) {
54 | // import external module bundle
55 | console.log(`Importing module bundle: ${widget.moduleBundlePath}`);
56 | const module = await SystemJS.import(widget.moduleBundlePath);
57 |
58 | // compile module
59 | const moduleFactory = await this.compiler.compileModuleAsync(module[widget.moduleName]);
60 |
61 | // resolve component factory
62 | const moduleRef = moduleFactory.create(this.injector);
63 | const componentProvider = moduleRef.injector.get(widget.name);
64 | const componentFactory = moduleRef.componentFactoryResolver.resolveComponentFactory(componentProvider);
65 |
66 | // compile component
67 | console.log(`Creating widget: ${widget.name}`);
68 | this.content.createComponent(componentFactory);
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/dashboard/src/app/dashboard/widget-config.model.ts:
--------------------------------------------------------------------------------
1 | export interface WidgetConfig {
2 | name: string;
3 | moduleBundlePath: string;
4 | moduleName: string;
5 | }
6 |
--------------------------------------------------------------------------------
/dashboard/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paucls/angular-pluggable-architecture/de28bf8e02819a5f830117792c2b920280a50d6e/dashboard/src/assets/.gitkeep
--------------------------------------------------------------------------------
/dashboard/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/dashboard/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/dashboard/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paucls/angular-pluggable-architecture/de28bf8e02819a5f830117792c2b920280a50d6e/dashboard/src/favicon.ico
--------------------------------------------------------------------------------
/dashboard/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Dashboard
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/dashboard/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/dashboard/src/polyfills.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * This file includes polyfills needed by Angular and is loaded before the app.
3 | * You can add your own extra polyfills to this file.
4 | *
5 | * This file is divided into 2 sections:
6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8 | * file.
9 | *
10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13 | *
14 | * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15 | */
16 |
17 | /***************************************************************************************************
18 | * BROWSER POLYFILLS
19 | */
20 |
21 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/
22 | // import 'core-js/es6/symbol';
23 | // import 'core-js/es6/object';
24 | // import 'core-js/es6/function';
25 | // import 'core-js/es6/parse-int';
26 | // import 'core-js/es6/parse-float';
27 | // import 'core-js/es6/number';
28 | // import 'core-js/es6/math';
29 | // import 'core-js/es6/string';
30 | // import 'core-js/es6/date';
31 | // import 'core-js/es6/array';
32 | // import 'core-js/es6/regexp';
33 | // import 'core-js/es6/map';
34 | // import 'core-js/es6/weak-map';
35 | // import 'core-js/es6/set';
36 |
37 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */
38 | // import 'classlist.js'; // Run `npm install --save classlist.js`.
39 |
40 | /** IE10 and IE11 requires the following for the Reflect API. */
41 | // import 'core-js/es6/reflect';
42 |
43 |
44 | /** Evergreen browsers require these. **/
45 | // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
46 | import 'core-js/es7/reflect';
47 |
48 |
49 | /**
50 | * Required to support Web Animations `@angular/platform-browser/animations`.
51 | * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
52 | **/
53 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
54 |
55 | /**
56 | * By default, zone.js will patch all possible macroTask and DomEvents
57 | * user can disable parts of macroTask/DomEvents patch by setting following flags
58 | */
59 |
60 | // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
61 | // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
62 | // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
63 |
64 | /*
65 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
66 | * with the following flag, it will bypass `zone.js` patch for IE/Edge
67 | */
68 | // (window as any).__Zone_enable_cross_context_check = true;
69 |
70 | /***************************************************************************************************
71 | * Zone JS is required by default for Angular itself.
72 | */
73 | import 'zone.js/dist/zone'; // Included with Angular CLI.
74 |
75 |
76 |
77 | /***************************************************************************************************
78 | * APPLICATION IMPORTS
79 | */
80 |
--------------------------------------------------------------------------------
/dashboard/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/dashboard/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/zone-testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: any;
11 |
12 | // First, initialize the Angular testing environment.
13 | getTestBed().initTestEnvironment(
14 | BrowserDynamicTestingModule,
15 | platformBrowserDynamicTesting()
16 | );
17 | // Then we find all the tests.
18 | const context = require.context('./', true, /\.spec\.ts$/);
19 | // And load the modules.
20 | context.keys().map(context);
21 |
--------------------------------------------------------------------------------
/dashboard/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "baseUrl": "./",
6 | "module": "es2015",
7 | "types": []
8 | },
9 | "exclude": [
10 | "test.ts",
11 | "**/*.spec.ts"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/dashboard/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "baseUrl": "./",
6 | "module": "commonjs",
7 | "types": [
8 | "jasmine",
9 | "node"
10 | ]
11 | },
12 | "files": [
13 | "test.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/dashboard/src/typings.d.ts:
--------------------------------------------------------------------------------
1 | /* SystemJS module definition */
2 | declare var module: NodeModule;
3 | interface NodeModule {
4 | id: string;
5 | }
6 |
--------------------------------------------------------------------------------
/dashboard/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "outDir": "./dist/out-tsc",
5 | "sourceMap": true,
6 | "declaration": false,
7 | "moduleResolution": "node",
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "target": "es5",
11 | "typeRoots": [
12 | "node_modules/@types"
13 | ],
14 | "lib": [
15 | "es2017",
16 | "dom"
17 | ]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/dashboard/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rulesDirectory": [
3 | "node_modules/codelyzer"
4 | ],
5 | "rules": {
6 | "arrow-return-shorthand": true,
7 | "callable-types": true,
8 | "class-name": true,
9 | "comment-format": [
10 | true,
11 | "check-space"
12 | ],
13 | "curly": true,
14 | "deprecation": {
15 | "severity": "warn"
16 | },
17 | "eofline": true,
18 | "forin": true,
19 | "import-blacklist": [
20 | true,
21 | "rxjs",
22 | "rxjs/Rx"
23 | ],
24 | "import-spacing": true,
25 | "indent": [
26 | true,
27 | "spaces"
28 | ],
29 | "interface-over-type-literal": true,
30 | "label-position": true,
31 | "max-line-length": [
32 | true,
33 | 140
34 | ],
35 | "member-access": false,
36 | "member-ordering": [
37 | true,
38 | {
39 | "order": [
40 | "static-field",
41 | "instance-field",
42 | "static-method",
43 | "instance-method"
44 | ]
45 | }
46 | ],
47 | "no-arg": true,
48 | "no-bitwise": true,
49 | "no-console": [
50 | true,
51 | "debug",
52 | "info",
53 | "time",
54 | "timeEnd",
55 | "trace"
56 | ],
57 | "no-construct": true,
58 | "no-debugger": true,
59 | "no-duplicate-super": true,
60 | "no-empty": false,
61 | "no-empty-interface": true,
62 | "no-eval": true,
63 | "no-inferrable-types": [
64 | true,
65 | "ignore-params"
66 | ],
67 | "no-misused-new": true,
68 | "no-non-null-assertion": true,
69 | "no-shadowed-variable": true,
70 | "no-string-literal": false,
71 | "no-string-throw": true,
72 | "no-switch-case-fall-through": true,
73 | "no-trailing-whitespace": true,
74 | "no-unnecessary-initializer": true,
75 | "no-unused-expression": true,
76 | "no-use-before-declare": true,
77 | "no-var-keyword": true,
78 | "object-literal-sort-keys": false,
79 | "one-line": [
80 | true,
81 | "check-open-brace",
82 | "check-catch",
83 | "check-else",
84 | "check-whitespace"
85 | ],
86 | "prefer-const": true,
87 | "quotemark": [
88 | true,
89 | "single"
90 | ],
91 | "radix": true,
92 | "semicolon": [
93 | true,
94 | "always"
95 | ],
96 | "triple-equals": [
97 | true,
98 | "allow-null-check"
99 | ],
100 | "typedef-whitespace": [
101 | true,
102 | {
103 | "call-signature": "nospace",
104 | "index-signature": "nospace",
105 | "parameter": "nospace",
106 | "property-declaration": "nospace",
107 | "variable-declaration": "nospace"
108 | }
109 | ],
110 | "unified-signatures": true,
111 | "variable-name": false,
112 | "whitespace": [
113 | true,
114 | "check-branch",
115 | "check-decl",
116 | "check-operator",
117 | "check-separator",
118 | "check-type"
119 | ],
120 | "directive-selector": [
121 | true,
122 | "attribute",
123 | "app",
124 | "camelCase"
125 | ],
126 | "component-selector": [
127 | true,
128 | "element",
129 | "app",
130 | "kebab-case"
131 | ],
132 | "no-output-on-prefix": true,
133 | "use-input-property-decorator": true,
134 | "use-output-property-decorator": true,
135 | "use-host-property-decorator": true,
136 | "no-input-rename": true,
137 | "no-output-rename": true,
138 | "use-life-cycle-interface": true,
139 | "use-pipe-transform-interface": true,
140 | "component-class-suffix": true,
141 | "directive-class-suffix": true
142 | }
143 | }
144 |
--------------------------------------------------------------------------------
/widget-hello/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /dist-server
6 | /tmp
7 | /out-tsc
8 |
9 | # dependencies
10 | /node_modules
11 |
12 | # IDEs and editors
13 | /.idea
14 | .project
15 | .classpath
16 | .c9/
17 | *.launch
18 | .settings/
19 | *.sublime-workspace
20 |
21 | # IDE - VSCode
22 | .vscode/*
23 | !.vscode/settings.json
24 | !.vscode/tasks.json
25 | !.vscode/launch.json
26 | !.vscode/extensions.json
27 |
28 | # misc
29 | /.sass-cache
30 | /connect.lock
31 | /coverage
32 | /libpeerconnection.log
33 | npm-debug.log
34 | yarn-error.log
35 | testem.log
36 | /typings
37 |
38 | # e2e
39 | /e2e/*.js
40 | /e2e/*.map
41 |
42 | # System Files
43 | .DS_Store
44 | Thumbs.db
45 |
46 | .rpt2_cache
--------------------------------------------------------------------------------
/widget-hello/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "widget-hello",
3 | "version": "0.0.0",
4 | "main": "dist/bundle.js",
5 | "license": "MIT",
6 | "scripts": {
7 | "build": "rimraf dist && rollup -c"
8 | },
9 | "dependencies": {
10 | "@angular/core": "^5.2.2",
11 | "@angular/common": "^5.2.2",
12 | "rollup": "^0.55.1"
13 | },
14 | "devDependencies": {
15 | "rimraf": "^2.6.2",
16 | "rollup-plugin-node-resolve": "^3.0.2",
17 | "rollup-plugin-typescript": "^0.8.1",
18 | "rollup-plugin-typescript2": "^0.10.0",
19 | "typescript": "^2.6.2"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/widget-hello/rollup.config.js:
--------------------------------------------------------------------------------
1 | import resolve from 'rollup-plugin-node-resolve';
2 | import typescript from 'rollup-plugin-typescript2';
3 |
4 | export default {
5 | input: 'src/main.ts',
6 | output: {
7 | file: 'dist/widget-hello.bundle.js',
8 | format: 'system'
9 | },
10 | plugins: [
11 | resolve({
12 | // pass custom options to the resolve plugin
13 | customResolveOptions: {
14 | moduleDirectory: 'node_modules'
15 | }
16 | }),
17 | typescript({
18 | typescript: require('typescript')
19 | })
20 | ],
21 | external: [
22 | 'plugins-core',
23 | '@angular/core',
24 | '@angular/common'
25 | ]
26 | }
--------------------------------------------------------------------------------
/widget-hello/src/main.ts:
--------------------------------------------------------------------------------
1 | export { WidgetHelloModule } from './widget-hello/widget-hello.module';
--------------------------------------------------------------------------------
/widget-hello/src/widget-hello/a-nested.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'exclamations',
5 | template: `
6 | !!!
7 | `
8 | })
9 | export class ANestedComponent implements OnInit {
10 |
11 | constructor() { }
12 |
13 | ngOnInit() { }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/widget-hello/src/widget-hello/widget-hello.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'widget-hello',
5 | template: `
6 |
7 |
8 |
9 | widget-hello
10 |
11 |
12 | Hello World
13 |
14 |
15 |
16 | `
17 | })
18 | export class WidgetHelloComponent implements OnInit {
19 |
20 | constructor() { }
21 |
22 | ngOnInit() { }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/widget-hello/src/widget-hello/widget-hello.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { WidgetHelloComponent } from './widget-hello.component';
4 | import { ANestedComponent } from './a-nested.component';
5 |
6 | @NgModule({
7 | imports: [CommonModule],
8 | declarations: [
9 | WidgetHelloComponent,
10 | ANestedComponent
11 | ],
12 | entryComponents: [WidgetHelloComponent],
13 | providers: [{
14 | provide: 'widget-hello',
15 | useValue: WidgetHelloComponent
16 | }]
17 | })
18 | export class WidgetHelloModule { }
19 |
--------------------------------------------------------------------------------
/widget-hello/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | /* Basic Options */
4 | "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
5 | "module": "system", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
6 | "lib": ["es2017", "dom"], /* Specify library files to be included in the compilation: */
7 | // "allowJs": true, /* Allow javascript files to be compiled. */
8 | // "checkJs": true, /* Report errors in .js files. */
9 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
10 | "declaration": true, /* Generates corresponding '.d.ts' file. */
11 | "sourceMap": true, /* Generates corresponding '.map' file. */
12 | // "outFile": "./", /* Concatenate and emit output to single file. */
13 | // "outDir": "./", /* Redirect output structure to the directory. */
14 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
15 | "removeComments": true, /* Do not emit comments to output. */
16 | // "noEmit": true, /* Do not emit outputs. */
17 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */
18 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
19 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
20 |
21 | /* Strict Type-Checking Options */
22 | "strict": false, /* Enable all strict type-checking options. */
23 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
24 | // "strictNullChecks": true, /* Enable strict null checks. */
25 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */
26 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
27 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
28 |
29 | /* Additional Checks */
30 | // "noUnusedLocals": true, /* Report errors on unused locals. */
31 | // "noUnusedParameters": true, /* Report errors on unused parameters. */
32 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
33 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
34 |
35 | /* Module Resolution Options */
36 | "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
37 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
38 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
39 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
40 | "typeRoots": [ "node_modules/@types" ], /* List of folders to include type definitions from. */
41 | // "types": [], /* Type declaration files to be included in compilation. */
42 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
43 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
44 |
45 | /* Source Map Options */
46 | // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
47 | // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
48 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
49 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
50 |
51 | /* Experimental Options */
52 | "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
53 | "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
54 | }
55 | }
--------------------------------------------------------------------------------
/widget-hello/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | "@angular/common@^5.2.2":
6 | version "5.2.10"
7 | resolved "https://registry.yarnpkg.com/@angular/common/-/common-5.2.10.tgz#828308df8505a31f219a6895ff91dbb178ebac98"
8 | dependencies:
9 | tslib "^1.7.1"
10 |
11 | "@angular/core@^5.2.2":
12 | version "5.2.10"
13 | resolved "https://registry.yarnpkg.com/@angular/core/-/core-5.2.10.tgz#a6eba06cae7267efbd2666e3fa5e42b84c2261de"
14 | dependencies:
15 | tslib "^1.7.1"
16 |
17 | arr-diff@^2.0.0:
18 | version "2.0.0"
19 | resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
20 | dependencies:
21 | arr-flatten "^1.0.1"
22 |
23 | arr-flatten@^1.0.1:
24 | version "1.1.0"
25 | resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
26 |
27 | array-unique@^0.2.1:
28 | version "0.2.1"
29 | resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
30 |
31 | balanced-match@^1.0.0:
32 | version "1.0.0"
33 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
34 |
35 | brace-expansion@^1.1.7:
36 | version "1.1.11"
37 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
38 | dependencies:
39 | balanced-match "^1.0.0"
40 | concat-map "0.0.1"
41 |
42 | braces@^1.8.2:
43 | version "1.8.5"
44 | resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
45 | dependencies:
46 | expand-range "^1.8.1"
47 | preserve "^0.2.0"
48 | repeat-element "^1.1.2"
49 |
50 | builtin-modules@^2.0.0:
51 | version "2.0.0"
52 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-2.0.0.tgz#60b7ef5ae6546bd7deefa74b08b62a43a232648e"
53 |
54 | compare-versions@2.0.1:
55 | version "2.0.1"
56 | resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-2.0.1.tgz#1edc1f93687fd97a325c59f55e45a07db106aca6"
57 |
58 | concat-map@0.0.1:
59 | version "0.0.1"
60 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
61 |
62 | estree-walker@^0.2.1:
63 | version "0.2.1"
64 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e"
65 |
66 | estree-walker@^0.3.0:
67 | version "0.3.1"
68 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa"
69 |
70 | expand-brackets@^0.1.4:
71 | version "0.1.5"
72 | resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
73 | dependencies:
74 | is-posix-bracket "^0.1.0"
75 |
76 | expand-range@^1.8.1:
77 | version "1.8.2"
78 | resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
79 | dependencies:
80 | fill-range "^2.1.0"
81 |
82 | extglob@^0.3.1:
83 | version "0.3.2"
84 | resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
85 | dependencies:
86 | is-extglob "^1.0.0"
87 |
88 | filename-regex@^2.0.0:
89 | version "2.0.1"
90 | resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
91 |
92 | fill-range@^2.1.0:
93 | version "2.2.3"
94 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"
95 | dependencies:
96 | is-number "^2.1.0"
97 | isobject "^2.0.0"
98 | randomatic "^1.1.3"
99 | repeat-element "^1.1.2"
100 | repeat-string "^1.5.2"
101 |
102 | for-in@^1.0.1:
103 | version "1.0.2"
104 | resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
105 |
106 | for-own@^0.1.4:
107 | version "0.1.5"
108 | resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
109 | dependencies:
110 | for-in "^1.0.1"
111 |
112 | fs-extra@^4.0.2:
113 | version "4.0.3"
114 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94"
115 | dependencies:
116 | graceful-fs "^4.1.2"
117 | jsonfile "^4.0.0"
118 | universalify "^0.1.0"
119 |
120 | fs.realpath@^1.0.0:
121 | version "1.0.0"
122 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
123 |
124 | glob-base@^0.3.0:
125 | version "0.3.0"
126 | resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
127 | dependencies:
128 | glob-parent "^2.0.0"
129 | is-glob "^2.0.0"
130 |
131 | glob-parent@^2.0.0:
132 | version "2.0.0"
133 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
134 | dependencies:
135 | is-glob "^2.0.0"
136 |
137 | glob@^7.0.5:
138 | version "7.1.2"
139 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
140 | dependencies:
141 | fs.realpath "^1.0.0"
142 | inflight "^1.0.4"
143 | inherits "2"
144 | minimatch "^3.0.4"
145 | once "^1.3.0"
146 | path-is-absolute "^1.0.0"
147 |
148 | graceful-fs@^4.1.2, graceful-fs@^4.1.6:
149 | version "4.1.11"
150 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
151 |
152 | inflight@^1.0.4:
153 | version "1.0.6"
154 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
155 | dependencies:
156 | once "^1.3.0"
157 | wrappy "1"
158 |
159 | inherits@2:
160 | version "2.0.3"
161 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
162 |
163 | is-buffer@^1.1.5:
164 | version "1.1.6"
165 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
166 |
167 | is-dotfile@^1.0.0:
168 | version "1.0.3"
169 | resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
170 |
171 | is-equal-shallow@^0.1.3:
172 | version "0.1.3"
173 | resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
174 | dependencies:
175 | is-primitive "^2.0.0"
176 |
177 | is-extendable@^0.1.1:
178 | version "0.1.1"
179 | resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
180 |
181 | is-extglob@^1.0.0:
182 | version "1.0.0"
183 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
184 |
185 | is-glob@^2.0.0, is-glob@^2.0.1:
186 | version "2.0.1"
187 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
188 | dependencies:
189 | is-extglob "^1.0.0"
190 |
191 | is-module@^1.0.0:
192 | version "1.0.0"
193 | resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"
194 |
195 | is-number@^2.1.0:
196 | version "2.1.0"
197 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
198 | dependencies:
199 | kind-of "^3.0.2"
200 |
201 | is-number@^3.0.0:
202 | version "3.0.0"
203 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
204 | dependencies:
205 | kind-of "^3.0.2"
206 |
207 | is-posix-bracket@^0.1.0:
208 | version "0.1.1"
209 | resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
210 |
211 | is-primitive@^2.0.0:
212 | version "2.0.0"
213 | resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
214 |
215 | isarray@1.0.0:
216 | version "1.0.0"
217 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
218 |
219 | isobject@^2.0.0:
220 | version "2.1.0"
221 | resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
222 | dependencies:
223 | isarray "1.0.0"
224 |
225 | jsonfile@^4.0.0:
226 | version "4.0.0"
227 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
228 | optionalDependencies:
229 | graceful-fs "^4.1.6"
230 |
231 | kind-of@^3.0.2:
232 | version "3.2.2"
233 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
234 | dependencies:
235 | is-buffer "^1.1.5"
236 |
237 | kind-of@^4.0.0:
238 | version "4.0.0"
239 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
240 | dependencies:
241 | is-buffer "^1.1.5"
242 |
243 | micromatch@^2.3.11:
244 | version "2.3.11"
245 | resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
246 | dependencies:
247 | arr-diff "^2.0.0"
248 | array-unique "^0.2.1"
249 | braces "^1.8.2"
250 | expand-brackets "^0.1.4"
251 | extglob "^0.3.1"
252 | filename-regex "^2.0.0"
253 | is-extglob "^1.0.0"
254 | is-glob "^2.0.1"
255 | kind-of "^3.0.2"
256 | normalize-path "^2.0.1"
257 | object.omit "^2.0.0"
258 | parse-glob "^3.0.4"
259 | regex-cache "^0.4.2"
260 |
261 | minimatch@^3.0.2, minimatch@^3.0.4:
262 | version "3.0.4"
263 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
264 | dependencies:
265 | brace-expansion "^1.1.7"
266 |
267 | normalize-path@^2.0.1:
268 | version "2.1.1"
269 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
270 | dependencies:
271 | remove-trailing-separator "^1.0.1"
272 |
273 | object-assign@^4.0.1:
274 | version "4.1.1"
275 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
276 |
277 | object.omit@^2.0.0:
278 | version "2.0.1"
279 | resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
280 | dependencies:
281 | for-own "^0.1.4"
282 | is-extendable "^0.1.1"
283 |
284 | once@^1.3.0:
285 | version "1.4.0"
286 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
287 | dependencies:
288 | wrappy "1"
289 |
290 | parse-glob@^3.0.4:
291 | version "3.0.4"
292 | resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
293 | dependencies:
294 | glob-base "^0.3.0"
295 | is-dotfile "^1.0.0"
296 | is-extglob "^1.0.0"
297 | is-glob "^2.0.0"
298 |
299 | path-is-absolute@^1.0.0:
300 | version "1.0.1"
301 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
302 |
303 | path-parse@^1.0.5:
304 | version "1.0.5"
305 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
306 |
307 | preserve@^0.2.0:
308 | version "0.2.0"
309 | resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
310 |
311 | randomatic@^1.1.3:
312 | version "1.1.7"
313 | resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
314 | dependencies:
315 | is-number "^3.0.0"
316 | kind-of "^4.0.0"
317 |
318 | regex-cache@^0.4.2:
319 | version "0.4.4"
320 | resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
321 | dependencies:
322 | is-equal-shallow "^0.1.3"
323 |
324 | remove-trailing-separator@^1.0.1:
325 | version "1.1.0"
326 | resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
327 |
328 | repeat-element@^1.1.2:
329 | version "1.1.2"
330 | resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
331 |
332 | repeat-string@^1.5.2:
333 | version "1.6.1"
334 | resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
335 |
336 | resolve@^1.1.6, resolve@^1.5.0:
337 | version "1.7.1"
338 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3"
339 | dependencies:
340 | path-parse "^1.0.5"
341 |
342 | rimraf@^2.6.2:
343 | version "2.6.2"
344 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
345 | dependencies:
346 | glob "^7.0.5"
347 |
348 | rollup-plugin-node-resolve@^3.0.2:
349 | version "3.3.0"
350 | resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz#c26d110a36812cbefa7ce117cadcd3439aa1c713"
351 | dependencies:
352 | builtin-modules "^2.0.0"
353 | is-module "^1.0.0"
354 | resolve "^1.1.6"
355 |
356 | rollup-plugin-typescript2@^0.10.0:
357 | version "0.10.0"
358 | resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.10.0.tgz#650f09da22408bede5d5925f7d8f6f89369fec50"
359 | dependencies:
360 | fs-extra "^4.0.2"
361 | resolve "^1.5.0"
362 | rollup-pluginutils "^2.0.1"
363 | tslib "^1.8.0"
364 |
365 | rollup-plugin-typescript@^0.8.1:
366 | version "0.8.1"
367 | resolved "https://registry.yarnpkg.com/rollup-plugin-typescript/-/rollup-plugin-typescript-0.8.1.tgz#2ff7eecc21cf6bb2b43fc27e5b688952ce71924a"
368 | dependencies:
369 | compare-versions "2.0.1"
370 | object-assign "^4.0.1"
371 | rollup-pluginutils "^1.3.1"
372 | tippex "^2.1.1"
373 | typescript "^1.8.9"
374 |
375 | rollup-pluginutils@^1.3.1:
376 | version "1.5.2"
377 | resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408"
378 | dependencies:
379 | estree-walker "^0.2.1"
380 | minimatch "^3.0.2"
381 |
382 | rollup-pluginutils@^2.0.1:
383 | version "2.0.1"
384 | resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz#7ec95b3573f6543a46a6461bd9a7c544525d0fc0"
385 | dependencies:
386 | estree-walker "^0.3.0"
387 | micromatch "^2.3.11"
388 |
389 | rollup@^0.55.1:
390 | version "0.55.5"
391 | resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.55.5.tgz#2f88c300f7cf24b5ec2dca8a6aba73b04e087e93"
392 |
393 | tippex@^2.1.1:
394 | version "2.3.1"
395 | resolved "https://registry.yarnpkg.com/tippex/-/tippex-2.3.1.tgz#a2fd5b7087d7cbfb20c9806a6c16108c2c0fafda"
396 |
397 | tslib@^1.7.1, tslib@^1.8.0:
398 | version "1.9.0"
399 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
400 |
401 | typescript@^1.8.9:
402 | version "1.8.10"
403 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-1.8.10.tgz#b475d6e0dff0bf50f296e5ca6ef9fbb5c7320f1e"
404 |
405 | typescript@^2.6.2:
406 | version "2.8.3"
407 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.3.tgz#5d817f9b6f31bb871835f4edf0089f21abe6c170"
408 |
409 | universalify@^0.1.0:
410 | version "0.1.1"
411 | resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
412 |
413 | wrappy@1:
414 | version "1.0.2"
415 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
416 |
--------------------------------------------------------------------------------
/widget-quotes/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /dist-server
6 | /tmp
7 | /out-tsc
8 |
9 | # dependencies
10 | /node_modules
11 |
12 | # IDEs and editors
13 | /.idea
14 | .project
15 | .classpath
16 | .c9/
17 | *.launch
18 | .settings/
19 | *.sublime-workspace
20 |
21 | # IDE - VSCode
22 | .vscode/*
23 | !.vscode/settings.json
24 | !.vscode/tasks.json
25 | !.vscode/launch.json
26 | !.vscode/extensions.json
27 |
28 | # misc
29 | /.sass-cache
30 | /connect.lock
31 | /coverage
32 | /libpeerconnection.log
33 | npm-debug.log
34 | yarn-error.log
35 | testem.log
36 | /typings
37 |
38 | # e2e
39 | /e2e/*.js
40 | /e2e/*.map
41 |
42 | # System Files
43 | .DS_Store
44 | Thumbs.db
45 |
46 | .rpt2_cache
--------------------------------------------------------------------------------
/widget-quotes/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "widget-quotes",
3 | "version": "0.0.0",
4 | "main": "dist/bundle.js",
5 | "license": "MIT",
6 | "scripts": {
7 | "build": "rimraf dist && rollup -c"
8 | },
9 | "dependencies": {
10 | "@angular/common": "^5.2.0",
11 | "@angular/core": "^5.2.0",
12 | "rollup": "^0.55.1",
13 | "rxjs": "^5.5.6"
14 | },
15 | "devDependencies": {
16 | "rimraf": "^2.6.2",
17 | "rollup-plugin-node-resolve": "^3.0.2",
18 | "rollup-plugin-typescript": "^0.8.1",
19 | "rollup-plugin-typescript2": "^0.10.0",
20 | "rollup-plugin-commonjs": "8.3.0",
21 | "typescript": "~2.5.3"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/widget-quotes/rollup.config.js:
--------------------------------------------------------------------------------
1 | import resolve from 'rollup-plugin-node-resolve';
2 | import typescript from 'rollup-plugin-typescript2';
3 | import commonjs from 'rollup-plugin-commonjs';
4 |
5 | export default {
6 | input: 'src/main.ts',
7 | output: {
8 | file: 'dist/widget-quotes.bundle.js',
9 | format: 'system'
10 | },
11 | plugins: [
12 | resolve({
13 | // pass custom options to the resolve plugin
14 | customResolveOptions: {
15 | moduleDirectory: 'node_modules'
16 | }
17 | }),
18 | typescript({
19 | typescript: require('typescript')
20 | }),
21 | commonjs()
22 | ],
23 | external: [
24 | 'plugins-core',
25 | '@angular/core',
26 | '@angular/common',
27 | '@angular/common/http',
28 | 'rxjs/Observable'
29 | ]
30 | }
--------------------------------------------------------------------------------
/widget-quotes/src/main.ts:
--------------------------------------------------------------------------------
1 | export { WidgetQuotesModule } from './widget-quotes/widget-quotes.module'
--------------------------------------------------------------------------------
/widget-quotes/src/widget-quotes/quotes.model.ts:
--------------------------------------------------------------------------------
1 | interface Quotes {
2 | contents: { quotes: { quote: string }[] };
3 | }
--------------------------------------------------------------------------------
/widget-quotes/src/widget-quotes/quotes.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { HttpClient } from '@angular/common/http';
3 | import { Observable } from 'rxjs/Observable';
4 |
5 | @Injectable()
6 | export class QuotesService {
7 |
8 | constructor(private http: HttpClient) { }
9 |
10 | private readonly url = 'https://quotes.rest/qod?category=inspire';
11 |
12 | getQuotesOfTheDay(): Observable {
13 | return this.http.get(this.url);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/widget-quotes/src/widget-quotes/widget-quotes.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 | import { QuotesService } from './quotes.service';
3 |
4 | @Component({
5 | selector: 'widget-quotes',
6 | template: `
7 |
8 |
9 |
10 | widget-quotes
11 |
12 |
13 | {{quote}}
14 |
15 |
16 |
17 | `
18 | })
19 | export class WidgetQuotesComponent implements OnInit {
20 |
21 | quote: string = 'loading ...';
22 |
23 | constructor(private quotesService: QuotesService) { }
24 |
25 | ngOnInit() {
26 | this.quotesService.getQuotesOfTheDay().subscribe((quotes: Quotes) => this.quote = quotes.contents.quotes[0].quote);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/widget-quotes/src/widget-quotes/widget-quotes.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { HttpClientModule } from '@angular/common/http';
4 | import { WidgetQuotesComponent } from './widget-quotes.component';
5 | import { QuotesService } from './quotes.service';
6 |
7 | @NgModule({
8 | imports: [
9 | CommonModule,
10 | HttpClientModule
11 | ],
12 | declarations: [WidgetQuotesComponent],
13 | entryComponents: [WidgetQuotesComponent],
14 | providers: [
15 | {
16 | provide: 'widget-quotes',
17 | useValue: WidgetQuotesComponent
18 | },
19 | QuotesService
20 | ]
21 | })
22 | export class WidgetQuotesModule { }
23 |
--------------------------------------------------------------------------------
/widget-quotes/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | /* Basic Options */
4 | "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
5 | "module": "system", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
6 | "lib": ["es2017", "dom"], /* Specify library files to be included in the compilation: */
7 | // "allowJs": true, /* Allow javascript files to be compiled. */
8 | // "checkJs": true, /* Report errors in .js files. */
9 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
10 | "declaration": true, /* Generates corresponding '.d.ts' file. */
11 | "sourceMap": true, /* Generates corresponding '.map' file. */
12 | // "outFile": "./", /* Concatenate and emit output to single file. */
13 | // "outDir": "./", /* Redirect output structure to the directory. */
14 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
15 | "removeComments": true, /* Do not emit comments to output. */
16 | // "noEmit": true, /* Do not emit outputs. */
17 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */
18 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
19 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
20 |
21 | /* Strict Type-Checking Options */
22 | "strict": false, /* Enable all strict type-checking options. */
23 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
24 | // "strictNullChecks": true, /* Enable strict null checks. */
25 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */
26 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
27 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
28 |
29 | /* Additional Checks */
30 | // "noUnusedLocals": true, /* Report errors on unused locals. */
31 | // "noUnusedParameters": true, /* Report errors on unused parameters. */
32 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
33 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
34 |
35 | /* Module Resolution Options */
36 | "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
37 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
38 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
39 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
40 | "typeRoots": [ "node_modules/@types" ], /* List of folders to include type definitions from. */
41 | // "types": [], /* Type declaration files to be included in compilation. */
42 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
43 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
44 |
45 | /* Source Map Options */
46 | // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
47 | // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
48 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
49 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
50 |
51 | /* Experimental Options */
52 | "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
53 | "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
54 | }
55 | }
--------------------------------------------------------------------------------
/widget-quotes/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | "@angular/common@^5.2.0":
6 | version "5.2.10"
7 | resolved "https://registry.yarnpkg.com/@angular/common/-/common-5.2.10.tgz#828308df8505a31f219a6895ff91dbb178ebac98"
8 | dependencies:
9 | tslib "^1.7.1"
10 |
11 | "@angular/core@^5.2.0":
12 | version "5.2.10"
13 | resolved "https://registry.yarnpkg.com/@angular/core/-/core-5.2.10.tgz#a6eba06cae7267efbd2666e3fa5e42b84c2261de"
14 | dependencies:
15 | tslib "^1.7.1"
16 |
17 | acorn@^5.2.1:
18 | version "5.5.3"
19 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9"
20 |
21 | arr-diff@^2.0.0:
22 | version "2.0.0"
23 | resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
24 | dependencies:
25 | arr-flatten "^1.0.1"
26 |
27 | arr-flatten@^1.0.1:
28 | version "1.1.0"
29 | resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
30 |
31 | array-unique@^0.2.1:
32 | version "0.2.1"
33 | resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
34 |
35 | balanced-match@^1.0.0:
36 | version "1.0.0"
37 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
38 |
39 | brace-expansion@^1.1.7:
40 | version "1.1.11"
41 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
42 | dependencies:
43 | balanced-match "^1.0.0"
44 | concat-map "0.0.1"
45 |
46 | braces@^1.8.2:
47 | version "1.8.5"
48 | resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
49 | dependencies:
50 | expand-range "^1.8.1"
51 | preserve "^0.2.0"
52 | repeat-element "^1.1.2"
53 |
54 | builtin-modules@^2.0.0:
55 | version "2.0.0"
56 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-2.0.0.tgz#60b7ef5ae6546bd7deefa74b08b62a43a232648e"
57 |
58 | compare-versions@2.0.1:
59 | version "2.0.1"
60 | resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-2.0.1.tgz#1edc1f93687fd97a325c59f55e45a07db106aca6"
61 |
62 | concat-map@0.0.1:
63 | version "0.0.1"
64 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
65 |
66 | estree-walker@^0.2.1:
67 | version "0.2.1"
68 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e"
69 |
70 | estree-walker@^0.3.0:
71 | version "0.3.1"
72 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa"
73 |
74 | estree-walker@^0.5.0:
75 | version "0.5.1"
76 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.1.tgz#64fc375053abc6f57d73e9bd2f004644ad3c5854"
77 |
78 | expand-brackets@^0.1.4:
79 | version "0.1.5"
80 | resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
81 | dependencies:
82 | is-posix-bracket "^0.1.0"
83 |
84 | expand-range@^1.8.1:
85 | version "1.8.2"
86 | resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
87 | dependencies:
88 | fill-range "^2.1.0"
89 |
90 | extglob@^0.3.1:
91 | version "0.3.2"
92 | resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
93 | dependencies:
94 | is-extglob "^1.0.0"
95 |
96 | filename-regex@^2.0.0:
97 | version "2.0.1"
98 | resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
99 |
100 | fill-range@^2.1.0:
101 | version "2.2.3"
102 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"
103 | dependencies:
104 | is-number "^2.1.0"
105 | isobject "^2.0.0"
106 | randomatic "^1.1.3"
107 | repeat-element "^1.1.2"
108 | repeat-string "^1.5.2"
109 |
110 | for-in@^1.0.1:
111 | version "1.0.2"
112 | resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
113 |
114 | for-own@^0.1.4:
115 | version "0.1.5"
116 | resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
117 | dependencies:
118 | for-in "^1.0.1"
119 |
120 | fs-extra@^4.0.2:
121 | version "4.0.3"
122 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94"
123 | dependencies:
124 | graceful-fs "^4.1.2"
125 | jsonfile "^4.0.0"
126 | universalify "^0.1.0"
127 |
128 | fs.realpath@^1.0.0:
129 | version "1.0.0"
130 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
131 |
132 | glob-base@^0.3.0:
133 | version "0.3.0"
134 | resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
135 | dependencies:
136 | glob-parent "^2.0.0"
137 | is-glob "^2.0.0"
138 |
139 | glob-parent@^2.0.0:
140 | version "2.0.0"
141 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
142 | dependencies:
143 | is-glob "^2.0.0"
144 |
145 | glob@^7.0.5:
146 | version "7.1.2"
147 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
148 | dependencies:
149 | fs.realpath "^1.0.0"
150 | inflight "^1.0.4"
151 | inherits "2"
152 | minimatch "^3.0.4"
153 | once "^1.3.0"
154 | path-is-absolute "^1.0.0"
155 |
156 | graceful-fs@^4.1.2, graceful-fs@^4.1.6:
157 | version "4.1.11"
158 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
159 |
160 | inflight@^1.0.4:
161 | version "1.0.6"
162 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
163 | dependencies:
164 | once "^1.3.0"
165 | wrappy "1"
166 |
167 | inherits@2:
168 | version "2.0.3"
169 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
170 |
171 | is-buffer@^1.1.5:
172 | version "1.1.6"
173 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
174 |
175 | is-dotfile@^1.0.0:
176 | version "1.0.3"
177 | resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
178 |
179 | is-equal-shallow@^0.1.3:
180 | version "0.1.3"
181 | resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
182 | dependencies:
183 | is-primitive "^2.0.0"
184 |
185 | is-extendable@^0.1.1:
186 | version "0.1.1"
187 | resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
188 |
189 | is-extglob@^1.0.0:
190 | version "1.0.0"
191 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
192 |
193 | is-glob@^2.0.0, is-glob@^2.0.1:
194 | version "2.0.1"
195 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
196 | dependencies:
197 | is-extglob "^1.0.0"
198 |
199 | is-module@^1.0.0:
200 | version "1.0.0"
201 | resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"
202 |
203 | is-number@^2.1.0:
204 | version "2.1.0"
205 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
206 | dependencies:
207 | kind-of "^3.0.2"
208 |
209 | is-number@^3.0.0:
210 | version "3.0.0"
211 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
212 | dependencies:
213 | kind-of "^3.0.2"
214 |
215 | is-posix-bracket@^0.1.0:
216 | version "0.1.1"
217 | resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
218 |
219 | is-primitive@^2.0.0:
220 | version "2.0.0"
221 | resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
222 |
223 | isarray@1.0.0:
224 | version "1.0.0"
225 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
226 |
227 | isobject@^2.0.0:
228 | version "2.1.0"
229 | resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
230 | dependencies:
231 | isarray "1.0.0"
232 |
233 | jsonfile@^4.0.0:
234 | version "4.0.0"
235 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
236 | optionalDependencies:
237 | graceful-fs "^4.1.6"
238 |
239 | kind-of@^3.0.2:
240 | version "3.2.2"
241 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
242 | dependencies:
243 | is-buffer "^1.1.5"
244 |
245 | kind-of@^4.0.0:
246 | version "4.0.0"
247 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
248 | dependencies:
249 | is-buffer "^1.1.5"
250 |
251 | magic-string@^0.22.4:
252 | version "0.22.5"
253 | resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e"
254 | dependencies:
255 | vlq "^0.2.2"
256 |
257 | micromatch@^2.3.11:
258 | version "2.3.11"
259 | resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
260 | dependencies:
261 | arr-diff "^2.0.0"
262 | array-unique "^0.2.1"
263 | braces "^1.8.2"
264 | expand-brackets "^0.1.4"
265 | extglob "^0.3.1"
266 | filename-regex "^2.0.0"
267 | is-extglob "^1.0.0"
268 | is-glob "^2.0.1"
269 | kind-of "^3.0.2"
270 | normalize-path "^2.0.1"
271 | object.omit "^2.0.0"
272 | parse-glob "^3.0.4"
273 | regex-cache "^0.4.2"
274 |
275 | minimatch@^3.0.2, minimatch@^3.0.4:
276 | version "3.0.4"
277 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
278 | dependencies:
279 | brace-expansion "^1.1.7"
280 |
281 | normalize-path@^2.0.1:
282 | version "2.1.1"
283 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
284 | dependencies:
285 | remove-trailing-separator "^1.0.1"
286 |
287 | object-assign@^4.0.1:
288 | version "4.1.1"
289 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
290 |
291 | object.omit@^2.0.0:
292 | version "2.0.1"
293 | resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
294 | dependencies:
295 | for-own "^0.1.4"
296 | is-extendable "^0.1.1"
297 |
298 | once@^1.3.0:
299 | version "1.4.0"
300 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
301 | dependencies:
302 | wrappy "1"
303 |
304 | parse-glob@^3.0.4:
305 | version "3.0.4"
306 | resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
307 | dependencies:
308 | glob-base "^0.3.0"
309 | is-dotfile "^1.0.0"
310 | is-extglob "^1.0.0"
311 | is-glob "^2.0.0"
312 |
313 | path-is-absolute@^1.0.0:
314 | version "1.0.1"
315 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
316 |
317 | path-parse@^1.0.5:
318 | version "1.0.5"
319 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
320 |
321 | preserve@^0.2.0:
322 | version "0.2.0"
323 | resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
324 |
325 | randomatic@^1.1.3:
326 | version "1.1.7"
327 | resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
328 | dependencies:
329 | is-number "^3.0.0"
330 | kind-of "^4.0.0"
331 |
332 | regex-cache@^0.4.2:
333 | version "0.4.4"
334 | resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
335 | dependencies:
336 | is-equal-shallow "^0.1.3"
337 |
338 | remove-trailing-separator@^1.0.1:
339 | version "1.1.0"
340 | resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
341 |
342 | repeat-element@^1.1.2:
343 | version "1.1.2"
344 | resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
345 |
346 | repeat-string@^1.5.2:
347 | version "1.6.1"
348 | resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
349 |
350 | resolve@^1.1.6, resolve@^1.4.0, resolve@^1.5.0:
351 | version "1.7.1"
352 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3"
353 | dependencies:
354 | path-parse "^1.0.5"
355 |
356 | rimraf@^2.6.2:
357 | version "2.6.2"
358 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
359 | dependencies:
360 | glob "^7.0.5"
361 |
362 | rollup-plugin-commonjs@8.3.0:
363 | version "8.3.0"
364 | resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.3.0.tgz#91b4ba18f340951e39ed7b1901f377a80ab3f9c3"
365 | dependencies:
366 | acorn "^5.2.1"
367 | estree-walker "^0.5.0"
368 | magic-string "^0.22.4"
369 | resolve "^1.4.0"
370 | rollup-pluginutils "^2.0.1"
371 |
372 | rollup-plugin-node-resolve@^3.0.2:
373 | version "3.3.0"
374 | resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz#c26d110a36812cbefa7ce117cadcd3439aa1c713"
375 | dependencies:
376 | builtin-modules "^2.0.0"
377 | is-module "^1.0.0"
378 | resolve "^1.1.6"
379 |
380 | rollup-plugin-typescript2@^0.10.0:
381 | version "0.10.0"
382 | resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.10.0.tgz#650f09da22408bede5d5925f7d8f6f89369fec50"
383 | dependencies:
384 | fs-extra "^4.0.2"
385 | resolve "^1.5.0"
386 | rollup-pluginutils "^2.0.1"
387 | tslib "^1.8.0"
388 |
389 | rollup-plugin-typescript@^0.8.1:
390 | version "0.8.1"
391 | resolved "https://registry.yarnpkg.com/rollup-plugin-typescript/-/rollup-plugin-typescript-0.8.1.tgz#2ff7eecc21cf6bb2b43fc27e5b688952ce71924a"
392 | dependencies:
393 | compare-versions "2.0.1"
394 | object-assign "^4.0.1"
395 | rollup-pluginutils "^1.3.1"
396 | tippex "^2.1.1"
397 | typescript "^1.8.9"
398 |
399 | rollup-pluginutils@^1.3.1:
400 | version "1.5.2"
401 | resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408"
402 | dependencies:
403 | estree-walker "^0.2.1"
404 | minimatch "^3.0.2"
405 |
406 | rollup-pluginutils@^2.0.1:
407 | version "2.0.1"
408 | resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz#7ec95b3573f6543a46a6461bd9a7c544525d0fc0"
409 | dependencies:
410 | estree-walker "^0.3.0"
411 | micromatch "^2.3.11"
412 |
413 | rollup@^0.55.1:
414 | version "0.55.5"
415 | resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.55.5.tgz#2f88c300f7cf24b5ec2dca8a6aba73b04e087e93"
416 |
417 | rxjs@^5.5.6:
418 | version "5.5.10"
419 | resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.10.tgz#fde02d7a614f6c8683d0d1957827f492e09db045"
420 | dependencies:
421 | symbol-observable "1.0.1"
422 |
423 | symbol-observable@1.0.1:
424 | version "1.0.1"
425 | resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4"
426 |
427 | tippex@^2.1.1:
428 | version "2.3.1"
429 | resolved "https://registry.yarnpkg.com/tippex/-/tippex-2.3.1.tgz#a2fd5b7087d7cbfb20c9806a6c16108c2c0fafda"
430 |
431 | tslib@^1.7.1, tslib@^1.8.0:
432 | version "1.9.0"
433 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
434 |
435 | typescript@^1.8.9:
436 | version "1.8.10"
437 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-1.8.10.tgz#b475d6e0dff0bf50f296e5ca6ef9fbb5c7320f1e"
438 |
439 | typescript@~2.5.3:
440 | version "2.5.3"
441 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.3.tgz#df3dcdc38f3beb800d4bc322646b04a3f6ca7f0d"
442 |
443 | universalify@^0.1.0:
444 | version "0.1.1"
445 | resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
446 |
447 | vlq@^0.2.2:
448 | version "0.2.3"
449 | resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26"
450 |
451 | wrappy@1:
452 | version "1.0.2"
453 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
454 |
--------------------------------------------------------------------------------
/widget-todays-date/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /dist-server
6 | /tmp
7 | /out-tsc
8 |
9 | # dependencies
10 | /node_modules
11 |
12 | # IDEs and editors
13 | /.idea
14 | .project
15 | .classpath
16 | .c9/
17 | *.launch
18 | .settings/
19 | *.sublime-workspace
20 |
21 | # IDE - VSCode
22 | .vscode/*
23 | !.vscode/settings.json
24 | !.vscode/tasks.json
25 | !.vscode/launch.json
26 | !.vscode/extensions.json
27 |
28 | # misc
29 | /.sass-cache
30 | /connect.lock
31 | /coverage
32 | /libpeerconnection.log
33 | npm-debug.log
34 | yarn-error.log
35 | testem.log
36 | /typings
37 |
38 | # e2e
39 | /e2e/*.js
40 | /e2e/*.map
41 |
42 | # System Files
43 | .DS_Store
44 | Thumbs.db
45 |
46 | .rpt2_cache
--------------------------------------------------------------------------------
/widget-todays-date/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "widget-todays-date",
3 | "version": "0.0.0",
4 | "main": "dist/bundle.js",
5 | "license": "MIT",
6 | "scripts": {
7 | "build": "rimraf dist && rollup -c"
8 | },
9 | "dependencies": {
10 | "@angular/core": "^5.2.2",
11 | "@angular/common": "^5.2.2",
12 | "rollup": "^0.55.1"
13 | },
14 | "devDependencies": {
15 | "rimraf": "^2.6.2",
16 | "rollup-plugin-node-resolve": "^3.0.2",
17 | "rollup-plugin-typescript": "^0.8.1",
18 | "rollup-plugin-typescript2": "^0.10.0",
19 | "typescript": "^2.6.2"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/widget-todays-date/rollup.config.js:
--------------------------------------------------------------------------------
1 | import resolve from 'rollup-plugin-node-resolve';
2 | import typescript from 'rollup-plugin-typescript2';
3 |
4 | export default {
5 | input: 'src/main.ts',
6 | output: {
7 | file: 'dist/widget-todays-date.bundle.js',
8 | format: 'system'
9 | },
10 | plugins: [
11 | resolve({
12 | // pass custom options to the resolve plugin
13 | customResolveOptions: {
14 | moduleDirectory: 'node_modules'
15 | }
16 | }),
17 | typescript({
18 | typescript: require('typescript')
19 | })
20 | ],
21 | external: [
22 | 'plugins-core',
23 | '@angular/core',
24 | '@angular/common'
25 | ]
26 | }
--------------------------------------------------------------------------------
/widget-todays-date/src/main.ts:
--------------------------------------------------------------------------------
1 | export { WidgetTodaysDateModule } from './widget-todays-date/widget-todays-date.module';
--------------------------------------------------------------------------------
/widget-todays-date/src/widget-todays-date/widget-todays-date.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'widget-todays-date',
5 | template: `
6 |
7 |
8 |
9 | widget-todays-date
10 |
11 |
12 | {{currentDate | date}}
13 |
14 |
15 |
16 | `
17 | })
18 | export class WidgetTodaysDateComponent implements OnInit {
19 |
20 | currentDate: Date = new Date();
21 |
22 | constructor() { }
23 |
24 | ngOnInit() {
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/widget-todays-date/src/widget-todays-date/widget-todays-date.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { WidgetTodaysDateComponent } from './widget-todays-date.component';
4 |
5 | @NgModule({
6 | imports: [CommonModule],
7 | declarations: [WidgetTodaysDateComponent],
8 | entryComponents: [WidgetTodaysDateComponent],
9 | providers: [{
10 | provide: 'widget-todays-date',
11 | useValue: WidgetTodaysDateComponent
12 | }]
13 | })
14 | export class WidgetTodaysDateModule { }
15 |
--------------------------------------------------------------------------------
/widget-todays-date/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | /* Basic Options */
4 | "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
5 | "module": "system", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
6 | "lib": ["es2017", "dom"], /* Specify library files to be included in the compilation: */
7 | // "allowJs": true, /* Allow javascript files to be compiled. */
8 | // "checkJs": true, /* Report errors in .js files. */
9 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
10 | "declaration": true, /* Generates corresponding '.d.ts' file. */
11 | "sourceMap": true, /* Generates corresponding '.map' file. */
12 | // "outFile": "./", /* Concatenate and emit output to single file. */
13 | // "outDir": "./", /* Redirect output structure to the directory. */
14 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
15 | "removeComments": true, /* Do not emit comments to output. */
16 | // "noEmit": true, /* Do not emit outputs. */
17 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */
18 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
19 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
20 |
21 | /* Strict Type-Checking Options */
22 | "strict": false, /* Enable all strict type-checking options. */
23 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
24 | // "strictNullChecks": true, /* Enable strict null checks. */
25 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */
26 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
27 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
28 |
29 | /* Additional Checks */
30 | // "noUnusedLocals": true, /* Report errors on unused locals. */
31 | // "noUnusedParameters": true, /* Report errors on unused parameters. */
32 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
33 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
34 |
35 | /* Module Resolution Options */
36 | "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
37 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
38 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
39 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
40 | "typeRoots": [ "node_modules/@types" ], /* List of folders to include type definitions from. */
41 | // "types": [], /* Type declaration files to be included in compilation. */
42 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
43 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
44 |
45 | /* Source Map Options */
46 | // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
47 | // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
48 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
49 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
50 |
51 | /* Experimental Options */
52 | "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
53 | "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
54 | }
55 | }
--------------------------------------------------------------------------------
/widget-todays-date/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | "@angular/common@^5.2.2":
6 | version "5.2.10"
7 | resolved "https://registry.yarnpkg.com/@angular/common/-/common-5.2.10.tgz#828308df8505a31f219a6895ff91dbb178ebac98"
8 | dependencies:
9 | tslib "^1.7.1"
10 |
11 | "@angular/core@^5.2.2":
12 | version "5.2.10"
13 | resolved "https://registry.yarnpkg.com/@angular/core/-/core-5.2.10.tgz#a6eba06cae7267efbd2666e3fa5e42b84c2261de"
14 | dependencies:
15 | tslib "^1.7.1"
16 |
17 | arr-diff@^2.0.0:
18 | version "2.0.0"
19 | resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
20 | dependencies:
21 | arr-flatten "^1.0.1"
22 |
23 | arr-flatten@^1.0.1:
24 | version "1.1.0"
25 | resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
26 |
27 | array-unique@^0.2.1:
28 | version "0.2.1"
29 | resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
30 |
31 | balanced-match@^1.0.0:
32 | version "1.0.0"
33 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
34 |
35 | brace-expansion@^1.1.7:
36 | version "1.1.11"
37 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
38 | dependencies:
39 | balanced-match "^1.0.0"
40 | concat-map "0.0.1"
41 |
42 | braces@^1.8.2:
43 | version "1.8.5"
44 | resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
45 | dependencies:
46 | expand-range "^1.8.1"
47 | preserve "^0.2.0"
48 | repeat-element "^1.1.2"
49 |
50 | builtin-modules@^2.0.0:
51 | version "2.0.0"
52 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-2.0.0.tgz#60b7ef5ae6546bd7deefa74b08b62a43a232648e"
53 |
54 | compare-versions@2.0.1:
55 | version "2.0.1"
56 | resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-2.0.1.tgz#1edc1f93687fd97a325c59f55e45a07db106aca6"
57 |
58 | concat-map@0.0.1:
59 | version "0.0.1"
60 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
61 |
62 | estree-walker@^0.2.1:
63 | version "0.2.1"
64 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e"
65 |
66 | estree-walker@^0.3.0:
67 | version "0.3.1"
68 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa"
69 |
70 | expand-brackets@^0.1.4:
71 | version "0.1.5"
72 | resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
73 | dependencies:
74 | is-posix-bracket "^0.1.0"
75 |
76 | expand-range@^1.8.1:
77 | version "1.8.2"
78 | resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
79 | dependencies:
80 | fill-range "^2.1.0"
81 |
82 | extglob@^0.3.1:
83 | version "0.3.2"
84 | resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
85 | dependencies:
86 | is-extglob "^1.0.0"
87 |
88 | filename-regex@^2.0.0:
89 | version "2.0.1"
90 | resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
91 |
92 | fill-range@^2.1.0:
93 | version "2.2.3"
94 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"
95 | dependencies:
96 | is-number "^2.1.0"
97 | isobject "^2.0.0"
98 | randomatic "^1.1.3"
99 | repeat-element "^1.1.2"
100 | repeat-string "^1.5.2"
101 |
102 | for-in@^1.0.1:
103 | version "1.0.2"
104 | resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
105 |
106 | for-own@^0.1.4:
107 | version "0.1.5"
108 | resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
109 | dependencies:
110 | for-in "^1.0.1"
111 |
112 | fs-extra@^4.0.2:
113 | version "4.0.3"
114 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94"
115 | dependencies:
116 | graceful-fs "^4.1.2"
117 | jsonfile "^4.0.0"
118 | universalify "^0.1.0"
119 |
120 | fs.realpath@^1.0.0:
121 | version "1.0.0"
122 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
123 |
124 | glob-base@^0.3.0:
125 | version "0.3.0"
126 | resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
127 | dependencies:
128 | glob-parent "^2.0.0"
129 | is-glob "^2.0.0"
130 |
131 | glob-parent@^2.0.0:
132 | version "2.0.0"
133 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
134 | dependencies:
135 | is-glob "^2.0.0"
136 |
137 | glob@^7.0.5:
138 | version "7.1.2"
139 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
140 | dependencies:
141 | fs.realpath "^1.0.0"
142 | inflight "^1.0.4"
143 | inherits "2"
144 | minimatch "^3.0.4"
145 | once "^1.3.0"
146 | path-is-absolute "^1.0.0"
147 |
148 | graceful-fs@^4.1.2, graceful-fs@^4.1.6:
149 | version "4.1.11"
150 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
151 |
152 | inflight@^1.0.4:
153 | version "1.0.6"
154 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
155 | dependencies:
156 | once "^1.3.0"
157 | wrappy "1"
158 |
159 | inherits@2:
160 | version "2.0.3"
161 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
162 |
163 | is-buffer@^1.1.5:
164 | version "1.1.6"
165 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
166 |
167 | is-dotfile@^1.0.0:
168 | version "1.0.3"
169 | resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
170 |
171 | is-equal-shallow@^0.1.3:
172 | version "0.1.3"
173 | resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
174 | dependencies:
175 | is-primitive "^2.0.0"
176 |
177 | is-extendable@^0.1.1:
178 | version "0.1.1"
179 | resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
180 |
181 | is-extglob@^1.0.0:
182 | version "1.0.0"
183 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
184 |
185 | is-glob@^2.0.0, is-glob@^2.0.1:
186 | version "2.0.1"
187 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
188 | dependencies:
189 | is-extglob "^1.0.0"
190 |
191 | is-module@^1.0.0:
192 | version "1.0.0"
193 | resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"
194 |
195 | is-number@^2.1.0:
196 | version "2.1.0"
197 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
198 | dependencies:
199 | kind-of "^3.0.2"
200 |
201 | is-number@^3.0.0:
202 | version "3.0.0"
203 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
204 | dependencies:
205 | kind-of "^3.0.2"
206 |
207 | is-posix-bracket@^0.1.0:
208 | version "0.1.1"
209 | resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
210 |
211 | is-primitive@^2.0.0:
212 | version "2.0.0"
213 | resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
214 |
215 | isarray@1.0.0:
216 | version "1.0.0"
217 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
218 |
219 | isobject@^2.0.0:
220 | version "2.1.0"
221 | resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
222 | dependencies:
223 | isarray "1.0.0"
224 |
225 | jsonfile@^4.0.0:
226 | version "4.0.0"
227 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
228 | optionalDependencies:
229 | graceful-fs "^4.1.6"
230 |
231 | kind-of@^3.0.2:
232 | version "3.2.2"
233 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
234 | dependencies:
235 | is-buffer "^1.1.5"
236 |
237 | kind-of@^4.0.0:
238 | version "4.0.0"
239 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
240 | dependencies:
241 | is-buffer "^1.1.5"
242 |
243 | micromatch@^2.3.11:
244 | version "2.3.11"
245 | resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
246 | dependencies:
247 | arr-diff "^2.0.0"
248 | array-unique "^0.2.1"
249 | braces "^1.8.2"
250 | expand-brackets "^0.1.4"
251 | extglob "^0.3.1"
252 | filename-regex "^2.0.0"
253 | is-extglob "^1.0.0"
254 | is-glob "^2.0.1"
255 | kind-of "^3.0.2"
256 | normalize-path "^2.0.1"
257 | object.omit "^2.0.0"
258 | parse-glob "^3.0.4"
259 | regex-cache "^0.4.2"
260 |
261 | minimatch@^3.0.2, minimatch@^3.0.4:
262 | version "3.0.4"
263 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
264 | dependencies:
265 | brace-expansion "^1.1.7"
266 |
267 | normalize-path@^2.0.1:
268 | version "2.1.1"
269 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
270 | dependencies:
271 | remove-trailing-separator "^1.0.1"
272 |
273 | object-assign@^4.0.1:
274 | version "4.1.1"
275 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
276 |
277 | object.omit@^2.0.0:
278 | version "2.0.1"
279 | resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
280 | dependencies:
281 | for-own "^0.1.4"
282 | is-extendable "^0.1.1"
283 |
284 | once@^1.3.0:
285 | version "1.4.0"
286 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
287 | dependencies:
288 | wrappy "1"
289 |
290 | parse-glob@^3.0.4:
291 | version "3.0.4"
292 | resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
293 | dependencies:
294 | glob-base "^0.3.0"
295 | is-dotfile "^1.0.0"
296 | is-extglob "^1.0.0"
297 | is-glob "^2.0.0"
298 |
299 | path-is-absolute@^1.0.0:
300 | version "1.0.1"
301 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
302 |
303 | path-parse@^1.0.5:
304 | version "1.0.5"
305 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
306 |
307 | preserve@^0.2.0:
308 | version "0.2.0"
309 | resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
310 |
311 | randomatic@^1.1.3:
312 | version "1.1.7"
313 | resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
314 | dependencies:
315 | is-number "^3.0.0"
316 | kind-of "^4.0.0"
317 |
318 | regex-cache@^0.4.2:
319 | version "0.4.4"
320 | resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
321 | dependencies:
322 | is-equal-shallow "^0.1.3"
323 |
324 | remove-trailing-separator@^1.0.1:
325 | version "1.1.0"
326 | resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
327 |
328 | repeat-element@^1.1.2:
329 | version "1.1.2"
330 | resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
331 |
332 | repeat-string@^1.5.2:
333 | version "1.6.1"
334 | resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
335 |
336 | resolve@^1.1.6, resolve@^1.5.0:
337 | version "1.7.1"
338 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3"
339 | dependencies:
340 | path-parse "^1.0.5"
341 |
342 | rimraf@^2.6.2:
343 | version "2.6.2"
344 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
345 | dependencies:
346 | glob "^7.0.5"
347 |
348 | rollup-plugin-node-resolve@^3.0.2:
349 | version "3.3.0"
350 | resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz#c26d110a36812cbefa7ce117cadcd3439aa1c713"
351 | dependencies:
352 | builtin-modules "^2.0.0"
353 | is-module "^1.0.0"
354 | resolve "^1.1.6"
355 |
356 | rollup-plugin-typescript2@^0.10.0:
357 | version "0.10.0"
358 | resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.10.0.tgz#650f09da22408bede5d5925f7d8f6f89369fec50"
359 | dependencies:
360 | fs-extra "^4.0.2"
361 | resolve "^1.5.0"
362 | rollup-pluginutils "^2.0.1"
363 | tslib "^1.8.0"
364 |
365 | rollup-plugin-typescript@^0.8.1:
366 | version "0.8.1"
367 | resolved "https://registry.yarnpkg.com/rollup-plugin-typescript/-/rollup-plugin-typescript-0.8.1.tgz#2ff7eecc21cf6bb2b43fc27e5b688952ce71924a"
368 | dependencies:
369 | compare-versions "2.0.1"
370 | object-assign "^4.0.1"
371 | rollup-pluginutils "^1.3.1"
372 | tippex "^2.1.1"
373 | typescript "^1.8.9"
374 |
375 | rollup-pluginutils@^1.3.1:
376 | version "1.5.2"
377 | resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408"
378 | dependencies:
379 | estree-walker "^0.2.1"
380 | minimatch "^3.0.2"
381 |
382 | rollup-pluginutils@^2.0.1:
383 | version "2.0.1"
384 | resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz#7ec95b3573f6543a46a6461bd9a7c544525d0fc0"
385 | dependencies:
386 | estree-walker "^0.3.0"
387 | micromatch "^2.3.11"
388 |
389 | rollup@^0.55.1:
390 | version "0.55.5"
391 | resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.55.5.tgz#2f88c300f7cf24b5ec2dca8a6aba73b04e087e93"
392 |
393 | tippex@^2.1.1:
394 | version "2.3.1"
395 | resolved "https://registry.yarnpkg.com/tippex/-/tippex-2.3.1.tgz#a2fd5b7087d7cbfb20c9806a6c16108c2c0fafda"
396 |
397 | tslib@^1.7.1, tslib@^1.8.0:
398 | version "1.9.0"
399 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
400 |
401 | typescript@^1.8.9:
402 | version "1.8.10"
403 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-1.8.10.tgz#b475d6e0dff0bf50f296e5ca6ef9fbb5c7320f1e"
404 |
405 | typescript@^2.6.2:
406 | version "2.8.3"
407 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.3.tgz#5d817f9b6f31bb871835f4edf0089f21abe6c170"
408 |
409 | universalify@^0.1.0:
410 | version "0.1.1"
411 | resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
412 |
413 | wrappy@1:
414 | version "1.0.2"
415 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
416 |
--------------------------------------------------------------------------------
/widgets-repo/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/widgets-repo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "widgets-repo",
3 | "version": "0.0.0",
4 | "license": "MIT",
5 | "scripts": {
6 | "start": "http-server widgets -p 4201"
7 | },
8 | "dependencies": {
9 | "http-server": "^0.11.1"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/widgets-repo/widgets/widget-hello.bundle.js:
--------------------------------------------------------------------------------
1 | System.register(['@angular/core', '@angular/common'], function (exports, module) {
2 | 'use strict';
3 | var Component, NgModule, CommonModule;
4 | return {
5 | setters: [function (module) {
6 | Component = module.Component;
7 | NgModule = module.NgModule;
8 | }, function (module) {
9 | CommonModule = module.CommonModule;
10 | }],
11 | execute: function () {
12 |
13 | /*! *****************************************************************************
14 | Copyright (c) Microsoft Corporation. All rights reserved.
15 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use
16 | this file except in compliance with the License. You may obtain a copy of the
17 | License at http://www.apache.org/licenses/LICENSE-2.0
18 |
19 | THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 | KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
21 | WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
22 | MERCHANTABLITY OR NON-INFRINGEMENT.
23 |
24 | See the Apache Version 2.0 License for specific language governing permissions
25 | and limitations under the License.
26 | ***************************************************************************** */
27 | /* global Reflect, Promise */
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | function __decorate(decorators, target, key, desc) {
36 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
37 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
39 | return c > 3 && r && Object.defineProperty(target, key, r), r;
40 | }
41 |
42 |
43 |
44 | function __metadata(metadataKey, metadataValue) {
45 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
46 | }
47 |
48 | var WidgetHelloComponent = (function () {
49 | function WidgetHelloComponent() {
50 | }
51 | WidgetHelloComponent.prototype.ngOnInit = function () { };
52 | WidgetHelloComponent = __decorate([
53 | Component({
54 | selector: 'widget-hello',
55 | template: "\n \n
\n
\n widget-hello\n
\n
\n Hello World \n
\n
\n
\n "
56 | }),
57 | __metadata("design:paramtypes", [])
58 | ], WidgetHelloComponent);
59 | return WidgetHelloComponent;
60 | }());
61 |
62 | var ANestedComponent = (function () {
63 | function ANestedComponent() {
64 | }
65 | ANestedComponent.prototype.ngOnInit = function () { };
66 | ANestedComponent = __decorate([
67 | Component({
68 | selector: 'exclamations',
69 | template: "\n !!!\n "
70 | }),
71 | __metadata("design:paramtypes", [])
72 | ], ANestedComponent);
73 | return ANestedComponent;
74 | }());
75 |
76 | var WidgetHelloModule = (exports('WidgetHelloModule', function () {
77 | function WidgetHelloModule() {
78 | }
79 | WidgetHelloModule = __decorate([
80 | NgModule({
81 | imports: [CommonModule],
82 | declarations: [
83 | WidgetHelloComponent,
84 | ANestedComponent
85 | ],
86 | entryComponents: [WidgetHelloComponent],
87 | providers: [{
88 | provide: 'widget-hello',
89 | useValue: WidgetHelloComponent
90 | }]
91 | })
92 | ], WidgetHelloModule);
93 | return WidgetHelloModule;
94 | }()));
95 |
96 | }
97 | };
98 | });
99 |
--------------------------------------------------------------------------------
/widgets-repo/widgets/widget-quotes.bundle.js:
--------------------------------------------------------------------------------
1 | System.register(['@angular/core', '@angular/common/http', '@angular/common'], function (exports, module) {
2 | 'use strict';
3 | var Injectable, Component, NgModule, HttpClient, HttpClientModule, CommonModule;
4 | return {
5 | setters: [function (module) {
6 | Injectable = module.Injectable;
7 | Component = module.Component;
8 | NgModule = module.NgModule;
9 | }, function (module) {
10 | HttpClient = module.HttpClient;
11 | HttpClientModule = module.HttpClientModule;
12 | }, function (module) {
13 | CommonModule = module.CommonModule;
14 | }],
15 | execute: function () {
16 |
17 | /*! *****************************************************************************
18 | Copyright (c) Microsoft Corporation. All rights reserved.
19 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use
20 | this file except in compliance with the License. You may obtain a copy of the
21 | License at http://www.apache.org/licenses/LICENSE-2.0
22 |
23 | THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
24 | KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
25 | WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
26 | MERCHANTABLITY OR NON-INFRINGEMENT.
27 |
28 | See the Apache Version 2.0 License for specific language governing permissions
29 | and limitations under the License.
30 | ***************************************************************************** */
31 | /* global Reflect, Promise */
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | function __decorate(decorators, target, key, desc) {
40 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
41 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
42 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
43 | return c > 3 && r && Object.defineProperty(target, key, r), r;
44 | }
45 |
46 |
47 |
48 | function __metadata(metadataKey, metadataValue) {
49 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
50 | }
51 |
52 | var QuotesService = (function () {
53 | function QuotesService(http$$1) {
54 | this.http = http$$1;
55 | this.url = 'https://quotes.rest/qod?category=inspire';
56 | }
57 | QuotesService.prototype.getQuotesOfTheDay = function () {
58 | return this.http.get(this.url);
59 | };
60 | QuotesService = __decorate([
61 | Injectable(),
62 | __metadata("design:paramtypes", [HttpClient])
63 | ], QuotesService);
64 | return QuotesService;
65 | }());
66 |
67 | var WidgetQuotesComponent = (function () {
68 | function WidgetQuotesComponent(quotesService) {
69 | this.quotesService = quotesService;
70 | this.quote = 'loading ...';
71 | }
72 | WidgetQuotesComponent.prototype.ngOnInit = function () {
73 | var _this = this;
74 | this.quotesService.getQuotesOfTheDay().subscribe(function (quotes) { return _this.quote = quotes.contents.quotes[0].quote; });
75 | };
76 | WidgetQuotesComponent = __decorate([
77 | Component({
78 | selector: 'widget-quotes',
79 | template: "\n \n
\n
\n widget-quotes\n
\n
\n {{quote}}\n
\n
\n
\n "
80 | }),
81 | __metadata("design:paramtypes", [QuotesService])
82 | ], WidgetQuotesComponent);
83 | return WidgetQuotesComponent;
84 | }());
85 |
86 | var WidgetQuotesModule = (exports('WidgetQuotesModule', function () {
87 | function WidgetQuotesModule() {
88 | }
89 | WidgetQuotesModule = __decorate([
90 | NgModule({
91 | imports: [
92 | CommonModule,
93 | HttpClientModule
94 | ],
95 | declarations: [WidgetQuotesComponent],
96 | entryComponents: [WidgetQuotesComponent],
97 | providers: [
98 | {
99 | provide: 'widget-quotes',
100 | useValue: WidgetQuotesComponent
101 | },
102 | QuotesService
103 | ]
104 | })
105 | ], WidgetQuotesModule);
106 | return WidgetQuotesModule;
107 | }()));
108 |
109 | }
110 | };
111 | });
112 |
--------------------------------------------------------------------------------
/widgets-repo/widgets/widget-todays-date.bundle.js:
--------------------------------------------------------------------------------
1 | System.register(['@angular/core', '@angular/common'], function (exports, module) {
2 | 'use strict';
3 | var Component, NgModule, CommonModule;
4 | return {
5 | setters: [function (module) {
6 | Component = module.Component;
7 | NgModule = module.NgModule;
8 | }, function (module) {
9 | CommonModule = module.CommonModule;
10 | }],
11 | execute: function () {
12 |
13 | /*! *****************************************************************************
14 | Copyright (c) Microsoft Corporation. All rights reserved.
15 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use
16 | this file except in compliance with the License. You may obtain a copy of the
17 | License at http://www.apache.org/licenses/LICENSE-2.0
18 |
19 | THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 | KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
21 | WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
22 | MERCHANTABLITY OR NON-INFRINGEMENT.
23 |
24 | See the Apache Version 2.0 License for specific language governing permissions
25 | and limitations under the License.
26 | ***************************************************************************** */
27 | /* global Reflect, Promise */
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | function __decorate(decorators, target, key, desc) {
36 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
37 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
38 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
39 | return c > 3 && r && Object.defineProperty(target, key, r), r;
40 | }
41 |
42 |
43 |
44 | function __metadata(metadataKey, metadataValue) {
45 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
46 | }
47 |
48 | var WidgetTodaysDateComponent = (function () {
49 | function WidgetTodaysDateComponent() {
50 | this.currentDate = new Date();
51 | }
52 | WidgetTodaysDateComponent.prototype.ngOnInit = function () {
53 | };
54 | WidgetTodaysDateComponent = __decorate([
55 | Component({
56 | selector: 'widget-todays-date',
57 | template: "\n \n
\n
\n widget-todays-date\n
\n
\n {{currentDate | date}}\n
\n
\n
\n "
58 | }),
59 | __metadata("design:paramtypes", [])
60 | ], WidgetTodaysDateComponent);
61 | return WidgetTodaysDateComponent;
62 | }());
63 |
64 | var WidgetTodaysDateModule = (exports('WidgetTodaysDateModule', function () {
65 | function WidgetTodaysDateModule() {
66 | }
67 | WidgetTodaysDateModule = __decorate([
68 | NgModule({
69 | imports: [CommonModule],
70 | declarations: [WidgetTodaysDateComponent],
71 | entryComponents: [WidgetTodaysDateComponent],
72 | providers: [{
73 | provide: 'widget-todays-date',
74 | useValue: WidgetTodaysDateComponent
75 | }]
76 | })
77 | ], WidgetTodaysDateModule);
78 | return WidgetTodaysDateModule;
79 | }()));
80 |
81 | }
82 | };
83 | });
84 |
--------------------------------------------------------------------------------
/widgets-repo/widgets/widgets.config.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "widget-todays-date",
4 | "moduleBundlePath": "/widgets-repo/widget-todays-date.bundle.js",
5 | "moduleName": "WidgetTodaysDateModule"
6 | },
7 | {
8 | "name": "widget-hello",
9 | "moduleBundlePath": "/widgets-repo/widget-hello.bundle.js",
10 | "moduleName": "WidgetHelloModule"
11 | },
12 | {
13 | "name": "widget-quotes",
14 | "moduleBundlePath": "/widgets-repo/widget-quotes.bundle.js",
15 | "moduleName": "WidgetQuotesModule"
16 | }
17 | ]
--------------------------------------------------------------------------------
/widgets-repo/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | async@^1.5.2:
6 | version "1.5.2"
7 | resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
8 |
9 | colors@1.0.3:
10 | version "1.0.3"
11 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b"
12 |
13 | corser@~2.0.0:
14 | version "2.0.1"
15 | resolved "https://registry.yarnpkg.com/corser/-/corser-2.0.1.tgz#8eda252ecaab5840dcd975ceb90d9370c819ff87"
16 |
17 | debug@^2.2.0:
18 | version "2.6.9"
19 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
20 | dependencies:
21 | ms "2.0.0"
22 |
23 | debug@^3.1.0:
24 | version "3.1.0"
25 | resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
26 | dependencies:
27 | ms "2.0.0"
28 |
29 | ecstatic@^3.0.0:
30 | version "3.2.0"
31 | resolved "https://registry.yarnpkg.com/ecstatic/-/ecstatic-3.2.0.tgz#1b1aee1ca7c6b99cfb5cf6c9b26b481b90c4409f"
32 | dependencies:
33 | he "^1.1.1"
34 | mime "^1.4.1"
35 | minimist "^1.1.0"
36 | url-join "^2.0.2"
37 |
38 | eventemitter3@^3.0.0:
39 | version "3.1.0"
40 | resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163"
41 |
42 | follow-redirects@^1.0.0:
43 | version "1.4.1"
44 | resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.4.1.tgz#d8120f4518190f55aac65bb6fc7b85fcd666d6aa"
45 | dependencies:
46 | debug "^3.1.0"
47 |
48 | he@^1.1.1:
49 | version "1.1.1"
50 | resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
51 |
52 | http-proxy@^1.8.1:
53 | version "1.17.0"
54 | resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a"
55 | dependencies:
56 | eventemitter3 "^3.0.0"
57 | follow-redirects "^1.0.0"
58 | requires-port "^1.0.0"
59 |
60 | http-server@^0.11.1:
61 | version "0.11.1"
62 | resolved "https://registry.yarnpkg.com/http-server/-/http-server-0.11.1.tgz#2302a56a6ffef7f9abea0147d838a5e9b6b6a79b"
63 | dependencies:
64 | colors "1.0.3"
65 | corser "~2.0.0"
66 | ecstatic "^3.0.0"
67 | http-proxy "^1.8.1"
68 | opener "~1.4.0"
69 | optimist "0.6.x"
70 | portfinder "^1.0.13"
71 | union "~0.4.3"
72 |
73 | mime@^1.4.1:
74 | version "1.6.0"
75 | resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
76 |
77 | minimist@0.0.8:
78 | version "0.0.8"
79 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
80 |
81 | minimist@^1.1.0:
82 | version "1.2.0"
83 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
84 |
85 | minimist@~0.0.1:
86 | version "0.0.10"
87 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
88 |
89 | mkdirp@0.5.x:
90 | version "0.5.1"
91 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
92 | dependencies:
93 | minimist "0.0.8"
94 |
95 | ms@2.0.0:
96 | version "2.0.0"
97 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
98 |
99 | opener@~1.4.0:
100 | version "1.4.3"
101 | resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8"
102 |
103 | optimist@0.6.x:
104 | version "0.6.1"
105 | resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
106 | dependencies:
107 | minimist "~0.0.1"
108 | wordwrap "~0.0.2"
109 |
110 | portfinder@^1.0.13:
111 | version "1.0.13"
112 | resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9"
113 | dependencies:
114 | async "^1.5.2"
115 | debug "^2.2.0"
116 | mkdirp "0.5.x"
117 |
118 | qs@~2.3.3:
119 | version "2.3.3"
120 | resolved "https://registry.yarnpkg.com/qs/-/qs-2.3.3.tgz#e9e85adbe75da0bbe4c8e0476a086290f863b404"
121 |
122 | requires-port@^1.0.0:
123 | version "1.0.0"
124 | resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
125 |
126 | union@~0.4.3:
127 | version "0.4.6"
128 | resolved "https://registry.yarnpkg.com/union/-/union-0.4.6.tgz#198fbdaeba254e788b0efcb630bc11f24a2959e0"
129 | dependencies:
130 | qs "~2.3.3"
131 |
132 | url-join@^2.0.2:
133 | version "2.0.5"
134 | resolved "https://registry.yarnpkg.com/url-join/-/url-join-2.0.5.tgz#5af22f18c052a000a48d7b82c5e9c2e2feeda728"
135 |
136 | wordwrap@~0.0.2:
137 | version "0.0.3"
138 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
139 |
--------------------------------------------------------------------------------