Skip to content

Commit 63903c5

Browse files
committed
Starter skeleton for Angular Material docs site (#1)
1 parent ab4cc1d commit 63903c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+9068
-6
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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 = 0
13+
trim_trailing_whitespace = false

.firebaserc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{}
2+
{
3+
"projects": {
4+
"default": "material2-docs-dev"
5+
}
6+
}

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
7+
# dependencies
8+
/node_modules
9+
/bower_components
10+
11+
# IDEs and editors
12+
/.idea
13+
/.vscode
14+
.project
15+
.classpath
16+
*.launch
17+
.settings/
18+
19+
# misc
20+
/.sass-cache
21+
/connect.lock
22+
/coverage/*
23+
/libpeerconnection.log
24+
npm-debug.log
25+
testem.log
26+
/typings
27+
28+
# e2e
29+
/e2e/*.js
30+
/e2e/*.map
31+
32+
#System Files
33+
.DS_Store
34+
Thumbs.db

LICENSE

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
MIT License
1+
The MIT License
22

3-
Copyright (c) 2016 Jeremy Elbourn
3+
Copyright (c) 2016 Google, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99
copies of the Software, and to permit persons to whom the Software is
1010
furnished to do so, subject to the following conditions:
1111

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
1414

1515
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
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.
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Angular Material Docs Site
2+
3+
## Preview
4+
https://material2-docs-dev.firebaseapp.com/
5+
6+
## Production Build instructions
7+
```
8+
yarn install
9+
yarn prerender:serve &
10+
yarn run prod-build
11+
open http://localhost:4201
12+
```
13+
14+
For development builds use the usual `ng serve` and `ng build` commands.
15+
16+
17+
----------------------------------------------------------------------------------------------------------------
18+
19+
20+
This project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.19-3.
21+
22+
## Development server
23+
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.
24+
25+
## Code scaffolding
26+
27+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class`.
28+
29+
## Build
30+
31+
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.
32+
33+
## Running unit tests
34+
35+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
36+
37+
## Running end-to-end tests
38+
39+
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
40+
Before running the tests make sure you are serving the app via `ng serve`.
41+
42+
## Deploying to Github Pages
43+
44+
Run `ng github-pages:deploy` to deploy to Github Pages.
45+
46+
## Further help
47+
48+
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).

angular-cli.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"project": {
3+
"version": "1.0.0-beta.19-3",
4+
"name": "material-angular-io"
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+
"test": "test.ts",
17+
"tsconfig": "tsconfig.json",
18+
"prefix": "app",
19+
"mobile": false,
20+
"styles": [
21+
"main.scss"
22+
],
23+
"scripts": [],
24+
"environments": {
25+
"source": "environments/environment.ts",
26+
"dev": "environments/environment.ts",
27+
"prod": "environments/environment.prod.ts"
28+
}
29+
}
30+
],
31+
"addons": [],
32+
"packages": [],
33+
"e2e": {
34+
"protractor": {
35+
"config": "./protractor.conf.js"
36+
}
37+
},
38+
"test": {
39+
"karma": {
40+
"config": "./karma.conf.js"
41+
}
42+
},
43+
"defaults": {
44+
"styleExt": "css",
45+
"prefixInterfaces": false,
46+
"inline": {
47+
"style": false,
48+
"template": false
49+
},
50+
"spec": {
51+
"class": false,
52+
"component": true,
53+
"directive": true,
54+
"module": false,
55+
"pipe": true,
56+
"service": true
57+
}
58+
}
59+
}

e2e/app.e2e-spec.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { MaterialDocsAppPage } from './app.po';
2+
3+
describe('angular-io-v42 App', function() {
4+
let page: MaterialDocsAppPage;
5+
6+
beforeEach(() => {
7+
page = new MaterialDocsAppPage();
8+
});
9+
10+
it('should do something', () => {
11+
expect(1).toBe(1);
12+
});
13+
});

e2e/app.po.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import {browser} from 'protractor';
2+
3+
export class MaterialDocsAppPage {
4+
5+
}

e2e/tsconfig.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"declaration": false,
5+
"emitDecoratorMetadata": true,
6+
"experimentalDecorators": true,
7+
"module": "commonjs",
8+
"moduleResolution": "node",
9+
"outDir": "../dist/out-tsc-e2e",
10+
"sourceMap": true,
11+
"target": "es5",
12+
"typeRoots": [
13+
"../node_modules/@types"
14+
]
15+
}
16+
}

firebase.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"hosting": {
3+
"public": "dist",
4+
"cleanUrls": true
5+
}
6+
}

karma.conf.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/0.13/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-remap-istanbul'),
12+
require('angular-cli/plugins/karma')
13+
],
14+
files: [
15+
{ pattern: './src/test.ts', watched: false }
16+
],
17+
preprocessors: {
18+
'./src/test.ts': ['angular-cli']
19+
},
20+
remapIstanbulReporter: {
21+
reports: {
22+
html: 'coverage',
23+
lcovonly: './coverage/coverage.lcov'
24+
}
25+
},
26+
angularCli: {
27+
config: './angular-cli.json',
28+
environment: 'dev'
29+
},
30+
reporters: config.angularCli && config.angularCli.codeCoverage
31+
? ['progress', 'karma-remap-istanbul']
32+
: ['progress'],
33+
port: 9876,
34+
colors: true,
35+
logLevel: config.LOG_INFO,
36+
autoWatch: true,
37+
browsers: ['Chrome'],
38+
singleRun: false
39+
});
40+
};

package.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"name": "angular-io-v42",
3+
"version": "0.0.0",
4+
"license": "MIT",
5+
"angular-cli": {},
6+
"scripts": {
7+
"start": "ng serve",
8+
"lint": "tslint \"src/**/*.ts\"",
9+
"test": "ng test",
10+
"pree2e": "webdriver-manager update",
11+
"e2e": "protractor",
12+
"prerender": "node tools/prerenderer/get-all-urls.js && protractor protractor-prerender.conf.js",
13+
"prerender:serve": "node tools/prerenderer/serve.js",
14+
"prod-build": "ng build --aot --prod && npm run prerender && cp -r tmp/prerendered/* dist/",
15+
"postinstall": "webdriver-manager update"
16+
},
17+
"private": true,
18+
"dependencies": {
19+
"@angular/common": "~2.1.0",
20+
"@angular/compiler": "~2.1.0",
21+
"@angular/core": "~2.1.0",
22+
"@angular/forms": "~2.1.0",
23+
"@angular/http": "~2.1.0",
24+
"@angular/material": "^2.0.0-alpha.9-3",
25+
"@angular/platform-browser": "~2.1.0",
26+
"@angular/platform-browser-dynamic": "~2.1.0",
27+
"@angular/router": "~3.1.0",
28+
"core-js": "^2.4.1",
29+
"fs-extra": "^1.0.0",
30+
"hapi": "^15.2.0",
31+
"inert": "^4.0.2",
32+
"rxjs": "5.0.0-beta.12",
33+
"ts-helpers": "^1.1.1",
34+
"zone.js": "^0.6.23"
35+
},
36+
"devDependencies": {
37+
"@types/jasmine": "^2.2.30",
38+
"@types/node": "^6.0.42",
39+
"angular-cli": "1.0.0-beta.19-3",
40+
"codelyzer": "1.0.0-beta.1",
41+
"jasmine-core": "2.4.1",
42+
"jasmine-spec-reporter": "2.5.0",
43+
"karma": "1.2.0",
44+
"karma-chrome-launcher": "^2.0.0",
45+
"karma-cli": "^1.0.1",
46+
"karma-jasmine": "^1.0.2",
47+
"karma-remap-istanbul": "^0.2.1",
48+
"protractor": "4.0.9",
49+
"ts-node": "1.2.1",
50+
"tslint": "3.13.0",
51+
"typescript": "~2.0.3",
52+
"webdriver-manager": "10.2.5"
53+
}
54+
}

protractor-prerender.conf.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Protractor configuration file, see link for more information
2+
// https://github.com/angular/protractor/blob/master/docs/referenceConf.js
3+
4+
/*global jasmine */
5+
var SpecReporter = require('jasmine-spec-reporter');
6+
7+
exports.config = {
8+
allScriptsTimeout: 11000,
9+
specs: [
10+
'./tmp/prerender-specs/chunk*.spec.js'
11+
],
12+
capabilities: {
13+
'browserName': 'chrome',
14+
shardTestFiles: true,
15+
maxInstances: 10
16+
},
17+
directConnect: true,
18+
baseUrl: 'http://localhost:4201/',
19+
framework: 'jasmine',
20+
jasmineNodeOpts: {
21+
showColors: true,
22+
defaultTimeoutInterval: 30000,
23+
print: function() {}
24+
},
25+
useAllAngular2AppRoots: true,
26+
beforeLaunch: function() {
27+
require('ts-node').register({
28+
project: 'e2e'
29+
});
30+
},
31+
onPrepare: function() {
32+
jasmine.getEnv().addReporter(new SpecReporter());
33+
}
34+
};

0 commit comments

Comments
 (0)