Skip to content

Commit ca85343

Browse files
committed
feat: initial commit
1 parent 664063b commit ca85343

File tree

1,609 files changed

+19094
-166
lines changed

Some content is hidden

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

1,609 files changed

+19094
-166
lines changed

angular.json

Lines changed: 169 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,172 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3-
"version": 1,
3+
"version": 1,
44
"newProjectRoot": "projects",
5-
"projects": {}
6-
}
5+
"projects": {
6+
"craftsjs-app": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:component": {
10+
"style": "scss"
11+
}
12+
},
13+
"root": "projects/craftsjs-app",
14+
"sourceRoot": "projects/craftsjs-app/src",
15+
"prefix": "app",
16+
"architect": {
17+
"build": {
18+
"builder": "@angular-devkit/build-angular:browser",
19+
"options": {
20+
"outputPath": "dist/craftsjs-app",
21+
"index": "projects/craftsjs-app/src/index.html",
22+
"main": "projects/craftsjs-app/src/main.ts",
23+
"polyfills": "projects/craftsjs-app/src/polyfills.ts",
24+
"tsConfig": "projects/craftsjs-app/tsconfig.app.json",
25+
"aot": true,
26+
"assets": [
27+
"projects/craftsjs-app/src/favicon.ico",
28+
"projects/craftsjs-app/src/assets"
29+
],
30+
"styles": [
31+
"projects/craftsjs-app/src/styles.scss"
32+
],
33+
"scripts": []
34+
},
35+
"configurations": {
36+
"production": {
37+
"fileReplacements": [
38+
{
39+
"replace": "projects/craftsjs-app/src/environments/environment.ts",
40+
"with": "projects/craftsjs-app/src/environments/environment.prod.ts"
41+
}
42+
],
43+
"optimization": true,
44+
"outputHashing": "all",
45+
"sourceMap": false,
46+
"extractCss": true,
47+
"namedChunks": false,
48+
"extractLicenses": true,
49+
"vendorChunk": false,
50+
"buildOptimizer": true,
51+
"budgets": [
52+
{
53+
"type": "initial",
54+
"maximumWarning": "2mb",
55+
"maximumError": "5mb"
56+
},
57+
{
58+
"type": "anyComponentStyle",
59+
"maximumWarning": "6kb",
60+
"maximumError": "10kb"
61+
}
62+
]
63+
}
64+
}
65+
},
66+
"serve": {
67+
"builder": "@angular-devkit/build-angular:dev-server",
68+
"options": {
69+
"browserTarget": "craftsjs-app:build"
70+
},
71+
"configurations": {
72+
"production": {
73+
"browserTarget": "craftsjs-app:build:production"
74+
}
75+
}
76+
},
77+
"extract-i18n": {
78+
"builder": "@angular-devkit/build-angular:extract-i18n",
79+
"options": {
80+
"browserTarget": "craftsjs-app:build"
81+
}
82+
},
83+
"test": {
84+
"builder": "@angular-devkit/build-angular:karma",
85+
"options": {
86+
"main": "projects/craftsjs-app/src/test.ts",
87+
"polyfills": "projects/craftsjs-app/src/polyfills.ts",
88+
"tsConfig": "projects/craftsjs-app/tsconfig.spec.json",
89+
"karmaConfig": "projects/craftsjs-app/karma.conf.js",
90+
"assets": [
91+
"projects/craftsjs-app/src/favicon.ico",
92+
"projects/craftsjs-app/src/assets"
93+
],
94+
"styles": [
95+
"projects/craftsjs-app/src/styles.scss"
96+
],
97+
"scripts": []
98+
}
99+
},
100+
"lint": {
101+
"builder": "@angular-devkit/build-angular:tslint",
102+
"options": {
103+
"tsConfig": [
104+
"projects/craftsjs-app/tsconfig.app.json",
105+
"projects/craftsjs-app/tsconfig.spec.json",
106+
"projects/craftsjs-app/e2e/tsconfig.json"
107+
],
108+
"exclude": [
109+
"**/node_modules/**"
110+
]
111+
}
112+
},
113+
"e2e": {
114+
"builder": "@angular-devkit/build-angular:protractor",
115+
"options": {
116+
"protractorConfig": "projects/craftsjs-app/e2e/protractor.conf.js",
117+
"devServerTarget": "craftsjs-app:serve"
118+
},
119+
"configurations": {
120+
"production": {
121+
"devServerTarget": "craftsjs-app:serve:production"
122+
}
123+
}
124+
}
125+
}
126+
},
127+
"@craftsjs/boilerplate": {
128+
"projectType": "library",
129+
"root": "projects/craftsjs/boilerplate",
130+
"sourceRoot": "projects/craftsjs/boilerplate/src",
131+
"prefix": "lib",
132+
"architect": {
133+
"build": {
134+
"builder": "@angular-devkit/build-ng-packagr:build",
135+
"options": {
136+
"tsConfig": "projects/craftsjs/boilerplate/tsconfig.lib.json",
137+
"project": "projects/craftsjs/boilerplate/ng-package.json"
138+
},
139+
"configurations": {
140+
"production": {
141+
"tsConfig": "projects/craftsjs/boilerplate/tsconfig.lib.prod.json"
142+
}
143+
}
144+
},
145+
"test": {
146+
"builder": "@angular-devkit/build-angular:karma",
147+
"options": {
148+
"main": "projects/craftsjs/boilerplate/src/test.ts",
149+
"tsConfig": "projects/craftsjs/boilerplate/tsconfig.spec.json",
150+
"karmaConfig": "projects/craftsjs/boilerplate/karma.conf.js"
151+
}
152+
},
153+
"lint": {
154+
"builder": "@angular-devkit/build-angular:tslint",
155+
"options": {
156+
"tsConfig": [
157+
"projects/craftsjs/boilerplate/tsconfig.lib.json",
158+
"projects/craftsjs/boilerplate/tsconfig.spec.json"
159+
],
160+
"exclude": [
161+
"**/node_modules/**"
162+
]
163+
}
164+
}
165+
}
166+
}
167+
},
168+
"cli": {
169+
"analytics": "7cf7a64b-37c5-4601-a995-8390e297556d"
170+
},
171+
"defaultProject": "craftsjs-app"
172+
}

