Skip to content

Commit 8cda1a3

Browse files
author
Vlad Haidei
committed
initial
0 parents  commit 8cda1a3

Some content is hidden

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

60 files changed

+18141
-0
lines changed

.gitignore

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
# next.js build output
61+
.next
62+
63+
.vscode/*
64+
.vscode/settings.json
65+
.vscode/tasks.json
66+
.vscode/launch.json
67+
.vscode/extensions.json
68+
.idea/*
69+
70+
# compiled output
71+
dist
72+
tmp
73+
out-tsc
74+
app-builds/
75+
main.js
76+
.editorconfig

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 SkySoft-Tech
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.

angular.json

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"app-ui": {
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-cli-builders:custom-webpack-browser",
19+
"options": {
20+
"customWebpackConfig": {
21+
"path": "./extra-webpack.config.js"
22+
},
23+
"outputPath": "dist",
24+
"index": "src/index.html",
25+
"main": "src/main.ts",
26+
"polyfills": "src/polyfills.ts",
27+
"tsConfig": "src/tsconfig.app.json",
28+
"assets": [
29+
"src/favicon.ico",
30+
"src/assets"
31+
],
32+
"styles": [
33+
"src/styles.scss"
34+
],
35+
"scripts": []
36+
},
37+
"configurations": {
38+
"dev": {
39+
"optimization": false,
40+
"outputHashing": "all",
41+
"sourceMap": true,
42+
"extractCss": true,
43+
"namedChunks": false,
44+
"aot": false,
45+
"extractLicenses": true,
46+
"vendorChunk": false,
47+
"buildOptimizer": false
48+
},
49+
"production": {
50+
"optimization": true,
51+
"outputHashing": "all",
52+
"sourceMap": false,
53+
"extractCss": true,
54+
"namedChunks": false,
55+
"aot": true,
56+
"extractLicenses": true,
57+
"vendorChunk": false,
58+
"buildOptimizer": true,
59+
"fileReplacements": [
60+
{
61+
"replace": "src/environments/environment.ts",
62+
"with": "src/environments/environment.prod.ts"
63+
}
64+
]
65+
}
66+
}
67+
},
68+
"serve": {
69+
"builder": "@angular-devkit/build-angular:dev-server",
70+
"options": {
71+
"browserTarget": "app-ui:build"
72+
},
73+
"configurations": {
74+
"dev": {
75+
"browserTarget": "app-ui:build:dev"
76+
},
77+
"production": {
78+
"browserTarget": "app-ui:build:production"
79+
}
80+
}
81+
},
82+
"extract-i18n": {
83+
"builder": "@angular-devkit/build-angular:extract-i18n",
84+
"options": {
85+
"browserTarget": "app-ui:build"
86+
}
87+
},
88+
"test": {
89+
"builder": "@angular-devkit/build-angular:karma",
90+
"options": {
91+
"main": "src/test.ts",
92+
"polyfills": "src/polyfills.ts",
93+
"tsConfig": "src/tsconfig.spec.json",
94+
"karmaConfig": "src/karma.conf.js",
95+
"styles": [
96+
"src/styles.scss"
97+
],
98+
"scripts": [],
99+
"assets": [
100+
"src/favicon.ico",
101+
"src/assets"
102+
]
103+
}
104+
},
105+
"lint": {
106+
"builder": "@angular-devkit/build-angular:tslint",
107+
"options": {
108+
"tsConfig": [
109+
"src/tsconfig.app.json",
110+
"src/tsconfig.spec.json"
111+
],
112+
"exclude": [
113+
"**/node_modules/**"
114+
]
115+
}
116+
}
117+
}
118+
},
119+
"app-ui-e2e": {
120+
"root": "e2e/",
121+
"projectType": "application",
122+
"architect": {
123+
"e2e": {
124+
"builder": "@angular-devkit/build-angular:protractor",
125+
"options": {
126+
"protractorConfig": "e2e/protractor.conf.js",
127+
"devServerTarget": "app-ui:serve"
128+
}
129+
},
130+
"lint": {
131+
"builder": "@angular-devkit/build-angular:tslint",
132+
"options": {
133+
"tsConfig": "e2e/tsconfig.e2e.json",
134+
"exclude": [
135+
"**/node_modules/**"
136+
]
137+
}
138+
}
139+
}
140+
}
141+
},
142+
"defaultProject": "app-ui",
143+
"schematics": {
144+
"@schematics/angular:component": {
145+
"prefix": "app",
146+
"styleext": "scss"
147+
},
148+
"@schematics/angular:directive": {
149+
"prefix": "app"
150+
}
151+
}
152+
}

e2e/protractor.conf.js

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+
};

e2e/src/app.e2e-spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { AppPage } from './app.po';
2+
3+
describe('workspace-project App', () => {
4+
let page: AppPage;
5+
6+
beforeEach(() => {
7+
page = new AppPage();
8+
});
9+
10+
it('should display welcome message', () => {
11+
page.navigateTo();
12+
expect(page.getParagraphText()).toEqual('Welcome to app!');
13+
});
14+
});

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+
getParagraphText() {
9+
return element(by.css('app-root h1')).getText();
10+
}
11+
}

e2e/tsconfig.e2e.json

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+
}

electron-builder.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"productName": "app-ui",
3+
"directories": {
4+
"output": "app-builds"
5+
},
6+
"files": [
7+
"**/*",
8+
"!*.ts",
9+
"!*.code-workspace",
10+
"!LICENSE.md",
11+
"!package.json",
12+
"!package-lock.json",
13+
"!src/",
14+
"!e2e/",
15+
"!hooks/",
16+
"!.angular-cli.json",
17+
"!_config.yml",
18+
"!karma.conf.js",
19+
"!tsconfig.json",
20+
"!tslint.json"
21+
],
22+
"win": {
23+
"icon": "dist/assets/icons",
24+
"target": [
25+
"portable"
26+
]
27+
},
28+
"mac": {
29+
"icon": "dist",
30+
"target": [
31+
"dmg"
32+
]
33+
},
34+
"linux": {
35+
"icon": "dist",
36+
"target": [
37+
"AppImage"
38+
]
39+
}
40+
}

extra-webpack.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
target: 'electron-renderer',
5+
// don't remove this comments it is used for parsing by postinstall.config.js
6+
// start of extra configs
7+
externals: {
8+
typeorm: "require('typeorm')",
9+
sqlite3: "require('sqlite3')",
10+
},
11+
resolve: {
12+
alias: {
13+
typeorm: path.resolve(__dirname, "../node_modules/typeorm/typeorm-model-shim")
14+
}
15+
}
16+
// end of extra configs
17+
};

0 commit comments

Comments
 (0)