Skip to content

Commit 36e1cd2

Browse files
committed
feat(package): minor - schematics #204
1 parent e58d5db commit 36e1cd2

32 files changed

+12362
-0
lines changed

demo-schematics/.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see https://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

demo-schematics/.gitignore

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

demo-schematics/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# DemoSchematics
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.2.
4+
5+
## Development server
6+
7+
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.
8+
9+
## Code scaffolding
10+
11+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12+
13+
## Build
14+
15+
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.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24+
25+
## Further help
26+
27+
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).

demo-schematics/angular.json

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"demo-schematics": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"prefix": "app",
11+
"schematics": {
12+
"@schematics/angular:component": {
13+
"styleext": "scss"
14+
}
15+
},
16+
"architect": {
17+
"build": {
18+
"builder": "@angular-devkit/build-angular:browser",
19+
"options": {
20+
"outputPath": "dist/demo-schematics",
21+
"index": "src/index.html",
22+
"main": "src/main.ts",
23+
"polyfills": "src/polyfills.ts",
24+
"tsConfig": "src/tsconfig.app.json",
25+
"assets": [
26+
"src/favicon.ico",
27+
"src/assets",
28+
{
29+
"glob": "**/*",
30+
"input": "node_modules/ngx-auth-firebaseui/assets/",
31+
"output": "./assets/"
32+
},
33+
{
34+
"glob": "**/*",
35+
"input": "node_modules/ngx-auth-firebaseui/assets/",
36+
"output": "./assets/"
37+
},
38+
{
39+
"glob": "**/*",
40+
"input": "node_modules/ngx-auth-firebaseui/assets/",
41+
"output": "./assets/"
42+
},
43+
{
44+
"glob": "**/*",
45+
"input": "node_modules/ngx-auth-firebaseui/assets/",
46+
"output": "./assets/"
47+
},
48+
{
49+
"glob": "**/*",
50+
"input": "node_modules/ngx-auth-firebaseui/assets/",
51+
"output": "./assets/"
52+
},
53+
{
54+
"glob": "**/*",
55+
"input": "node_modules/ngx-auth-firebaseui/assets/",
56+
"output": "./assets/"
57+
},
58+
{
59+
"glob": "**/*",
60+
"input": "node_modules/ngx-auth-firebaseui/assets/",
61+
"output": "./assets/"
62+
},
63+
{
64+
"glob": "**/*",
65+
"input": "node_modules/ngx-auth-firebaseui/assets/",
66+
"output": "./assets/"
67+
},
68+
{
69+
"glob": "**/*",
70+
"input": "node_modules/ngx-auth-firebaseui/assets/",
71+
"output": "./assets/"
72+
},
73+
{
74+
"glob": "**/*",
75+
"input": "node_modules/ngx-auth-firebaseui/assets/",
76+
"output": "./assets/"
77+
},
78+
{
79+
"glob": "**/*",
80+
"input": "node_modules/ngx-auth-firebaseui/assets/",
81+
"output": "./assets/"
82+
},
83+
{
84+
"glob": "**/*",
85+
"input": "node_modules/ngx-auth-firebaseui/assets/",
86+
"output": "./assets/"
87+
},
88+
{
89+
"glob": "**/*",
90+
"input": "node_modules/ngx-auth-firebaseui/assets/",
91+
"output": "./assets/"
92+
}
93+
],
94+
"styles": [
95+
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
96+
"src/styles.scss"
97+
],
98+
"scripts": []
99+
},
100+
"configurations": {
101+
"production": {
102+
"fileReplacements": [
103+
{
104+
"replace": "src/environments/environment.ts",
105+
"with": "src/environments/environment.prod.ts"
106+
}
107+
],
108+
"optimization": true,
109+
"outputHashing": "all",
110+
"sourceMap": false,
111+
"extractCss": true,
112+
"namedChunks": false,
113+
"aot": true,
114+
"extractLicenses": true,
115+
"vendorChunk": false,
116+
"buildOptimizer": true,
117+
"budgets": [
118+
{
119+
"type": "initial",
120+
"maximumWarning": "2mb",
121+
"maximumError": "5mb"
122+
}
123+
]
124+
}
125+
}
126+
},
127+
"serve": {
128+
"builder": "@angular-devkit/build-angular:dev-server",
129+
"options": {
130+
"browserTarget": "demo-schematics:build"
131+
},
132+
"configurations": {
133+
"production": {
134+
"browserTarget": "demo-schematics:build:production"
135+
}
136+
}
137+
},
138+
"extract-i18n": {
139+
"builder": "@angular-devkit/build-angular:extract-i18n",
140+
"options": {
141+
"browserTarget": "demo-schematics:build"
142+
}
143+
},
144+
"test": {
145+
"builder": "@angular-devkit/build-angular:karma",
146+
"options": {
147+
"main": "src/test.ts",
148+
"polyfills": "src/polyfills.ts",
149+
"tsConfig": "src/tsconfig.spec.json",
150+
"karmaConfig": "src/karma.conf.js",
151+
"styles": [
152+
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
153+
"src/styles.scss"
154+
],
155+
"scripts": [],
156+
"assets": [
157+
"src/favicon.ico",
158+
"src/assets"
159+
]
160+
}
161+
},
162+
"lint": {
163+
"builder": "@angular-devkit/build-angular:tslint",
164+
"options": {
165+
"tsConfig": [
166+
"src/tsconfig.app.json",
167+
"src/tsconfig.spec.json"
168+
],
169+
"exclude": [
170+
"**/node_modules/**"
171+
]
172+
}
173+
}
174+
}
175+
},
176+
"demo-schematics-e2e": {
177+
"root": "e2e/",
178+
"projectType": "application",
179+
"prefix": "",
180+
"architect": {
181+
"e2e": {
182+
"builder": "@angular-devkit/build-angular:protractor",
183+
"options": {
184+
"protractorConfig": "e2e/protractor.conf.js",
185+
"devServerTarget": "demo-schematics:serve"
186+
},
187+
"configurations": {
188+
"production": {
189+
"devServerTarget": "demo-schematics:serve:production"
190+
}
191+
}
192+
},
193+
"lint": {
194+
"builder": "@angular-devkit/build-angular:tslint",
195+
"options": {
196+
"tsConfig": "e2e/tsconfig.e2e.json",
197+
"exclude": [
198+
"**/node_modules/**"
199+
]
200+
}
201+
}
202+
}
203+
}
204+
},
205+
"defaultProject": "demo-schematics"
206+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Protractor configuration file, see link for more information
2+
// https://github.com/angular/protractor/blob/master/lib/config.ts
3+
4+
const { SpecReporter } = require('jasmine-spec-reporter');
5+
6+
exports.config = {
7+
allScriptsTimeout: 11000,
8+
specs: [
9+
'./src/**/*.e2e-spec.ts'
10+
],
11+
capabilities: {
12+
'browserName': 'chrome'
13+
},
14+
directConnect: true,
15+
baseUrl: 'http://localhost:4200/',
16+
framework: 'jasmine',
17+
jasmineNodeOpts: {
18+
showColors: true,
19+
defaultTimeoutInterval: 30000,
20+
print: function() {}
21+
},
22+
onPrepare() {
23+
require('ts-node').register({
24+
project: require('path').join(__dirname, './tsconfig.e2e.json')
25+
});
26+
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27+
}
28+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { AppPage } from './app.po';
2+
import { browser, logging } from 'protractor';
3+
4+
describe('workspace-project App', () => {
5+
let page: AppPage;
6+
7+
beforeEach(() => {
8+
page = new AppPage();
9+
});
10+
11+
it('should display welcome message', () => {
12+
page.navigateTo();
13+
expect(page.getTitleText()).toEqual('Welcome to demo-schematics!');
14+
});
15+
16+
afterEach(async () => {
17+
// Assert that there are no errors emitted from the browser
18+
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
19+
expect(logs).not.toContain(jasmine.objectContaining({
20+
level: logging.Level.SEVERE,
21+
}));
22+
});
23+
});

demo-schematics/e2e/src/app.po.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, by, element } from 'protractor';
2+
3+
export class AppPage {
4+
navigateTo() {
5+
return browser.get('/');
6+
}
7+
8+
getTitleText() {
9+
return element(by.css('app-root h1')).getText();
10+
}
11+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/app",
5+
"module": "commonjs",
6+
"target": "es5",
7+
"types": [
8+
"jasmine",
9+
"jasminewd2",
10+
"node"
11+
]
12+
}
13+
}

0 commit comments

Comments
 (0)