forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(aio): add initial angular-cli scaffold (angular#14118)
- adds initial CLI-generated app - adds material toolbar - initial (very rough) scss setup, lifted from angular/material - initial routing scaffold w/ homepage
- Loading branch information
1 parent
b141a22
commit e130bc1
Showing
222 changed files
with
7,073 additions
and
613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Site | ||
|
||
This project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.26. | ||
|
||
## Development server | ||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. | ||
|
||
## Code scaffolding | ||
|
||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`. | ||
|
||
## Build | ||
|
||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. | ||
|
||
## Running unit tests | ||
|
||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). | ||
|
||
## Running end-to-end tests | ||
|
||
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). | ||
Before running the tests make sure you are serving the app via `ng serve`. | ||
|
||
## Deploying to GitHub Pages | ||
|
||
Run `ng github-pages:deploy` to deploy to GitHub Pages. | ||
|
||
## Further help | ||
|
||
To get more help on the `angular-cli` use `ng help` or go check out the [Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"project": { | ||
"version": "1.0.0-beta.26", | ||
"name": "site" | ||
}, | ||
"apps": [ | ||
{ | ||
"root": "src", | ||
"outDir": "dist", | ||
"assets": [ | ||
"assets", | ||
"favicon.ico" | ||
], | ||
"index": "index.html", | ||
"main": "main.ts", | ||
"polyfills": "polyfills.ts", | ||
"test": "test.ts", | ||
"tsconfig": "tsconfig.json", | ||
"prefix": "app", | ||
"styles": [ | ||
"styles.scss" | ||
], | ||
"scripts": [ | ||
|
||
], | ||
"environments": { | ||
"source": "environments/environment.ts", | ||
"dev": "environments/environment.ts", | ||
"prod": "environments/environment.prod.ts" | ||
} | ||
} | ||
], | ||
"e2e": { | ||
"protractor": { | ||
"config": "./protractor.conf.js" | ||
} | ||
}, | ||
"test": { | ||
"karma": { | ||
"config": "./karma.conf.js" | ||
} | ||
}, | ||
"defaults": { | ||
"styleExt": "css", | ||
"prefixInterfaces": false, | ||
"inline": { | ||
"style": false, | ||
"template": false | ||
}, | ||
"spec": { | ||
"class": false, | ||
"component": true, | ||
"directive": true, | ||
"module": false, | ||
"pipe": true, | ||
"service": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"rules": { | ||
".read": "auth != null", | ||
".write": "auth != null" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { SitePage } from './app.po'; | ||
|
||
describe('site App', function() { | ||
let page: SitePage; | ||
|
||
beforeEach(() => { | ||
page = new SitePage(); | ||
}); | ||
|
||
it('should display message saying app works', () => { | ||
page.navigateTo(); | ||
expect(page.getParagraphText()).toEqual('app works!'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { browser, element, by } from 'protractor'; | ||
|
||
export class SitePage { | ||
navigateTo() { | ||
return browser.get('/'); | ||
} | ||
|
||
getParagraphText() { | ||
return element(by.css('app-root h1')).getText(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"compileOnSave": false, | ||
"compilerOptions": { | ||
"declaration": false, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"outDir": "../dist/out-tsc-e2e", | ||
"sourceMap": true, | ||
"target": "es5", | ||
"typeRoots": [ | ||
"../node_modules/@types" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"database": { | ||
"rules": "database.rules.json" | ||
}, | ||
"hosting": { | ||
"public": "dist", | ||
"rewrites": [ | ||
{ | ||
"source": "**", | ||
"destination": "/index.html" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Karma configuration file, see link for more information | ||
// https://karma-runner.github.io/0.13/config/configuration-file.html | ||
console.log('karama!!!') | ||
module.exports = function (config) { | ||
config.set({ | ||
basePath: '', | ||
frameworks: ['jasmine', 'angular-cli'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher'), | ||
require('karma-remap-istanbul'), | ||
require('angular-cli/plugins/karma') | ||
], | ||
files: [ | ||
{ pattern: './src/test.ts', watched: false } | ||
], | ||
preprocessors: { | ||
'./src/test.ts': ['angular-cli'] | ||
}, | ||
mime: { | ||
'text/x-typescript': ['ts','tsx'] | ||
}, | ||
remapIstanbulReporter: { | ||
reports: { | ||
html: 'coverage', | ||
lcovonly: './coverage/coverage.lcov' | ||
} | ||
}, | ||
angularCli: { | ||
config: './angular-cli.json', | ||
environment: 'dev' | ||
}, | ||
reporters: config.angularCli && config.angularCli.codeCoverage | ||
? ['progress', 'karma-remap-istanbul'] | ||
: ['progress'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ['Chrome'], | ||
singleRun: false | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,48 @@ | ||
{ | ||
"name": "angular.io", | ||
"version": "0.0.0", | ||
"main": "index.js", | ||
"repository": "[email protected]:angular/angular.git", | ||
"author": "Angular", | ||
"license": "MIT", | ||
"dependencies": {}, | ||
"angular-cli": {}, | ||
"scripts": { | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"lint": "tslint \"src/**/*.ts\" --project src/tsconfig.json --type-check && tslint \"e2e/**/*.ts\" --project e2e/tsconfig.json --type-check", | ||
"test": "ng test", | ||
"pree2e": "webdriver-manager update --standalone false --gecko false", | ||
"e2e": "protractor" | ||
}, | ||
"private": true, | ||
"dependencies": { | ||
"@angular/common": "^2.3.1", | ||
"@angular/compiler": "^2.3.1", | ||
"@angular/core": "^2.3.1", | ||
"@angular/forms": "^2.3.1", | ||
"@angular/http": "^2.3.1", | ||
"@angular/material": "^2.0.0-beta.1", | ||
"@angular/platform-browser": "^2.3.1", | ||
"@angular/platform-browser-dynamic": "^2.3.1", | ||
"@angular/router": "^3.3.1", | ||
"core-js": "^2.4.1", | ||
"rxjs": "^5.0.1", | ||
"ts-helpers": "^1.1.1", | ||
"zone.js": "^0.7.2" | ||
}, | ||
"devDependencies": { | ||
"firebase-tools": "^3.2.1" | ||
"@angular/compiler-cli": "^2.3.1", | ||
"@types/jasmine": "2.5.38", | ||
"@types/node": "^6.0.42", | ||
"angular-cli": "1.0.0-beta.26", | ||
"codelyzer": "~2.0.0-beta.1", | ||
"jasmine-core": "2.5.2", | ||
"jasmine-spec-reporter": "2.5.0", | ||
"karma": "1.2.0", | ||
"karma-chrome-launcher": "^2.0.0", | ||
"karma-cli": "^1.0.1", | ||
"karma-jasmine": "^1.0.2", | ||
"karma-remap-istanbul": "^0.2.1", | ||
"protractor": "~4.0.13", | ||
"ts-node": "1.2.1", | ||
"tslint": "^4.3.0", | ||
"typescript": "2.0.10" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Protractor configuration file, see link for more information | ||
// https://github.com/angular/protractor/blob/master/lib/config.ts | ||
|
||
/*global jasmine */ | ||
var SpecReporter = require('jasmine-spec-reporter'); | ||
|
||
exports.config = { | ||
allScriptsTimeout: 11000, | ||
specs: [ | ||
'./e2e/**/*.e2e-spec.ts' | ||
], | ||
capabilities: { | ||
'browserName': 'chrome' | ||
}, | ||
directConnect: true, | ||
baseUrl: 'http://localhost:4200/', | ||
framework: 'jasmine', | ||
jasmineNodeOpts: { | ||
showColors: true, | ||
defaultTimeoutInterval: 30000, | ||
print: function() {} | ||
}, | ||
useAllAngular2AppRoots: true, | ||
beforeLaunch: function() { | ||
require('ts-node').register({ | ||
project: 'e2e' | ||
}); | ||
}, | ||
onPrepare: function() { | ||
jasmine.getEnv().addReporter(new SpecReporter()); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<md-toolbar color="primary" class="app-toolbar"> | ||
<span>Angular</span> | ||
|
||
</md-toolbar> | ||
<section class="app-content"> | ||
<router-outlet></router-outlet> | ||
</section> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// /* tslint:disable:no-unused-variable */ | ||
|
||
// import { TestBed, async } from '@angular/core/testing'; | ||
// import { AppComponent } from './app.component'; | ||
|
||
describe('AppComponent', () => { | ||
// beforeEach(() => { | ||
// TestBed.configureTestingModule({ | ||
// declarations: [ | ||
// AppComponent | ||
// ], | ||
// }); | ||
// TestBed.compileComponents(); | ||
// }); | ||
it('should work', () => { | ||
expect(true).toBe(true) | ||
}) | ||
}) | ||
|
||
// 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 works!'`, async(() => { | ||
// const fixture = TestBed.createComponent(AppComponent); | ||
// const app = fixture.debugElement.componentInstance; | ||
// expect(app.title).toEqual('app works!'); | ||
// })); | ||
|
||
// 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('app works!'); | ||
// })); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-shell', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.scss'] | ||
}) | ||
export class AppComponent { | ||
title = 'app works!'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule } from '@angular/router'; | ||
import { AppComponent } from './app.component'; | ||
import { MdToolbarModule } from '@angular/material/toolbar'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
MdToolbarModule.forRoot(), | ||
RouterModule.forRoot([ | ||
{ path: '', loadChildren: './home-page/home-page.module#HomePageModule'} | ||
]) | ||
], | ||
providers: [], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule { } |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<p> | ||
docs-app works! | ||
</p> |
Oops, something went wrong.