Skip to content

Commit

Permalink
fix: angular build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Sep 5, 2020
1 parent 59bc9ac commit afca0e8
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 71 deletions.
61 changes: 26 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
{
"name": "@nativescript-community/ui-image",
"version": "1.0.0",
"ngPackage": {
"dest": "tempAngular",
"lib": {
"entryFile": "src/angular/index.ts",
"umdModuleIds": {
"@nativescript/core": "ns-core",
"@nativescript/angular": "ns-angular",
"@nativescript-community/image": "ns-ui-image"
}
}
},
"scripts": {
"setup": "ts-patch install",
"build.angular": "pnpm i && rimraf tempAngular && ng-packagr -p src/angular/package.json -c tsconfig.angular.json && cpy 'tempAngular/**/*' 'plugin/angular' --parents",
"build.angular": "ng-packagr -p src/angular/package.json -c src/angular/tsconfig.json",
"clean": "rimraf ./plugin/**/*.d.ts ./plugin/**/*.js ./plugin/**/*.js.map plugin/node_modules plugin/package-lock.json plugin/README.md demo/node_modules demo-angular/node_modules",
"tsc": "cpy '**/*.d.ts' '../plugin' --parents --cwd=src && tsc -skipLibCheck -d",
"build": "cp README.md ./plugin && rm -f .tsbuildinfo && npm run tsc ",
Expand All @@ -27,40 +16,42 @@
"demo.ng.android.watch": "npm run build && npm run plugin.tscwatch && cd demo-angular && tns run android --syncAllFiles",
"demo.ng.reset": "cd ../demo-angular && rimraf platforms",
"plugin.prepare": "npm run build && cd demo-angular && tns plugin remove nativescript-image && tns plugin add ../plugin && cd ../demo && tns plugin remove nativescript-image && tns plugin add ../plugin",
"publish": "npm run build && lerna publish",
"publish": "npm run setup && npm run build && npm run build.angular && lerna publish",
"commitmsg": "commitlint -e $GIT_PARAMS"
},
"devDependencies": {
"@angular/animations": "~10.0.6",
"@angular/common": "~10.0.6",
"@angular/compiler": "~10.0.6",
"@angular/compiler-cli": "~10.0.6",
"@angular/core": "~10.0.6",
"@angular/forms": "~10.0.6",
"@angular/platform-browser": "~10.0.6",
"@angular/platform-browser-dynamic": "~10.0.6",
"@angular/router": "~10.0.6",
"@commitlint/cli": "^9.1.1",
"@commitlint/config-conventional": "^9.1.1",
"@angular/animations": "~10.1.0",
"@angular/common": "~10.1.0",
"@angular/compiler": "~10.1.0",
"@angular/compiler-cli": "~10.1.0",
"@angular/core": "~10.1.0",
"@angular/forms": "~10.1.0",
"@angular/platform-browser": "~10.1.0",
"@angular/platform-browser-dynamic": "~10.1.0",
"@angular/router": "~10.1.0",
"@commitlint/cli": "^9.1.2",
"@commitlint/config-conventional": "^9.1.2",
"@nativescript-community/ui-image": "file:./plugin",
"@nativescript/angular": "10.0.0",
"@nativescript/core": "rc",
"@nativescript/types": "rc",
"@nativescript/webpack": "2.0.1",
"@typescript-eslint/eslint-plugin": "3.7.1",
"@typescript-eslint/parser": "3.7.1",
"@nativescript/angular": "10.1.0",
"@nativescript/core": "7.0.0",
"@nativescript/types-android": "~7.0.2",
"@nativescript/types-ios": "~7.0.1",
"@nativescript/webpack": "3.0.1",
"@typescript-eslint/eslint-plugin": "4.0.1",
"@typescript-eslint/parser": "4.0.1",
"@types/node": "14.6.4",
"cpy-cli": "^3.1.1",
"eslint": "6.8.0",
"eslint": "7.8.1",
"husky": "^4.2.5",
"lerna": "^3.22.1",
"ng-packagr": "~10.0.3",
"ng-packagr": "~10.1.0",
"prompt": "^1.0.0",
"rimraf": "^3.0.2",
"rxjs": "^6.6.0",
"rxjs": "^6.6.2",
"ts-patch": "^1.3.0",
"tslib": "2.0.0",
"tslib": "2.0.1",
"typescript": "3.9.7",
"zone.js": "0.10.3"
"zone.js": "0.11.1"
},
"repository": {
"type": "git",
Expand Down
5 changes: 2 additions & 3 deletions references.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference path="./node_modules/@nativescript/types/ios.d.ts" />
/// <reference path="./node_modules/@nativescript/types/android-28.d.ts" />
/// <reference path="./node_modules/@nativescript/core/global-types.d.ts" />
/// <reference path="./node_modules/@nativescript/types-ios/lib/ios.d.ts" />
/// <reference path="./node_modules/@nativescript/types-android/lib/android-26.d.ts" />

2 changes: 0 additions & 2 deletions src/angular/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@

/// <reference path="../../node_modules/@nativescript/core/debugger/dom-node.d.ts" />
/// <reference path="../../node_modules/@nativescript/core/global-types.d.ts" />
export * from './nativescript-image.module';
33 changes: 16 additions & 17 deletions src/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{
"$schema": "../../node_modules/ng-packagr/package.schema.json",
"name": "@nativescript-community/ui-image-angular",
"version": "1.0.0",
"ngPackage": {
"dest": "../../tempAngular",
"lib": {
"entryFile": "index.ts",
"umdModuleIds": {
"@nativescript/core": "ns-core",
"@nativescript/angular": "ns-angular",
"@nativescript-community/ui-image": "ns-ui-image"
}
},
"whitelistedNonPeerDependencies": [
"."
]
}
"name": "@nativescript-community/ui-image-angular",
"main": "index.js",
"ngPackage": {
"dest": "../../plugin/angular",
"lib": {
"entryFile": "index.ts",
"umdModuleIds": {
"@nativescript/core": "ns-core",
"@nativescript/angular": "ns-angular",
"@nativescript-community/ui-image": "ns-image"
}
},
"whitelistedNonPeerDependencies": [
"."
]
}
}
13 changes: 13 additions & 0 deletions src/angular/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./",
"baseUrl": "./",
"plugins": [],
"paths": {
"@nativescript-community/l": ["../../plugin"]
}
},
"include": ["./**/*.ts", "../references.d.ts"],
"exclude": ["../node_modules"]
}
12 changes: 0 additions & 12 deletions tsconfig.angular.json

This file was deleted.

4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"@nativescript-community/ui-image/*": ["src/*"],
"*": ["node_modules/*"]
},
"plugins": [{ "transform": "./node_modules/@nativescript/webpack/transformers/ns-transform-native-classes.js", "type": "raw" }]
"plugins": [{ "transform": "../../node_modules/@nativescript/webpack/transformers/ns-transform-native-classes", "type": "raw" }]
},
"include": ["src/**/*", "./references.d.ts"],
"exclude": ["node_modules", "platforms", "src/angular/**/*"],
"compileOnSave": false,
"compileOnSave": false
}

0 comments on commit afca0e8

Please sign in to comment.