package.json

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,53 @@
77
"build": "ng build",
88
"test": "ng test",
99
"lint": "ng lint",
10-
"e2e": "ng e2e"
10+
"e2e": "ng e2e",
11+
"build:libs": "ng build @craftsjs/boilerplate",
12+
"test:libs": "ng test @craftsjs/boilerplate",
13+
"add:lib": "ng generate library"
1114
},
1215
"private": true,
1316
"dependencies": {
17+
"@addapptables/alert": "^2.0.0",
18+
"@addapptables/card": "^2.0.0",
19+
"@addapptables/core": "^2.0.0",
20+
"@addapptables/menu": "^2.1.1",
21+
"@addapptables/modal": "^2.0.0",
22+
"@addapptables/ngrx-actions": "^2.0.0",
23+
"@addapptables/notifier": "^2.1.0",
24+
"@addapptables/perfect-scrollbar": "^2.0.0",
25+
"@addapptables/responsive": "^2.0.0",
1426
"@angular/animations": "~9.0.7",
27+
"@angular/cdk": "^9.2.0",
1528
"@angular/common": "~9.0.7",
1629
"@angular/compiler": "~9.0.7",
1730
"@angular/core": "~9.0.7",
1831
"@angular/forms": "~9.0.7",
32+
"@angular/material": "^9.2.0",
1933
"@angular/platform-browser": "~9.0.7",
2034
"@angular/platform-browser-dynamic": "~9.0.7",
2135
"@angular/router": "~9.0.7",
36+
"@ngrx/effects": "^9.0.0",
37+
"@ngrx/entity": "^9.0.0",
38+
"@ngrx/router-store": "^9.0.0",
39+
"@ngrx/store": "^9.0.0",
40+
"@ngrx/store-devtools": "^9.0.0",
41+
"materialize-css": "^1.0.0",
42+
"normalize-scss": "^7.0.1",
43+
"perfect-scrollbar": "^1.5.0",
2244
"rxjs": "~6.5.4",
2345
"tslib": "^1.10.0",
2446
"zone.js": "~0.10.2"
2547
},
2648
"devDependencies": {
49+
"@angular-devkit/build-angular": "~0.900.7",
50+
"@angular-devkit/build-ng-packagr": "~0.900.7",
2751
"@angular/cli": "~9.0.7",
2852
"@angular/compiler-cli": "~9.0.7",
2953
"@angular/language-service": "~9.0.7",
30-
"@types/node": "^12.11.1",
3154
"@types/jasmine": "~3.5.0",
3255
"@types/jasminewd2": "~2.0.3",
56+
"@types/node": "^12.11.1",
3357
"codelyzer": "^5.1.2",
3458
"jasmine-core": "~3.5.0",
3559
"jasmine-spec-reporter": "~4.2.1",
@@ -38,6 +62,7 @@
3862
"karma-coverage-istanbul-reporter": "~2.1.0",
3963
"karma-jasmine": "~2.0.1",
4064
"karma-jasmine-html-reporter": "^1.4.2",
65+
"ng-packagr": "^9.0.0",
4166
"protractor": "~5.4.3",
4267
"ts-node": "~8.3.0",
4368
"tslint": "~5.18.0",

projects/craftsjs-app/browserslist

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# You can see what browsers were selected by your queries by running:
6+
# npx browserslist
7+
8+
> 0.5%
9+
last 2 versions
10+
Firefox ESR
11+
not dead
12+
not IE 9-11 # For IE 9-11 support, remove 'not'.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// @ts-check
2+
// Protractor configuration file, see link for more information
3+
// https://github.com/angular/protractor/blob/master/lib/config.ts
4+
5+
const { SpecReporter } = require('jasmine-spec-reporter');
6+
7+
/**
8+
* @type { import("protractor").Config }
9+
*/
10+
exports.config = {
11+
allScriptsTimeout: 11000,
12+
specs: [
13+
'./src/**/*.e2e-spec.ts'
14+
],
15+
capabilities: {
16+
browserName: 'chrome'
17+
},
18+
directConnect: true,
19+
baseUrl: 'http://localhost:4200/',
20+
framework: 'jasmine',
21+
jasmineNodeOpts: {
22+
showColors: true,
23+
defaultTimeoutInterval: 30000,
24+
print: function() {}
25+
},
26+
onPrepare() {
27+
require('ts-node').register({
28+
project: require('path').join(__dirname, './tsconfig.json')
29+
});
30+
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
31+
}
32+
};
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('craftsjs-app app is running!');
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+
} as logging.Entry));
22+
});
23+
});
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(): Promise<unknown> {
5+
return browser.get(browser.baseUrl) as Promise<unknown>;
6+
}
7+
8+
getTitleText(): Promise<string> {
9+
return element(by.css('app-root .content span')).getText() as Promise<string>;
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/e2e",
5+
"module": "commonjs",
6+
"target": "es5",
7+
"types": [
8+
"jasmine",
9+
"jasminewd2",
10+
"node"
11+
]
12+
}
13+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
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-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
clearContext: false // leave Jasmine Spec Runner output visible in browser
17+
},
18+
coverageIstanbulReporter: {
19+
dir: require('path').join(__dirname, '../../coverage/craftsjs-app'),
20+
reports: ['html', 'lcovonly', 'text-summary'],
21+
fixWebpackSourcePaths: true
22+
},
23+
reporters: ['progress', 'kjhtml'],
24+
port: 9876,
25+
colors: true,
26+
logLevel: config.LOG_INFO,
27+
autoWatch: true,
28+
browsers: ['Chrome'],
29+
singleRun: false,
30+
restartOnFileChange: true
31+
});
32+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { NgModule } from '@angular/core';
2+
import { Routes, RouterModule } from '@angular/router';
3+
4+
5+
const routes: Routes = [];
6+
7+
@NgModule({
8+
imports: [RouterModule.forRoot(routes)],
9+
exports: [RouterModule]
10+
})
11+
export class AppRoutingModule { }

0 commit comments

Comments
 (0)