Skip to content

Commit 16509fd

Browse files
committed
Update to fix package deployments.
1 parent 841f6d4 commit 16509fd

File tree

9 files changed

+185
-30
lines changed

9 files changed

+185
-30
lines changed

.angular-cli.json

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
},
77
"apps": [
88
{
9-
"name": "docs",
10-
"root": "apps/docs/src",
11-
"outDir": "dist/apps/docs",
9+
"name": "demo",
10+
"root": "apps/demo/src",
11+
"outDir": "dist/apps/demo",
1212
"assets": [
1313
"assets",
14-
"favicon.ico",
15-
"404.html"
14+
"favicon.ico"
1615
],
1716
"index": "index.html",
1817
"main": "main.ts",
@@ -22,7 +21,7 @@
2221
"testTsconfig": "../../../tsconfig.spec.json",
2322
"prefix": "app",
2423
"styles": [
25-
"styles.scss"
24+
"styles.css"
2625
],
2726
"scripts": [],
2827
"environmentSource": "environments/environment.ts",
@@ -33,7 +32,7 @@
3332
"tags": []
3433
},
3534
{
36-
"name": "demo",
35+
"name": "demo-from-packages",
3736
"root": "apps/demo/src",
3837
"outDir": "dist/apps/demo",
3938
"assets": [
@@ -44,7 +43,7 @@
4443
"main": "main.ts",
4544
"polyfills": "polyfills.ts",
4645
"test": "../../../test.js",
47-
"tsconfig": "tsconfig.app.json",
46+
"tsconfig": "tsconfig.packages.json",
4847
"testTsconfig": "../../../tsconfig.spec.json",
4948
"prefix": "app",
5049
"styles": [
@@ -58,13 +57,41 @@
5857
},
5958
"tags": []
6059
},
60+
{
61+
"name": "docs",
62+
"root": "apps/docs/src",
63+
"outDir": "dist/apps/docs",
64+
"assets": [
65+
"assets",
66+
"favicon.ico",
67+
"404.html"
68+
],
69+
"index": "index.html",
70+
"main": "main.ts",
71+
"polyfills": "polyfills.ts",
72+
"test": "../../../test.js",
73+
"tsconfig": "tsconfig.app.json",
74+
"testTsconfig": "../../../tsconfig.spec.json",
75+
"prefix": "app",
76+
"styles": [
77+
"styles.scss"
78+
],
79+
"scripts": [],
80+
"environmentSource": "environments/environment.ts",
81+
"environments": {
82+
"dev": "environments/environment.ts",
83+
"prod": "environments/environment.prod.ts"
84+
},
85+
"tags": []
86+
},
6187
{
6288
"name": "docs-from-packages",
6389
"root": "apps/docs/src",
6490
"outDir": "dist/apps/docs",
6591
"assets": [
6692
"assets",
67-
"favicon.ico"
93+
"favicon.ico",
94+
"404.html"
6895
],
6996
"index": "index.html",
7097
"main": "main.ts",

apps/docs/src/tsconfig.app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../../../tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "../../../dist/out-tsc/apps/docs-from-packages",
4+
"outDir": "../../../dist/out-tsc/apps/docs",
55
"module": "es2015"
66
},
77
"include": [

libs/fabric/build.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import * as path from 'path';
2+
import { ngPackagr } from 'ng-packagr';
3+
4+
ngPackagr()
5+
.forProject(path.resolve(__dirname, 'package.json'))
6+
.withTsConfig(path.resolve(__dirname, 'tsconfig-custom.json'))
7+
.build();

libs/fabric/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "../../node_modules/ng-packagr/package.schema.json",
33
"name": "@angular-react/fabric",
4-
"version": "0.1.0",
4+
"version": "0.1.1",
55
"ngPackage": {
66
"lib": {
77
"entryFile": "index.ts",

libs/fabric/tsconfig-custom.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"angularCompilerOptions": {
3+
"annotateForClosureCompiler": true,
4+
"flatModuleId": "AUTOGENERATED",
5+
"flatModuleOutFile": "AUTOGENERATED",
6+
"skipTemplateCodegen": true,
7+
"strictMetadataEmit": true
8+
},
9+
"buildOnSave": false,
10+
"compileOnSave": false,
11+
"compilerOptions": {
12+
"baseUrl": "",
13+
"target": "es2015",
14+
"module": "es2015",
15+
"moduleResolution": "node",
16+
"outDir": "",
17+
"declaration": true,
18+
"sourceMap": true,
19+
"inlineSources": true,
20+
"skipLibCheck": true,
21+
"emitDecoratorMetadata": true,
22+
"experimentalDecorators": true,
23+
"importHelpers": true,
24+
"lib": ["dom", "es2015"],
25+
"paths": {
26+
"@angular-react/*": [
27+
"../../@angular-react/*"
28+
]
29+
}
30+
},
31+
"exclude": ["node_modules", "dist", "**/*.ngfactory.ts", "**/*.shim.ts", "**/*.spec.ts"],
32+
"files": ["AUTOGENERATED"]
33+
}

libs/semantic-ui/build.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import * as path from 'path';
2+
import { ngPackagr } from 'ng-packagr';
3+
4+
ngPackagr()
5+
.forProject(path.resolve(__dirname, 'package.json'))
6+
.withTsConfig(path.resolve(__dirname, 'tsconfig-custom.json'))
7+
.build();
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"angularCompilerOptions": {
3+
"annotateForClosureCompiler": true,
4+
"flatModuleId": "AUTOGENERATED",
5+
"flatModuleOutFile": "AUTOGENERATED",
6+
"skipTemplateCodegen": true,
7+
"strictMetadataEmit": true
8+
},
9+
"buildOnSave": false,
10+
"compileOnSave": false,
11+
"compilerOptions": {
12+
"baseUrl": "",
13+
"target": "es2015",
14+
"module": "es2015",
15+
"moduleResolution": "node",
16+
"outDir": "",
17+
"declaration": true,
18+
"sourceMap": true,
19+
"inlineSources": true,
20+
"skipLibCheck": true,
21+
"emitDecoratorMetadata": true,
22+
"experimentalDecorators": true,
23+
"importHelpers": true,
24+
"lib": ["dom", "es2015"],
25+
"paths": {
26+
"@angular-react/*": [
27+
"../../@angular-react/*"
28+
]
29+
}
30+
},
31+
"exclude": ["node_modules", "dist", "**/*.ngfactory.ts", "**/*.shim.ts", "**/*.spec.ts"],
32+
"files": ["AUTOGENERATED"]
33+
}

package.json

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"start": "ng serve",
88
"start:demo": "ng serve --app demo",
99
"start:docs": "ng serve --app docs",
10+
1011
"build": "ng build",
1112
"build:demo": "ng build --app demo",
1213
"build:demo:prod": "ng build --app demo --prod",
@@ -15,10 +16,13 @@
1516
"build:docs:prod": "ng build --app docs --prod",
1617
"build:docs:prod:package": "ng build --app docs-from-packages --prod",
1718
"build:docs:github": "ng build --app docs --prod --output-path docs --base-href https://benfeely.github.io/angular-react/",
18-
"build:core": "ng-packagr -p libs/core/package.json",
19-
"postbuild:core": "copyfiles README.md ./@angular-react/core",
20-
"build:fabric": "ng-packagr -p libs/fabric/package.json",
21-
"build:semantic-ui": "ng-packagr -p libs/semantic-ui/package.json",
19+
20+
"build:libs": "npm run build:libs:core && npm run build:libs:fabric && npm run build:libs:semantic-ui",
21+
"build:libs:core": "ng-packagr -p libs/core/package.json",
22+
"postbuild:libs:core": "copyfiles README.md ./@angular-react/core",
23+
"build:libs:fabric": "ts-node libs/fabric/build.ts",
24+
"build:libs:semantic-ui": "ts-node libs/semantic-ui/build.ts",
25+
2226
"test": "ng test",
2327
"lint": "./node_modules/.bin/nx lint && ng lint",
2428
"e2e": "ng e2e",
@@ -32,9 +36,10 @@
3236
"update:check": "./node_modules/.bin/nx update check",
3337
"update:skip": "./node_modules/.bin/nx update skip",
3438
"postinstall": "./node_modules/.bin/nx postinstall",
35-
"publish:core": "npm run build:core && npm adduser && npm publish ./@angular-react/core --access=public",
36-
"publish:fabric": "npm run build:fabric && npm adduser && npm publish ./@angular-react/fabric.tgz --access=public",
37-
"publish:semantic-ui": "npm run build:semantic-ui && npm adduser && npm publish ./@angular-react/material.tgz --access=public"
39+
40+
"publish:core": "npm run build:libs && npm adduser && npm publish ./@angular-react/core --access=public",
41+
"publish:fabric": "npm run build:libs && npm adduser && npm publish ./@angular-react/fabric.tgz --access=public",
42+
"publish:semantic-ui": "npm run build:libs && npm adduser && npm publish ./@angular-react/semantic-ui.tgz --access=public"
3843
},
3944
"private": false,
4045
"dependencies": {
@@ -64,6 +69,8 @@
6469
"zone.js": "^0.8.19"
6570
},
6671
"devDependencies": {
72+
"@angular-devkit/core": "0.4.6",
73+
"@angular-devkit/schematics": "0.4.6",
6774
"@angular/cli": "^1.7.4",
6875
"@angular/compiler-cli": "5.2.7",
6976
"@angular/language-service": "5.2.7",
@@ -87,6 +94,8 @@
8794
"prettier": "1.10.2",
8895
"protractor": "~5.1.2",
8996
"ts-node": "~4.1.0",
97+
"tsickle": "^0.27.5",
98+
"tslib": "^1.9.0",
9099
"tslint": "~5.9.1",
91100
"typescript": "2.6.2"
92101
}

0 commit comments

Comments
 (0)