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

Commit 3d5dc7c

Browse files
committed
perf: Rewrite all project
1 parent f37f671 commit 3d5dc7c

File tree

308 files changed

+238757
-203690
lines changed

Some content is hidden

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

308 files changed

+238757
-203690
lines changed

.angular-cli.json

+23-17
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"project": {
4-
"name": "rucken-todo"
4+
"name": "todo"
55
},
66
"apps": [
77
{
88
"name": "todo",
9-
"root": "./apps/todo/src",
10-
"outDir": "./apps/todo/dist/browser",
9+
"root": "apps/todo/src",
10+
"outDir": "apps/todo/dist/browser",
1111
"assets": [
1212
"assets",
1313
"favicon.ico"
@@ -18,7 +18,7 @@
1818
"test": "test.ts",
1919
"tsconfig": "tsconfig.json",
2020
"testTsconfig": "tsconfig.spec.json",
21-
"prefix": "app",
21+
"prefix": "",
2222
"styles": [
2323
"styles.scss"
2424
],
@@ -27,7 +27,10 @@
2727
"environments": {
2828
"dev": "environments/environment.ts",
2929
"prod": "environments/environment.prod.ts",
30-
"mockapi": "environments/environment.mockapi.ts"
30+
"mockapi": "environments/environment.mockapi.ts",
31+
"server-dev": "environments/environment-server.ts",
32+
"server-prod": "environments/environment-server.prod.ts",
33+
"server-mockapi": "environments/environment-server.mockapi.ts"
3134
}
3235
},
3336
{
@@ -44,8 +47,7 @@
4447
"polyfills": "polyfills.ts",
4548
"test": "test.ts",
4649
"tsconfig": "tsconfig.server.json",
47-
"testTsconfig": "tsconfig.spec.json",
48-
"prefix": "app",
50+
"prefix": "",
4951
"styles": [
5052
"styles.scss"
5153
],
@@ -54,19 +56,22 @@
5456
"environments": {
5557
"dev": "environments/environment.ts",
5658
"prod": "environments/environment.prod.ts",
57-
"mockapi": "environments/environment.mockapi.ts"
59+
"mockapi": "environments/environment.mockapi.ts",
60+
"server-dev": "environments/environment-server.ts",
61+
"server-prod": "environments/environment-server.prod.ts",
62+
"server-mockapi": "environments/environment-server.mockapi.ts"
5863
}
5964
},
6065
{
61-
"name": "@rucken/todo-core",
62-
"root": "./libs/core/src",
63-
"outDir": "./libs/core/dist",
66+
"name": "@todo/core",
67+
"root": "./libs/@todo/core/src",
68+
"outDir": "./libs/@todo/core/dist",
6469
"appRoot": ""
6570
},
6671
{
67-
"name": "@rucken/todo-web",
68-
"root": "./libs/web/src",
69-
"outDir": "./libs/web/dist",
72+
"name": "@todo/web",
73+
"root": "./libs/@todo/web/src",
74+
"outDir": "./libs/@todo/web/dist",
7075
"appRoot": ""
7176
}
7277
],
@@ -77,11 +82,11 @@
7782
},
7883
"lint": [
7984
{
80-
"project": "./apps/todo/src/tsconfig.json",
85+
"project": "apps/todo/src/tsconfig.json",
8186
"exclude": "**/node_modules/**"
8287
},
8388
{
84-
"project": "./apps/todo/src/tsconfig.spec.json",
89+
"project": "apps/todo/src/tsconfig.spec.json",
8590
"exclude": "**/node_modules/**"
8691
},
8792
{
@@ -95,6 +100,7 @@
95100
}
96101
},
97102
"defaults": {
98-
"styleExt": "scss"
103+
"styleExt": "scss",
104+
"component": {}
99105
}
100106
}

.gitignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.tmp
55
dist
66
tmp
7+
.ng_pkg_build
78
out-tsc
89
*.tgz
910

