Skip to content

Commit a3f1155

Browse files
Senthil Kumar BhaskaranSenthil Kumar Bhaskaran
Senthil Kumar Bhaskaran
authored and
Senthil Kumar Bhaskaran
committed
Initial Commit on the ngx-electron-starter pack
0 parents  commit a3f1155

37 files changed

+24693
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://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

.gitignore

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
19+
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
36+
/packages
37+
38+
# System Files
39+
.DS_Store
40+
Thumbs.db

README.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# NGX Electron Starter Pack
2+
3+
This project was generated with angular version 6.1.9. and electron 3.0.2
4+
5+
## Development server
6+
7+
Run `yarn build:dev` for running the app in electron (Standalone)
8+
9+
if you want to run in web browser,
10+
11+
Run `yarn start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
12+
13+
## Code scaffolding
14+
15+
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`.
16+
17+
## Build
18+
19+
Run `yarn build:dev` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `yarn build:prod` flag for a production build.
20+
21+
## Packaging
22+
23+
### MACOSX
24+
25+
`yarn package:osx`
26+
27+
### Windows
28+
29+
`yarn package:win`
30+
31+
### Linux
32+
33+
`yarn package:linux`
34+
35+
### For All Platform
36+
37+
`yarn package:all`
38+
39+
## Running angular unit tests
40+
41+
Run `yarn test` to execute the unit tests via [Karma](https://karma-runner.github.io).
42+
43+
## Running angular end-to-end tests
44+
45+
Run `yarn e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
46+
47+
## Running Electron unit tests
48+
49+
Run `yarn electron-test` to execute the unit tests via [mocha](https://mochajs.org/).

angular.json

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"ngx-electron-starter": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"prefix": "app",
11+
"schematics": {},
12+
"architect": {
13+
"build": {
14+
"builder": "@angular-devkit/build-angular:browser",
15+
"options": {
16+
"outputPath": "dist/ngx-electron-starter",
17+
"index": "src/index.html",
18+
"main": "src/main.ts",
19+
"polyfills": "src/polyfills.ts",
20+
"tsConfig": "src/tsconfig.app.json",
21+
"assets": [
22+
"src/favicon.ico",
23+
"src/assets",
24+
"src/electron.js",
25+
"src/package.json"
26+
],
27+
"styles": [
28+
"src/styles.css"
29+
],
30+
"scripts": []
31+
},
32+
"configurations": {
33+
"production": {
34+
"fileReplacements": [
35+
{
36+
"replace": "src/environments/environment.ts",
37+
"with": "src/environments/environment.prod.ts"
38+
}
39+
],
40+
"optimization": true,
41+
"outputHashing": "all",
42+
"sourceMap": false,
43+
"extractCss": true,
44+
"namedChunks": false,
45+
"aot": true,
46+
"extractLicenses": true,
47+
"vendorChunk": false,
48+
"buildOptimizer": true
49+
}
50+
}
51+
},
52+
"serve": {
53+
"builder": "@angular-devkit/build-angular:dev-server",
54+
"options": {
55+
"browserTarget": "ngx-electron-starter:build"
56+
},
57+
"configurations": {
58+
"production": {
59+
"browserTarget": "ngx-electron-starter:build:production"
60+
}
61+
}
62+
},
63+
"extract-i18n": {
64+
"builder": "@angular-devkit/build-angular:extract-i18n",
65+
"options": {
66+
"browserTarget": "ngx-electron-starter:build"
67+
}
68+
},
69+
"test": {
70+
"builder": "@angular-devkit/build-angular:karma",
71+
"options": {
72+
"main": "src/test.ts",
73+
"polyfills": "src/polyfills.ts",
74+
"tsConfig": "src/tsconfig.spec.json",
75+
"karmaConfig": "src/karma.conf.js",
76+
"styles": [
77+
"src/styles.css"
78+
],
79+
"scripts": [],
80+
"assets": [
81+
"src/favicon.ico",
82+
"src/assets"
83+
]
84+
}
85+
},
86+
"lint": {
87+
"builder": "@angular-devkit/build-angular:tslint",
88+
"options": {
89+
"tsConfig": [
90+
"src/tsconfig.app.json",
91+
"src/tsconfig.spec.json"
92+
],
93+
"exclude": [
94+
"**/node_modules/**"
95+
]
96+
}
97+
}
98+
}
99+
},
100+
"ngx-electron-starter-e2e": {
101+
"root": "e2e/",
102+
"projectType": "application",
103+
"architect": {
104+
"e2e": {
105+
"builder": "@angular-devkit/build-angular:protractor",
106+
"options": {
107+
"protractorConfig": "e2e/protractor.conf.js",
108+
"devServerTarget": "ngx-electron-starter:serve"
109+
},
110+
"configurations": {
111+
"production": {
112+
"devServerTarget": "ngx-electron-starter:serve:production"
113+
}
114+
}
115+
},
116+
"lint": {
117+
"builder": "@angular-devkit/build-angular:tslint",
118+
"options": {
119+
"tsConfig": "e2e/tsconfig.e2e.json",
120+
"exclude": [
121+
"**/node_modules/**"
122+
]
123+
}
124+
}
125+
}
126+
}
127+
},
128+
"defaultProject": "ngx-electron-starter"
129+
}

child.entitlements

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.app-sandbox</key>
6+
<true/>
7+
<key>com.apple.security.inherit</key>
8+
<true/>
9+
</dict>
10+
</plist>

e2e/protractor.conf.js

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

+14
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 ngx-electron-starter!');
13+
});
14+
});

e2e/src/app.po.ts

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

+13
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)