Skip to content

Commit 8423aa8

Browse files
committed
Merge branch 'ng4x'
2 parents 95f0f60 + 784bc29 commit 8423aa8

Some content is hidden

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

64 files changed

+1207
-75
lines changed

.gitignore

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,35 @@
1+
############
2+
## Project
3+
############
4+
5+
bundles/
6+
node_modules/
7+
coverage/
8+
9+
*.map
10+
*.d.ts
11+
*.metadata.json
12+
*.js
13+
# overrides for js
14+
!config/*
15+
!demo/cli/*js
16+
!copy.js
17+
!karma.conf.js
18+
!webpack.config.js
19+
120
#################
221
## Misc
322
#################
4-
**/.DS_Store
23+
524
nbproject
625
manifest.mf
726
build.xml
8-
node_modules/*
927
npm-debug.log
10-
*.js
11-
!config/*
12-
!karma.conf.js
13-
*.map
14-
*.d.ts
15-
!copy.js
16-
!webpack.config.js
17-
!examples/**/*.js
18-
coverage
19-
*.metadata.json
20-
/compiled
2128

2229
#################
2330
## IDEs
2431
#################
32+
2533
.idea
2634
.project
2735
.settings
@@ -31,18 +39,12 @@ coverage
3139
## Windows
3240
############
3341

34-
# Windows image file caches
3542
Thumbs.db
36-
37-
# Folder config file
3843
Desktop.ini
3944

4045
############
4146
## Mac
4247
############
4348

44-
# Mac crap
4549
.DS_Store
4650

47-
bundles/
48-
node_modules/

.npmignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,9 @@ Desktop.ini
4141

4242
# Mac crap
4343
.DS_Store
44+
45+
############
46+
## Demos
47+
############
48+
49+
demo/*

demo/cli/.angular-cli.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"project": {
4+
"name": "cli"
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+
"polyfills": "polyfills.ts",
17+
"test": "test.ts",
18+
"tsconfig": "tsconfig.app.json",
19+
"testTsconfig": "tsconfig.spec.json",
20+
"prefix": "app",
21+
"styles": [
22+
"styles.css"
23+
],
24+
"scripts": [],
25+
"environmentSource": "environments/environment.ts",
26+
"environments": {
27+
"dev": "environments/environment.ts",
28+
"prod": "environments/environment.prod.ts"
29+
}
30+
}
31+
],
32+
"e2e": {
33+
"protractor": {
34+
"config": "./protractor.conf.js"
35+
}
36+
},
37+
"lint": [
38+
{
39+
"project": "src/tsconfig.app.json"
40+
},
41+
{
42+
"project": "src/tsconfig.spec.json"
43+
},
44+
{
45+
"project": "e2e/tsconfig.e2e.json"
46+
}
47+
],
48+
"test": {
49+
"karma": {
50+
"config": "./karma.conf.js"
51+
}
52+
},
53+
"defaults": {
54+
"styleExt": "css",
55+
"component": {}
56+
}
57+
}

demo/cli/.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 = off
13+
trim_trailing_whitespace = false

demo/cli/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Cli
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.0.
4+
5+
## Development server
6+
7+
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.
8+
9+
## Code scaffolding
10+
11+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.
12+
13+
## Build
14+
15+
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.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24+
Before running the tests make sure you are serving the app via `ng serve`.
25+
26+
## Further help
27+
28+
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).

demo/cli/e2e/app.e2e-spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { CliPage } from './app.po';
2+
3+
describe('cli App', () => {
4+
let page: CliPage;
5+
6+
beforeEach(() => {
7+
page = new CliPage();
8+
});
9+
10+
it('should display message saying app works', () => {
11+
page.navigateTo();
12+
expect(page.getParagraphText()).toEqual('app works!');
13+
});
14+
});

demo/cli/e2e/app.po.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, element, by } from 'protractor';
2+
3+
export class CliPage {
4+
navigateTo() {
5+
return browser.get('/');
6+
}
7+
8+
getParagraphText() {
9+
return element(by.css('app-root h1')).getText();
10+
}
11+
}

demo/cli/e2e/tsconfig.e2e.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/e2e",
5+
"module": "commonjs",
6+
"target": "es5",
7+
"types":[
8+
"jasmine",
9+
"node"
10+
]
11+
}
12+
}

demo/cli/karma.conf.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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-jasmine-html-reporter'),
12+
require('karma-coverage-istanbul-reporter'),
13+
require('@angular/cli/plugins/karma')
14+
],
15+
client:{
16+
clearContext: false // leave Jasmine Spec Runner output visible in browser
17+
},
18+
files: [
19+
{ pattern: './src/test.ts', watched: false }
20+
],
21+
preprocessors: {
22+
'./src/test.ts': ['@angular/cli']
23+
},
24+
mime: {
25+
'text/x-typescript': ['ts','tsx']
26+
},
27+
coverageIstanbulReporter: {
28+
reports: [ 'html', 'lcovonly' ],
29+
fixWebpackSourcePaths: true
30+
},
31+
angularCli: {
32+
environment: 'dev'
33+
},
34+
reporters: config.angularCli && config.angularCli.codeCoverage
35+
? ['progress', 'coverage-istanbul']
36+
: ['progress', 'kjhtml'],
37+
port: 9876,
38+
colors: true,
39+
logLevel: config.LOG_INFO,
40+
autoWatch: true,
41+
browsers: ['Chrome'],
42+
singleRun: false
43+
});
44+
};

demo/cli/package.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "cli",
3+
"version": "0.0.0",
4+
"license": "MIT",
5+
"scripts": {
6+
"ng": "ng",
7+
"start": "ng serve",
8+
"build": "ng build",
9+
"test": "ng test",
10+
"lint": "ng lint",
11+
"e2e": "ng e2e"
12+
},
13+
"private": true,
14+
"dependencies": {
15+
"@angular/common": "^4.0.0",
16+
"@angular/compiler": "^4.0.0",
17+
"@angular/core": "^4.0.0",
18+
"@angular/forms": "^4.0.0",
19+
"@angular/http": "^4.0.0",
20+
"@angular/platform-browser": "^4.0.0",
21+
"@angular/platform-browser-dynamic": "^4.0.0",
22+
"@angular/router": "^4.0.0",
23+
"@ngx-translate/core": "^6.0.1",
24+
"@ngx-translate/http-loader": "0.0.3",
25+
"core-js": "^2.4.1",
26+
"localize-router": "^0.6.4",
27+
"rxjs": "^5.1.0",
28+
"zone.js": "^0.8.4"
29+
},
30+
"devDependencies": {
31+
"@angular/cli": "1.0.0",
32+
"@angular/compiler-cli": "^4.0.0",
33+
"@types/jasmine": "2.5.38",
34+
"@types/node": "~6.0.60",
35+
"codelyzer": "~2.0.0",
36+
"jasmine-core": "~2.5.2",
37+
"jasmine-spec-reporter": "~3.2.0",
38+
"karma": "~1.4.1",
39+
"karma-chrome-launcher": "~2.0.0",
40+
"karma-cli": "~1.0.1",
41+
"karma-jasmine": "~1.1.0",
42+
"karma-jasmine-html-reporter": "^0.2.2",
43+
"karma-coverage-istanbul-reporter": "^0.2.0",
44+
"protractor": "~5.1.0",
45+
"ts-node": "~2.0.0",
46+
"tslint": "~4.5.0",
47+
"typescript": "~2.2.0"
48+
}
49+
}

0 commit comments

Comments
 (0)