Skip to content

Commit 59c5687

Browse files
authored
Merge pull request #35 from ng-book/ng-cli
Updates project to Angular CLI and new styleguide
2 parents 8d398d5 + 2d0b330 commit 59c5687

File tree

121 files changed

+3656
-20260
lines changed

Some content is hidden

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

121 files changed

+3656
-20260
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+
"name": "angular-redux-chat"
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+
}

.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: 41 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,41 @@
1-
build/
2-
\.\#*
3-
4-
### Node ###
5-
# Logs
6-
logs
7-
*.log
8-
npm-debug.log*
9-
10-
# Runtime data
11-
pids
12-
*.pid
13-
*.seed
14-
15-
# Directory for instrumented libs generated by jscoverage/JSCover
16-
lib-cov
17-
18-
# Coverage directory used by tools like istanbul
19-
coverage
20-
21-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
22-
.grunt
23-
24-
# node-waf configuration
25-
.lock-wscript
26-
27-
# Compiled binary addons (http://nodejs.org/api/addons.html)
28-
build/Release
29-
30-
# Dependency directory
31-
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
32-
node_modules
33-
34-
.webpack.json
35-
36-
37-
app/ts/ChatExampleData.js
38-
app/ts/app.js
39-
app/ts/components/ChatNavBar.js
40-
app/ts/components/ChatThreads.js
41-
app/ts/components/ChatWindow.js
42-
app/ts/models.js
43-
app/ts/services/MessagesService.js
44-
app/ts/services/ThreadsService.js
45-
app/ts/services/UserService.js
46-
app/ts/services/services.js
47-
app/ts/util/FromNowPipe.js
48-
app/ts/util/RxPipe.js
49-
app/ts/util/util.js
50-
app/ts/util/uuid.js
51-
.tern-port
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+
*.sublime-workspace
18+
19+
# IDE - VSCode
20+
.vscode/*
21+
!.vscode/settings.json
22+
!.vscode/tasks.json
23+
!.vscode/launch.json
24+
!.vscode/extensions.json
25+
26+
# misc
27+
/.sass-cache
28+
/connect.lock
29+
/coverage/*
30+
/libpeerconnection.log
31+
npm-debug.log
32+
testem.log
33+
/typings
34+
35+
# e2e
36+
/e2e/*.js
37+
/e2e/*.map
38+
39+
#System Files
40+
.DS_Store
41+
Thumbs.db

.test.bats

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,38 @@ load "${NGBOOK_ROOT}/scripts/bats/fullstack.bats"
55
load "${NGBOOK_ROOT}/scripts/bats-support/load.bash"
66
load "${NGBOOK_ROOT}/scripts/bats-assert/load.bash"
77

8-
@test "angular2-rxjs-chat e2e tests pass" {
8+
@test "angular-rxjs-chat unit tests pass" {
9+
cd $DIR
10+
run npm run test
11+
assert_output --partial 'SUCCESS'
12+
}
13+
14+
@test "angular-rxjs-chat e2e tests pass" {
915
cd $DIR
10-
run ./node_modules/.bin/protractor
16+
run_ng_e2e $TEST_TMP_DIR
17+
run cat ${TEST_TMP_DIR}/log.txt
1118
assert_output --partial 'SUCCESS'
1219
}
1320

21+
@test "angular-rxjs-chat linting passes" {
22+
cd $DIR
23+
run npm run lint
24+
assert_output --partial 'All files pass linting'
25+
}
26+
1427
setup() {
28+
echo "travis_fold:start:angular-rxjs-chat"
1529
cd $DIR
16-
kill_by_port 8080
17-
kill_by_grep "webpack-dev-server"
18-
npm run go 3>- &
30+
TEST_TMP_DIR="$(mktemp -d -t fullstackXXX)"
31+
kill_ng_cli || :
32+
kill_by_port 4200
1933
true
2034
}
2135

2236
teardown() {
2337
cd $DIR
24-
kill_by_port 8080
25-
kill_by_grep "webpack-dev-server"
38+
kill_ng_cli || :
39+
kill_by_port 4200
40+
echo "travis_fold:end:angular-rxjs-chat"
2641
true
2742
}

.webpack.json

Lines changed: 2073 additions & 0 deletions
Large diffs are not rendered by default.

LICENSE.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)