Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Moving to ng-packagr as build tool
Browse files Browse the repository at this point in the history
Updated @angular/cli
Fixed new lint errors
  • Loading branch information
mdvorak committed Nov 17, 2017
1 parent dd67f54 commit 717974a
Show file tree
Hide file tree
Showing 39 changed files with 12,363 additions and 566 deletions.
29 changes: 23 additions & 6 deletions .angular-cli.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "example"
"name": "angular-resource-router"
},
"apps": [
{
"root": "example",
"outDir": "example/dist",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
Expand All @@ -23,7 +25,7 @@
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.ts"
"prod": "environments/environment.prod.ts"
}
}
],
Expand All @@ -34,14 +36,29 @@
},
"lint": [
{
"project": "example/tsconfig.app.json"
"project": "src/tsconfig.lib.json",
"exclude": "**/node_modules/**"
},
{
"project": "example/tsconfig.e2e.json"
"project": "src/tsconfig.app.json",
"exclude": "**/node_modules/**"
},
{
"project": "src/tsconfig.spec.json",
"exclude": "**/node_modules/**"
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"styleExt": "scss",
"component": {}
}
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<a name="1.0.0-alpha.13"></a>
# [1.0.0-alpha.13](https://github.com/mdvorak/resource-router/compare/0...0) (2017-05-08)

Moving from gulp custom build script to ng-packagr.

### Breaking Changes

TODO

### Features

TODO

<a name="1.0.0-alpha.12"></a>
# [1.0.0-alpha.12](https://github.com/mdvorak/resource-router/compare/d1ab3bca8ea40991ed7b5e09aad06de3c828e6a1...fd09fc783ff8966c15d8c02cc95dd0a66d8f99e0) (2017-04-22)

Expand Down
12 changes: 6 additions & 6 deletions e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { ExamplePage } from './app.po';
import { AppPage } from './app.po';

describe('example App', () => {
let page: ExamplePage;
describe('resource-router App', () => {
let page: AppPage;

beforeEach(() => {
page = new ExamplePage();
page = new AppPage();
});

it('should display message saying app works', () => {
it('should display welcome message', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('app works!');
expect(page.getParagraphText()).toEqual('Welcome to app!');
});
});
4 changes: 2 additions & 2 deletions e2e/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { browser, element, by } from 'protractor';
import { browser, by, element } from 'protractor';

export class ExamplePage {
export class AppPage {
navigateTo() {
return browser.get('/');
}
Expand Down
13 changes: 4 additions & 9 deletions e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016"
],
"outDir": "../out-tsc/e2e",
"baseUrl": "./",
"module": "commonjs",
"target": "es5",
"types":[
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
Expand Down
2 changes: 1 addition & 1 deletion example/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import { ApiLocation } from 'angular-resource-router';
import { ApiLocation } from '../../public_api';

@Component({
selector: 'app-root',
Expand Down
2 changes: 1 addition & 1 deletion example/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { ResourceRouterModule } from 'angular-resource-router';
import { ResourceRouterModule } from '../../public_api';
import { AppComponent } from './app.component';
import { JsonComponent } from './components/json.component';
import { SampleComponent } from './components/sample.component';
Expand Down
6 changes: 3 additions & 3 deletions example/app/components/json.component.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { Component } from '@angular/core';
import { ViewData } from 'angular-resource-router';
import { ViewData } from '../../../public_api';

@Component({
template: `<h2>Untyped JSON</h2>
<pre>{{data.body | json}}</pre>
<a *ngIf="data.body._links?.self; let link"
<a *ngIf="data.body?._links?.self as link"
[resourceLink]="link.href" [type]="link.type" target="_self">{{link.title}}</a>
<button type="button"
*ngIf="data.body._links?.self; let link"
*ngIf="data.body?._links?.self as link"
[resourceLink]="link.href" [target]="data.target">
{{link.title}}
</button>
Expand Down
8 changes: 4 additions & 4 deletions example/app/components/sample.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import { ViewData } from 'angular-resource-router';
import { ViewData } from '../../../public_api';


export interface SampleData {
Expand All @@ -14,7 +14,7 @@ export interface SampleData {

@Component({
template: `<h2>SAmple</h2>
<form>
<form *ngIf="data">
<label for="name">Name</label>
<input id="name" name="name" type="text" [(ngModel)]="data.name">
Expand All @@ -25,11 +25,11 @@ export interface SampleData {
<input id="age" name="age" type="number" [(ngModel)]="data.age">
</form>
<a [apiLink]="data._links?.next?.href">{{data._links?.next?.title}}</a>`
<a [resourceLink]="data?._links?.next?.href">{{data?._links?.next?.title}}</a>`
})
export class SampleComponent {

data: SampleData;
data?: SampleData;

constructor(public viewData: ViewData<SampleData>) {
this.data = viewData.body;
Expand Down
3 changes: 3 additions & 0 deletions example/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const environment = {
production: true
};
6 changes: 3 additions & 3 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example</title>
<title>ResourceRouter</title>
<base href="/">

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root>Loading...</app-root>
<app-root></app-root>
</body>
</html>
3 changes: 2 additions & 1 deletion example/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ if (environment.production) {
enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule);
platformBrowserDynamic().bootstrapModule(AppModule)
.catch((err: any) => console.log(err));
42 changes: 25 additions & 17 deletions example/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,37 @@
*/

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/set';
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/** IE10 and IE11 requires the following to support `@angular/animation`. */
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/** IE10 and IE11 requires the following for the Reflect API. */
import 'core-js/es6/reflect';


/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect';


/** ALL Firefox browsers require the following to support `@angular/animation`. **/
/**
* Required to support Web Animations `@angular/platform-browser/animations`.
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.


Expand All @@ -66,3 +70,7 @@ import 'zone.js/dist/zone'; // Included with Angular CLI.
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
*/
// import 'intl'; // Run `npm install --save intl`.
/**
* Need to import at least one locale-data with intl.
*/
// import 'intl/locale-data/jsonp/en';
87 changes: 0 additions & 87 deletions example/systemjs.config.web.js

This file was deleted.

Loading

0 comments on commit 717974a

Please sign in to comment.