Skip to content

Commit

Permalink
another commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulsahay19 committed Feb 16, 2018
1 parent dee6ecd commit dc2dc41
Show file tree
Hide file tree
Showing 78 changed files with 1,406 additions and 1,778 deletions.
113 changes: 104 additions & 9 deletions .angular-cli.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,75 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"$schema": "./node_modules/@nrwl/schematics/src/schema.json",
"project": {
"name": "existing-proj"
"name": "existing-proj",
"npmScope": "first-suite",
"latestMigration": "20180130-angular-devkit-schematics"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"root": "apps\\first-client\\src",
"outDir": "dist\\apps\\first-client",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"test": "../../../test.js",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"testTsconfig": "../../../tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
},
"name": "first-client"
},
{
"name": "second-client",
"root": "apps/second-client/src",
"outDir": "dist/apps/second-client",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "../../../test.js",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "../../../tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
},
{
"name": "third-client",
"root": "apps/third-client/src",
"outDir": "dist/apps/third-client",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "../../../test.js",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "../../../tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
Expand All @@ -27,6 +80,24 @@
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
},
{
"name": "first-lib",
"root": "libs/first-lib/src",
"test": "../../../test.js",
"appRoot": ""
},
{
"name": "second-lib",
"root": "libs/second-lib/src",
"test": "../../../test.js",
"appRoot": ""
},
{
"name": "third-lib",
"root": "libs/third-lib/src",
"test": "../../../test.js",
"appRoot": ""
}
],
"e2e": {
Expand All @@ -36,15 +107,31 @@
},
"lint": [
{
"project": "src/tsconfig.app.json",
"project": "apps\\first-client\\src/tsconfig.app.json",
"exclude": "**/node_modules/**"
},
{
"project": "./tsconfig.spec.json",
"exclude": "**/node_modules/**"
},
{
"project": "first-client/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
},
{
"project": "src/tsconfig.spec.json",
"project": "apps/second-client/src/tsconfig.app.json",
"exclude": "**/node_modules/**"
},
{
"project": "e2e/tsconfig.e2e.json",
"project": "apps/second-client/e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
},
{
"project": "apps/third-client/src/tsconfig.app.json",
"exclude": "**/node_modules/**"
},
{
"project": "apps/third-client/e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
}
],
Expand All @@ -54,6 +141,14 @@
}
},
"defaults": {
"schematics": {
"collection": "@nrwl/schematics",
"postGenerate": "npm run format",
"newProject": [
"app",
"lib"
]
},
"styleExt": "css",
"component": {}
}
Expand Down
Binary file added .angular_cli165.tgz
Binary file not shown.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions apps/first-client/e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../dist/out-tsc/e2e/first-client",
"baseUrl": "./",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
},
"exclude": [
"**/*.spec.ts"
],
"include": [
"../**/*.ts"
]
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1>
</h1>
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
</div>
<h2>Here are some links to help you start: </h2>
<h2>First Client: </h2>
<ul>
<li>
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
Expand Down
36 changes: 36 additions & 0 deletions apps/first-client/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(
async(() => {
TestBed.configureTestingModule({
declarations: [AppComponent]
}).compileComponents();
})
);
it(
'should create the app',
async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
})
);
it(
`should have as title 'app'`,
async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('app');
})
);
it(
'should render title in a h1 tag',
async(() => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
})
);
});
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';


import { AppComponent } from './app.component';


@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule
],
declarations: [AppComponent],
imports: [BrowserModule],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
export class AppModule {}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion src/main.ts → apps/first-client/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ if (environment.production) {
enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule)
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.log(err));
8 changes: 1 addition & 7 deletions src/polyfills.ts → apps/first-client/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,20 @@
/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';


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


/**
* 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`.



/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.


import 'zone.js/dist/zone'; // Included with Angular CLI.

/***************************************************************************************************
* APPLICATION IMPORTS
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"extends": "../tsconfig.json",
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"outDir": "../../../dist/out-tsc/apps/first-client",
"baseUrl": "./",
"module": "es2015",
"types": []
},
"exclude": [
"test.ts",
"**/*.spec.ts"
],
"include": [
"**/*.ts"
]
}
}
File renamed without changes.
14 changes: 14 additions & 0 deletions apps/second-client/e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { AppPage } from './app.po';

describe('second-client App', () => {
let page: AppPage;

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

it('should display welcome message', () => {
page.navigateTo();
expect(page.text()).toContain('Welcome');
});
});
11 changes: 11 additions & 0 deletions apps/second-client/e2e/app.po.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { browser, by, element } from 'protractor';

export class AppPage {
navigateTo() {
return browser.get('/');
}

text() {
return browser.findElement(by.css('body')).getText();
}
}
20 changes: 20 additions & 0 deletions apps/second-client/e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../dist/out-tsc/e2e/second-client",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
},
"include": [
"../**/*.ts"
/* add all lazy-loaded libraries here: "../../../libs/my-lib/index.ts" */
],
"exclude": [
"**/*.spec.ts"
]
}
Empty file.
17 changes: 17 additions & 0 deletions apps/second-client/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

<div style="text-align:center">
<h1>
Welcome to 2nd Client!
</h1>
<img width="300" src="assets/nx-logo.png">
</div>

<h2>Nx</h2>

An open source toolkit for enterprise Angular applications.

Nx is designed to help you create and build enterprise grade Angular applications. It provides an opinionated approach to application project structure and patterns.

<h2>Quick Start & Documentation</h2>

<a href="https://nrwl.io/nx">Watch a 5-minute video on how to get started with Nx.</a>
26 changes: 26 additions & 0 deletions apps/second-client/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { AppComponent } from './app.component';

describe('AppComponent', () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;

beforeEach(
async(() => {
TestBed.configureTestingModule({
declarations: [AppComponent]
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(AppComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Loading

0 comments on commit dc2dc41

Please sign in to comment.