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

Commit 4792340

Browse files
committed
feat(srcgen): Update "web-app-empty" template for rucken@2.0.0
1 parent d3505fa commit 4792340

131 files changed

Lines changed: 3492 additions & 1545 deletions

File tree

Some content is hidden

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

srcgen/web-app-empty/.angular-cli.json

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"apps": [
77
{
88
"name": "<%=app.name%>",
9-
"root": "./apps/<%=app.name%>/src",
10-
"outDir": "./apps/<%=app.name%>/dist/browser",
9+
"root": "apps/<%=app.name%>/src",
10+
"outDir": "apps/<%=app.name%>/dist/browser",
1111
"assets": [
1212
"assets",
1313
"favicon.ico"
@@ -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,7 +47,6 @@
4447
"polyfills": "polyfills.ts",
4548
"test": "test.ts",
4649
"tsconfig": "tsconfig.server.json",
47-
"testTsconfig": "tsconfig.spec.json",
4850
"prefix": "",
4951
"styles": [
5052
"styles.scss"
@@ -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
{
6166
"name": "@<%=app.name%>/core",
62-
"root": "./libs/core/src",
63-
"outDir": "./libs/core/dist",
67+
"root": "./libs/@<%=app.name%>/core/src",
68+
"outDir": "./libs/@<%=app.name%>/core/dist",
6469
"appRoot": ""
6570
},
6671
{
6772
"name": "@<%=app.name%>/web",
68-
"root": "./libs/web/src",
69-
"outDir": "./libs/web/dist",
73+
"root": "./libs/@<%=app.name%>/web/src",
74+
"outDir": "./libs/@<%=app.name%>/web/dist",
7075
"appRoot": ""
7176
}
7277
],
@@ -77,11 +82,11 @@
7782
},
7883
"lint": [
7984
{
80-
"project": "./apps/<%=app.name%>/src/tsconfig.json",
85+
"project": "apps/<%=app.name%>/src/tsconfig.json",
8186
"exclude": "**/node_modules/**"
8287
},
8388
{
84-
"project": "./apps/<%=app.name%>/src/tsconfig.spec.json",
89+
"project": "apps/<%=app.name%>/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
}
100-
}
106+
}

srcgen/web-app-empty/.gitignore

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

33
# compiled output
4-
/dist
5-
/tmp
6-
/out-tsc
4+
.tmp
5+
dist
6+
tmp
7+
.ng_pkg_build
8+
out-tsc
9+
*.tgz
710

811
# dependencies
9-
/node_modules
12+
node_modules
1013

1114
# IDEs and editors
1215
/.idea
@@ -27,7 +30,7 @@
2730
# misc
2831
/.sass-cache
2932
/connect.lock
30-
/coverage
33+
/coverage/*
3134
/libpeerconnection.log
3235
npm-debug.log
3336
testem.log
@@ -37,6 +40,7 @@ testem.log
3740
/e2e/*.js
3841
/e2e/*.map
3942

40-
# System Files
43+
#System Files
4144
.DS_Store
4245
Thumbs.db
46+
/server.js

srcgen/web-app-empty/.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
language: node_js
2+
node_js:
3+
- "8"
4+
- "7"
5+
before_install:
6+
- npm install -g npm@5.8.0

srcgen/web-app-empty/LICENSE

Lines changed: 21 additions & 0 deletions
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.

srcgen/web-app-empty/README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,4 @@
1818
- Open browser to [`http://localhost:4200`](http://localhost:4200)
1919

2020
## Build
21-
- run `npm run build` to build libs and application
22-
23-
## Quick links
24-
25-
[Rucken](https://github.com/rucken/core) - Rucken core and web libs.
26-
27-
[Rucken Todo](https://rucken.github.io/todo-web) - Demo application with mock data worked.
21+
- run `npm run build` to build libs and application

srcgen/web-app-empty/_env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# for run ssr sample on heroku
2+
NODE_MODULES_CACHE=false
3+
NPM_CONFIG_PRODUCTION=false
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
<<%=app.name%>-navbar></<%=app.name%>-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>

srcgen/web-app-empty/apps/%app.name%/src/app/app.component.scss

Whitespace-only changes.
Lines changed: 27 additions & 0 deletions
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)