Skip to content
This repository was archived by the owner on Mar 11, 2024. It is now read-only.

Commit 17278f8

Browse files
committed
chore: initial commit from angular-cli
_ _ _ __ _ _ __ __ _ _ _| | __ _ _ __ ___| (_) / _ | _ \ / _ | | | | |/ _ | __|____ / __| | | | (_| | | | | (_| | |_| | | (_| | | |_____| (__| | | \____|_| |_|\__ |\____|_|\____|_| \___|_|_| |___/
0 parents  commit 17278f8

29 files changed

+531
-0
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
max_line_length = 0
14+
trim_trailing_whitespace = false

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
.project
14+
.classpath
15+
*.launch
16+
.settings/
17+
18+
# misc
19+
/.sass-cache
20+
/connect.lock
21+
/coverage/*
22+
/libpeerconnection.log
23+
npm-debug.log
24+
testem.log
25+
/typings
26+
27+
# e2e
28+
/e2e/*.js
29+
/e2e/*.map
30+
31+
#System Files
32+
.DS_Store
33+
Thumbs.db

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# EnvironmentTestBug
2+
3+
This project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.11-webpack.
4+
5+
## Development server
6+
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.
7+
8+
## Code scaffolding
9+
10+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class`.
11+
12+
## Build
13+
14+
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.
15+
16+
## Running unit tests
17+
18+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
19+
20+
## Running end-to-end tests
21+
22+
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
23+
Before running the tests make sure you are serving the app via `ng serve`.
24+
25+
## Deploying to Github Pages
26+
27+
Run `ng github-pages:deploy` to deploy to Github Pages.
28+
29+
## Further help
30+
31+
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: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"project": {
3+
"version": "1.0.0-beta.11-webpack",
4+
"name": "environment-test-bug"
5+
},
6+
"apps": [
7+
{
8+
"main": "src/main.ts",
9+
"tsconfig": "src/tsconfig.json",
10+
"mobile": false
11+
}
12+
],
13+
"addons": [],
14+
"packages": [],
15+
"e2e": {
16+
"protractor": {
17+
"config": "config/protractor.conf.js"
18+
}
19+
},
20+
"test": {
21+
"karma": {
22+
"config": "config/karma.conf.js"
23+
}
24+
},
25+
"defaults": {
26+
"prefix": "app",
27+
"sourceDir": "src",
28+
"styleExt": "css",
29+
"prefixInterfaces": false,
30+
"lazyRoutePrefix": "+"
31+
}
32+
}

config/karma.conf.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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-coverage'),
12+
require('angular-cli/plugins/karma')
13+
],
14+
customLaunchers: {
15+
// chrome setup for travis CI using chromium
16+
Chrome_travis_ci: {
17+
base: 'Chrome',
18+
flags: ['--no-sandbox']
19+
}
20+
},
21+
files: [
22+
{ pattern: './src/test.ts', watched: false }
23+
],
24+
preprocessors: {
25+
'./src/test.ts': ['angular-cli']
26+
},
27+
angularCliConfig: './angular-cli.json',
28+
reporters: ['coverage', 'progress'],
29+
port: 9876,
30+
colors: true,
31+
logLevel: config.LOG_INFO,
32+
autoWatch: true,
33+
browsers: ['Chrome'],
34+
singleRun: false
35+
});
36+
};

config/protractor.conf.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
'../e2e/**/*.e2e-spec.ts'
11+
],
12+
capabilities: {
13+
'browserName': 'chrome'
14+
},
15+
directConnect: true,
16+
baseUrl: 'http://localhost:4200/',
17+
framework: 'jasmine',
18+
jasmineNodeOpts: {
19+
showColors: true,
20+
defaultTimeoutInterval: 30000,
21+
print: function() {}
22+
},
23+
useAllAngular2AppRoots: true,
24+
beforeLaunch: function() {
25+
require('ts-node').register({
26+
project: 'e2e'
27+
});
28+
},
29+
onPrepare: function() {
30+
jasmine.getEnv().addReporter(new SpecReporter());
31+
}
32+
};

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 { EnvironmentTestBugPage } from './app.po';
2+
3+
describe('environment-test-bug App', function() {
4+
let page: EnvironmentTestBugPage;
5+
6+
beforeEach(() => {
7+
page = new EnvironmentTestBugPage();
8+
});
9+
10+
it('should display message saying app works', () => {
11+
page.navigateTo();
12+
expect(page.getParagraphText()).toEqual('app works!');
13+
});
14+
});

e2e/app.po.ts

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

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+
}

package.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "environment-test-bug",
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+
},
13+
"private": true,
14+
"dependencies": {
15+
"@angular/common": "2.0.0-rc.4",
16+
"@angular/compiler": "2.0.0-rc.4",
17+
"@angular/core": "2.0.0-rc.4",
18+
"@angular/forms": "0.2.0",
19+
"@angular/http": "2.0.0-rc.4",
20+
"@angular/platform-browser": "2.0.0-rc.4",
21+
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
22+
"@angular/router": "3.0.0-beta.2",
23+
"core-js": "^2.4.0",
24+
"reflect-metadata": "0.1.3",
25+
"rxjs": "5.0.0-beta.6",
26+
"ts-helpers": "^1.1.1",
27+
"zone.js": "0.6.12"
28+
},
29+
"devDependencies": {
30+
"@types/jasmine": "^2.2.30",
31+
"@types/protractor": "^1.5.16",
32+
"angular-cli": "1.0.0-beta.11-webpack",
33+
"codelyzer": "0.0.26",
34+
"jasmine-core": "2.4.1",
35+
"jasmine-spec-reporter": "2.5.0",
36+
"karma": "0.13.22",
37+
"karma-chrome-launcher": "0.2.3",
38+
"karma-coverage": "^1.0.0",
39+
"karma-jasmine": "0.3.8",
40+
"protractor": "3.3.0",
41+
"ts-node": "1.2.1",
42+
"tslint": "3.13.0",
43+
"typescript": "^2.0.0"
44+
}
45+
}

