Skip to content

Commit 4799f2b

Browse files
committed
first commit
0 parents  commit 4799f2b

Some content is hidden

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

46 files changed

+923
-0
lines changed

.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+
"version": "1.0.0-beta.32.3",
5+
"name": "new-cli"
6+
},
7+
"apps": [
8+
{
9+
"root": "src",
10+
"outDir": "dist",
11+
"assets": [
12+
"assets",
13+
"favicon.ico"
14+
],
15+
"index": "index.html",
16+
"main": "main.ts",
17+
"polyfills": "polyfills.ts",
18+
"test": "test.ts",
19+
"tsconfig": "tsconfig.json",
20+
"prefix": "app",
21+
"styles": [
22+
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
23+
"styles.css"
24+
],
25+
"scripts": [],
26+
"environmentSource": "environments/environment.ts",
27+
"environments": {
28+
"dev": "environments/environment.ts",
29+
"prod": "environments/environment.prod.ts"
30+
}
31+
}
32+
],
33+
"e2e": {
34+
"protractor": {
35+
"config": "./protractor.conf.js"
36+
}
37+
},
38+
"lint": [
39+
{
40+
"files": "src/**/*.ts",
41+
"project": "src/tsconfig.json"
42+
},
43+
{
44+
"files": "e2e/**/*.ts",
45+
"project": "e2e/tsconfig.json"
46+
}
47+
],
48+
"test": {
49+
"karma": {
50+
"config": "./karma.conf.js"
51+
}
52+
},
53+
"defaults": {
54+
"styleExt": "css",
55+
"component": {}
56+
}
57+
}

.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

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
10+
# IDEs and editors
11+
/.idea
12+
.project
13+
.classpath
14+
.c9/
15+
*.launch
16+
.settings/
17+
18+
# IDE - VSCode
19+
.vscode/*
20+
!.vscode/settings.json
21+
!.vscode/tasks.json
22+
!.vscode/launch.json
23+
!.vscode/extensions.json
24+
25+
# misc
26+
/.sass-cache
27+
/connect.lock
28+
/coverage/*
29+
/libpeerconnection.log
30+
npm-debug.log
31+
testem.log
32+
/typings
33+
34+
# e2e
35+
/e2e/*.js
36+
/e2e/*.map
37+
38+
#System Files
39+
.DS_Store
40+
Thumbs.db

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 { NewCliPage } from './app.po';
2+
3+
describe('new-cli App', () => {
4+
let page: NewCliPage;
5+
6+
beforeEach(() => {
7+
page = new NewCliPage();
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: 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 NewCliPage {
4+
navigateTo() {
5+
return browser.get('/');
6+
}
7+
8+
getParagraphText() {
9+
return element(by.css('app-root h1')).getText();
10+
}
11+
}

e2e/tsconfig.json

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

how-to-use.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
How to use
2+
----------
3+
4+
Run "npm install" inside this project folder to install all dependencies.
5+
6+
Make sure you use the latest version of the CLI (upgrade guide below)
7+
8+
Run "ng serve" to see the app in action.
9+
10+
Feel free to compare it with your project code to spot any errors you might have.
11+
12+
13+
How to upgrade the CLI
14+
-----------------------
15+
16+
Run the below commands - only use "sudo" on Mac/ Linux.
17+
18+
sudo npm uninstall -g angular-cli @angular/cli
19+
npm cache clean
20+
sudo npm install -g @angular/cli

karma.conf.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
config: './.angular-cli.json',
33+
environment: 'dev'
34+
},
35+
reporters: config.angularCli && config.angularCli.codeCoverage
36+
? ['progress', 'coverage-istanbul']
37+
: ['progress', 'kjhtml'],
38+
port: 9876,
39+
colors: true,
40+
logLevel: config.LOG_INFO,
41+
autoWatch: true,
42+
browsers: ['Chrome'],
43+
singleRun: false
44+
});
45+
};

package.json

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

protractor.conf.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Protractor configuration file, see link for more information
2+
// https://github.com/angular/protractor/blob/master/lib/config.ts
3+
4+
/*global jasmine */
5+
const { 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+
beforeLaunch: function() {
24+
require('ts-node').register({
25+
project: 'e2e'
26+
});
27+
},
28+
onPrepare() {
29+
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
30+
}
31+
};

0 commit comments

Comments
 (0)