Skip to content

Commit 4158785

Browse files
committed
Move to library angular-nodegui
1 parent 152aec5 commit 4158785

46 files changed

Lines changed: 224 additions & 55 deletions

Some content is hidden

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

README.md

Lines changed: 10 additions & 21 deletions

angular.json

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"angular-nodegui": {
6+
"angular-nodegui-app": {
77
"projectType": "application",
88
"schematics": {
99
"@schematics/angular:component": {
@@ -17,7 +17,7 @@
1717
"build": {
1818
"builder": "@angular-devkit/build-angular:browser",
1919
"options": {
20-
"outputPath": "dist/angular-nodegui",
20+
"outputPath": "dist/angular-nodegui-app",
2121
"index": "src/index.html",
2222
"main": "src/main.ts",
2323
"polyfills": "src/polyfills.ts",
@@ -60,18 +60,18 @@
6060
"serve": {
6161
"builder": "@angular-devkit/build-angular:dev-server",
6262
"options": {
63-
"browserTarget": "angular-nodegui:build"
63+
"browserTarget": "angular-nodegui-app:build"
6464
},
6565
"configurations": {
6666
"production": {
67-
"browserTarget": "angular-nodegui:build:production"
67+
"browserTarget": "angular-nodegui-app:build:production"
6868
}
6969
}
7070
},
7171
"extract-i18n": {
7272
"builder": "@angular-devkit/build-angular:extract-i18n",
7373
"options": {
74-
"browserTarget": "angular-nodegui:build"
74+
"browserTarget": "angular-nodegui-app:build"
7575
}
7676
},
7777
"test": {
@@ -99,16 +99,51 @@
9999
"builder": "@angular-devkit/build-angular:protractor",
100100
"options": {
101101
"protractorConfig": "e2e/protractor.conf.js",
102-
"devServerTarget": "angular-nodegui:serve"
102+
"devServerTarget": "angular-nodegui-app:serve"
103103
},
104104
"configurations": {
105105
"production": {
106-
"devServerTarget": "angular-nodegui:serve:production"
106+
"devServerTarget": "angular-nodegui-app:serve:production"
107107
}
108108
}
109109
}
110110
}
111+
},
112+
"angular-nodegui": {
113+
"projectType": "library",
114+
"root": "projects/angular-nodegui",
115+
"sourceRoot": "projects/angular-nodegui/src",
116+
"prefix": "lib",
117+
"architect": {
118+
"build": {
119+
"builder": "@angular-devkit/build-ng-packagr:build",
120+
"options": {
121+
"tsConfig": "projects/angular-nodegui/tsconfig.lib.json",
122+
"project": "projects/angular-nodegui/ng-package.json"
123+
}
124+
},
125+
"test": {
126+
"builder": "@angular-devkit/build-angular:karma",
127+
"options": {
128+
"main": "projects/angular-nodegui/src/test.ts",
129+
"tsConfig": "projects/angular-nodegui/tsconfig.spec.json",
130+
"karmaConfig": "projects/angular-nodegui/karma.conf.js"
131+
}
132+
},
133+
"lint": {
134+
"builder": "@angular-devkit/build-angular:tslint",
135+
"options": {
136+
"tsConfig": [
137+
"projects/angular-nodegui/tsconfig.lib.json",
138+
"projects/angular-nodegui/tsconfig.spec.json"
139+
],
140+
"exclude": [
141+
"**/node_modules/**"
142+
]
143+
}
144+
}
145+
}
111146
}
112147
},
113-
"defaultProject": "angular-nodegui"
148+
"defaultProject": "angular-nodegui-app"
114149
}

package-lock.json

Lines changed: 3 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"start": "npm run build-dev && qode ./dist/src/main.js",
77
"start:prod": "qode ./dist/angular-nodegui/main.js",
88
"build": "ng build",
9+
"build-lib": "ng build angular-nodegui",
910
"build:prod": "ng build",
1011
"build-dev": "ngc -p tsconfig.app.json",
1112
"build-ngtsc": "ngc -p tsconfig.ngtsc.json",

projects/angular-nodegui/README.md

Lines changed: 16 additions & 0 deletions
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/angular-nodegui'),
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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3+
"dest": "../../dist/angular-nodegui",
4+
"lib": {
5+
"entryFile": "src/public-api.ts"
6+
}
7+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "angular-nodegui",
3+
"version": "0.0.1",
4+
"license": "MIT",
5+
"repository": {
6+
"type": "git",
7+
"url": "git+https://github.com/irustm/angular-nodegui.git"
8+
},
9+
"peerDependencies": {
10+
"@nodegui/nodegui": ">=0.3.0",
11+
"@nodegui/qode": "*",
12+
"@angular/common": "^8.2.11",
13+
"@angular/core": "^8.2.11"
14+
}
15+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './public-api';

src/lib/components/button.ts renamed to projects/angular-nodegui/src/lib/components/button.ts

File renamed without changes.

0 commit comments

Comments
 (0)