public/.gitignore

Whitespace-only changes.

public/.npmignore

Whitespace-only changes.

src/app/app.component.css

Whitespace-only changes.

src/app/app.component.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<h1>
2+
{{title}}
3+
</h1>

src/app/app.component.spec.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* tslint:disable:no-unused-variable */
2+
3+
import { addProviders, async, inject } from '@angular/core/testing';
4+
import { AppComponent } from './app.component';
5+
6+
describe('App: EnvironmentTestBug', () => {
7+
beforeEach(() => {
8+
addProviders([AppComponent]);
9+
});
10+
11+
it('should create the app',
12+
inject([AppComponent], (app: AppComponent) => {
13+
expect(app).toBeTruthy();
14+
}));
15+
16+
it('should have as title \'app works!\'',
17+
inject([AppComponent], (app: AppComponent) => {
18+
expect(app.title).toEqual('app works!');
19+
}));
20+
});

src/app/app.component.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-root',
5+
templateUrl: 'app.component.html',
6+
styleUrls: ['app.component.css']
7+
})
8+
export class AppComponent {
9+
title = 'app works!';
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: false
3+
};
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+
};

src/app/environments/environment.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// The file for the current environment will overwrite this one during build.
2+
// Different environments can be found in ./environment.{dev|prod}.ts, and
3+
// you can create your own and use it with the --env flag.
4+
// The build system defaults to the dev environment.
5+
6+
export const environment = {
7+
production: false
8+
};

src/app/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './environments/environment';
2+
export * from './app.component';

src/app/shared/index.ts

Whitespace-only changes.

src/favicon.ico

5.3 KB
Binary file not shown.

src/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>EnvironmentTestBug</title>
6+
<base href="/">
7+
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<link rel="icon" type="image/x-icon" href="favicon.ico">
10+
11+
</head>
12+
<body>
13+
<app-root>Loading...</app-root>
14+
</body>
15+
</html>

src/main.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { bootstrap } from '@angular/platform-browser-dynamic';
2+
import { enableProdMode } from '@angular/core';
3+
import { AppComponent, environment } from './app/';
4+
5+
if (environment.production) {
6+
enableProdMode();
7+
}
8+
9+
bootstrap(AppComponent);

src/polyfills.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Prefer CoreJS over the polyfills above
2+
import 'core-js/es6/symbol';
3+
import 'core-js/es6/object';
4+
import 'core-js/es6/function';
5+
import 'core-js/es6/parse-int';
6+
import 'core-js/es6/parse-float';
7+
import 'core-js/es6/number';
8+
import 'core-js/es6/math';
9+
import 'core-js/es6/string';
10+
import 'core-js/es6/date';
11+
import 'core-js/es6/array';
12+
import 'core-js/es6/regexp';
13+
import 'core-js/es6/map';
14+
import 'core-js/es6/set';
15+
import 'core-js/es6/reflect';
16+
17+
import 'core-js/es7/reflect';
18+
import 'zone.js/dist/zone';

0 commit comments

Comments
 (0)