@@ -29,7 +30,7 @@ node_modules
2930
# misc
3031
/.sass-cache
3132
/connect.lock
32-
/coverage
33+
/coverage/*
3334
/libpeerconnection.log
3435
npm-debug.log
3536
testem.log
@@ -39,6 +40,7 @@ testem.log
3940
/e2e/*.js
4041
/e2e/*.map
4142

42-
# System Files
43+
#System Files
4344
.DS_Store
4445
Thumbs.db
46+
/server.js

.npmignore

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
.tmp
5+
dist
6+
tmp
7+
.ng_pkg_build
8+
out-tsc
9+
*.tgz
10+
11+
# dependencies
12+
node_modules
13+
14+
# IDEs and editors
15+
/.idea
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# IDE - VSCode
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
30+
# misc
31+
/.sass-cache
32+
/connect.lock
33+
/coverage/*
34+
/libpeerconnection.log
35+
npm-debug.log
36+
testem.log
37+
/typings
38+
39+
# e2e
40+
/e2e/*.js
41+
/e2e/*.map
42+
43+
#System Files
44+
.DS_Store
45+
Thumbs.db
46+
/server.js

.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3+
- "8"
34
- "7"
4-
after_success:
5-
- chmod +x ./scripts/hooks.sh
6-
- "./scripts/hooks.sh --all"
5+
before_install:
6+
- npm install -g npm@5.8.0

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+8-19
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99

1010
A simple todo application demonstrating the basic usage of [rucken](https://github.com/rucken).
1111

12-
1312
## Usage
14-
- Clone or fork this repository `git clone https://github.com/rucken/todo-web.git`
13+
- Clone or fork this repository `git clone https://github.com/rucken/todo.git`
1514
- Make sure you have [node.js](https://nodejs.org/) installed version 6+
1615
- Make sure you have NPM installed version 3+
1716
- Open comand line in folder `rucken-todo`
@@ -36,30 +35,20 @@ A simple todo application demonstrating the basic usage of [rucken](https://gith
3635

3736
## Quick links
3837

39-
[Source](https://github.com/rucken/todo-web) - Source code.
40-
41-
[Demo](https://rucken.github.io/todo-web) - Demo application with mock data worked.
42-
43-
[Demo (SSR)](https://rucken-todo.herokuapp.com) - Demo application with server side rendering.
44-
45-
[Demo source](https://github.com/rucken/core/tree/master/apps/demo) - Source code of demo application.
46-
47-
## Sample projects
48-
49-
[Rucken: Todo](https://github.com/rucken/todo-web) - Simple todo application with: projects, tasks, statuses (backend: http://mockapi.io).
38+
[Live demo](https://rucken.github.io/todo) [[source]](https://github.com/rucken/todo) - Demo application (backend: http://www.mockapi.io).
5039

51-
[Rucken: Demo (NestJS)](https://github.com/rucken/core-nestjs) - Simple application demonstrating the basic usage of permissions with NestJS (JWT, PasswordHash, User, Group, Permission, ContentType) (backend: NestJS).
40+
[Live demo (SSR)](https://rucken-todo.herokuapp.com) [[source]](https://github.com/rucken/todo) - Demo application with server side rendering (backend: http://www.mockapi.io).
5241

53-
[Rucken: Todo (Django)](https://github.com/rucken/todo-django) - Simple todo application with: auth, groups, permissions, projects, tasks, statuses (backend: Django + plugins).
42+
[Live demo (NestJS)](https://rucken-todo-nestjs.herokuapp.com) [[source]](https://github.com/rucken/todo-nestjs) - Demo application with live backend (backend: https://nestjs.com).
5443

5544
## License
5645

5746
MIT
5847

59-
[travis-image]: https://travis-ci.org/rucken/todo-web.svg?branch=develop
60-
[travis-url]: https://travis-ci.org/rucken/todo-web
61-
[gitter-image]: https://img.shields.io/gitter/room/rucken/core.js.svg
62-
[gitter-url]: https://gitter.im/rucken/core
48+
[travis-image]: https://travis-ci.org/rucken/todo.svg?branch=develop
49+
[travis-url]: https://travis-ci.org/rucken/todo
50+
[gitter-image]: https://img.shields.io/gitter/room/rucken/todo.js.svg
51+
[gitter-url]: https://gitter.im/rucken/todo
6352
[npm-image]: https://badge.fury.io/js/%40rucken%2Ftodo-web.svg
6453
[npm-url]: https://npmjs.org/package/@rucken/todo-web
6554
[dependencies-image]: https://david-dm.org/rucken/todo-web/status.svg

apps/todo/src/app/app.component.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
<todo-navbar></todo-navbar>
2-
<router-outlet></router-outlet>
1+
<navbar [title]="title" [routes]="routes" [showLogin]="!(accountService.current$ | async)" [showLogout]="accountService.current$ | async"
2+
(login)="onLogin()" (logout)="onLogout()" [languages]="langService.languages" [(currentLang)]="langService.current"></navbar>
3+
<router-outlet></router-outlet>

apps/todo/src/app/app.component.scss

Whitespace-only changes.
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { TestBed, async } from '@angular/core/testing';
2+
import { AppComponent } from './app.component';
3+
describe('AppComponent', () => {
4+
beforeEach(async(() => {
5+
TestBed.configureTestingModule({
6+
declarations: [
7+
AppComponent
8+
],
9+
}).compileComponents();
10+
}));
11+
it('should create the app', async(() => {
12+
const fixture = TestBed.createComponent(AppComponent);
13+
const app = fixture.debugElement.componentInstance;
14+
expect(app).toBeTruthy();
15+
}));
16+
it(`should have as title 'app'`, async(() => {
17+
const fixture = TestBed.createComponent(AppComponent);
18+
const app = fixture.debugElement.componentInstance;
19+
expect(app.title).toEqual('app');
20+
}));
21+
it('should render title in a h1 tag', async(() => {
22+
const fixture = TestBed.createComponent(AppComponent);
23+
fixture.detectChanges();
24+
const compiled = fixture.debugElement.nativeElement;
25+
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
26+
}));
27+
});

0 commit comments

Comments
 (0)