Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 005d9b7

Browse files
committed
docs(cli-quickstart): add cli-quickstart chapter
1 parent f4223c7 commit 005d9b7

29 files changed

+554
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Language: JavaScript
2+
BasedOnStyle: Google
3+
ColumnLimit: 100
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
14+
# misc
15+
/.sass-cache
16+
/connect.lock
17+
/coverage/*
18+
/libpeerconnection.log
19+
npm-debug.log
20+
testem.log
21+
/typings
22+
23+
# e2e
24+
/e2e/*.js
25+
/e2e/*.map
26+
27+
#System Files
28+
.DS_Store
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* global require, module */
2+
3+
var Angular2App = require('angular-cli/lib/broccoli/angular2-app');
4+
5+
module.exports = function(defaults) {
6+
return new Angular2App(defaults, {
7+
vendorNpmFiles: []
8+
});
9+
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"project": {
3+
"version": "0.0.35",
4+
"name": "angular2-cli-quickstart"
5+
},
6+
"apps": [
7+
{"main": "src/main.ts", "tsconfig": "src/tsconfig.json"}
8+
],
9+
"addons": [],
10+
"packages": [],
11+
"e2e": {
12+
"protractor": {
13+
"config": "config/protractor.conf.js"
14+
}
15+
},
16+
"test": {
17+
"karma": {
18+
"config": "config/karma.conf.js"
19+
}
20+
},
21+
"defaults": {
22+
"prefix": "app",
23+
"sourceDir": "src"
24+
}
25+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const environment = {
2+
production: false
3+
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* jshint node: true */
2+
3+
module.exports = function(environment) {
4+
return {
5+
environment: environment,
6+
baseURL: '/',
7+
locationType: 'auto'
8+
};
9+
};
10+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const environment = {
2+
production: true
3+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*global jasmine */
2+
var SpecReporter = require('jasmine-spec-reporter');
3+
4+
exports.config = {
5+
allScriptsTimeout: 11000,
6+
specs: [
7+
'../e2e/**/*.e2e.ts'
8+
],
9+
capabilities: {
10+
'browserName': 'chrome'
11+
},
12+
directConnect: true,
13+
baseUrl: 'http://localhost:4200/',
14+
framework: 'jasmine',
15+
jasmineNodeOpts: {
16+
showColors: true,
17+
defaultTimeoutInterval: 30000,
18+
print: function() {}
19+
},
20+
useAllAngular2AppRoots: true,
21+
beforeLaunch: function() {
22+
require('ts-node').register({
23+
project: 'e2e'
24+
});
25+
},
26+
onPrepare: function() {
27+
jasmine.getEnv().addReporter(new SpecReporter());
28+
}
29+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// #docregion
2+
import { Angular2CliQuickstartPage } from './app.po';
3+
4+
describe('angular2-cli-quickstart App', function() {
5+
let page: Angular2CliQuickstartPage;
6+
7+
beforeEach(() => {
8+
page = new Angular2CliQuickstartPage();
9+
})
10+
11+
// #docregion title
12+
it('should display message saying app works', () => {
13+
page.navigateTo();
14+
expect(page.getParagraphText()).toEqual('angular2-cli-quickstart works!');
15+
});
16+
// #enddocregion title
17+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export class Angular2CliQuickstartPage {
2+
navigateTo() {
3+
return browser.get('/');
4+
}
5+
6+
getParagraphText() {
7+
return element(by.css('angular2-cli-quickstart-app h1')).getText();
8+
}
9+
}

0 commit comments

Comments
 (0)