Skip to content

Commit 7e910f3

Browse files
committed
fix: full esm support!
1 parent 2c111dc commit 7e910f3

File tree

18 files changed

+104
-55
lines changed

18 files changed

+104
-55
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,6 @@ packages/**/*.ngsummary.json
7474
.idea
7575
/pnpm-lock.yaml
7676
pnpm-lock.yaml
77+
78+
packages/**/*js.map
79+
packages/**/*js

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
}
1010
},
1111
"scripts": {
12-
"publish": "lerna run tsc && lerna run ngc && lerna publish",
13-
"build.plugin": "lerna run tsc && lerna run ngc",
14-
"build.plugin.win": "lerna run tsc-win && lerna run ngc-win",
12+
"publish": "npm run build && lerna publish",
13+
"build": "lerna run build",
14+
"build.win": "lerna run build-win",
1515
"force_publish": "lerna publish from-package",
1616
"increment_version": "lerna version",
1717
"tsc": "lerna run tsc",
@@ -61,7 +61,9 @@
6161
"nativescript-vue": "2.5.1",
6262
"prettier": "^2.0.4",
6363
"prompt": "^1.0.0",
64+
"recursive-copy": "^2.0.10",
6465
"rimraf": "^3.0.2",
66+
"through2": "^3.0.1",
6567
"rxjs": "^6.5.5",
6668
"tns-platform-declarations": "6.5.1",
6769
"tslint": "^6.1.1",

packages/nativescript-material-activityindicator/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
"name": "nativescript-material-activityindicator",
33
"version": "3.2.3",
44
"description": "Material ActivityIndicator component",
5-
"main": "./activityindicator",
5+
"main": "./activityindicator.js",
6+
"module": "./activityindicator.mjs",
67
"typings": "./activityindicator.d.ts",
78
"scripts": {
8-
"tsc-win": "..\\..\\node_modules\\.bin\\tsc && copy ..\\..\\src\\activityindicator\\activityindicator.d.ts .\\",
9-
"tsc": "cp ../../src/activityindicator/activityindicator.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck",
9+
"tsc": "cp ../../src/activityindicator/activityindicator.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck -d",
10+
"tsc-win": "copy ..\\..\\src\\activityindicator\\activityindicator.d.ts .\\ && ..\\..\\node_modules\\.bin\\tsc --skipLibCheck -d",
11+
"build": "npm run tsc && npm run build.esm && node ../../build.esm.js && ../../node_modules/.bin/rimraf ./build/esm && npm run ngc",
12+
"build.esm": "tsc -skipLibCheck --target es2015 --module esnext --module esnext --removeComments --outDir ./build/esm",
1013
"ngc-win": "..\\..\\node_modules\\.bin\\ngc",
1114
"ngc": "NODE_OPTIONS=--max_old_space_size=8192 ../../node_modules/.bin/ngc",
1215
"clean": "../../node_modules/.bin/rimraf ./*.d.ts ./*.js ./*.js.map"

packages/nativescript-material-bottomnavigationbar/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "nativescript-material-bottomnavigationbar",
33
"version": "3.2.3",
44
"description": "NativeScript plugin to add a bottom navigation bar component for Android & iOS",
5-
"main": "bottomnavigationbar",
5+
"main": "bottomnavigationbar.js",
6+
"module": "./bottomnavigationbar.mjs",
67
"typings": "bottomnavigationbar.d.ts",
78
"nativescript": {
89
"platforms": {
@@ -11,8 +12,10 @@
1112
}
1213
},
1314
"scripts": {
14-
"tsc-win": "copy ..\\..\\src\\bottomnavigationbar\\bottomnavigationbar.d.ts .\\ && ..\\..\\node_modules\\.bin\\tsc --skipLibCheck",
15-
"tsc": "cp ../../src/bottomnavigationbar/bottomnavigationbar.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck",
15+
"tsc": "cp ../../src/bottomnavigationbar/bottomnavigationbar.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck -d",
16+
"tsc-win": "copy ..\\..\\src\\bottomnavigationbar\\bottomnavigationbar.d.ts .\\ && ..\\..\\node_modules\\.bin\\tsc --skipLibCheck -d",
17+
"build": "npm run tsc && npm run build.esm && node ../../build.esm.js && ../../node_modules/.bin/rimraf ./build/esm && npm run ngc",
18+
"build.esm": "tsc -skipLibCheck --target es2015 --module esnext --module esnext --removeComments --outDir ./build/esm",
1619
"ngc-win": "..\\..\\node_modules\\.bin\\ngc",
1720
"ngc": "NODE_OPTIONS=--max_old_space_size=8192 ../../node_modules/.bin/ngc",
1821
"clean": "../../node_modules/.bin/rimraf ./*.d.ts ./*.js ./*.js.map"

packages/nativescript-material-bottomsheet/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
"name": "nativescript-material-bottomsheet",
33
"version": "3.2.3",
44
"description": "Material bottomsheet component",
5-
"main": "./bottomsheet",
5+
"main": "./bottomsheet.js",
6+
"module": "./bottomsheet.mjs",
67
"typings": "./bottomsheet.d.ts",
78
"scripts": {
8-
"tsc-win": "..\\..\\node_modules\\.bin\\tsc && copy ..\\..\\src\\bottomsheet\\bottomsheet.d.ts .\\",
9-
"tsc": "cp ../../src/bottomsheet/bottomsheet.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck",
9+
"tsc": "cp ../../src/bottomsheet/bottomsheet.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck -d",
10+
"tsc-win": "copy ..\\..\\src\\bottomsheet\\bottomsheet.d.ts .\\ && ..\\..\\node_modules\\.bin\\tsc --skipLibCheck -d",
11+
"build": "npm run tsc && npm run build.esm && node ../../build.esm.js && ../../node_modules/.bin/rimraf ./build/esm && npm run ngc",
12+
"build.esm": "tsc -skipLibCheck --target es2015 --module esnext --module esnext --removeComments --outDir ./build/esm",
1013
"ngc-win": "..\\..\\node_modules\\.bin\\ngc",
1114
"ngc": "NODE_OPTIONS=--max_old_space_size=8192 ../../node_modules/.bin/ngc",
1215
"clean": "../../node_modules/.bin/rimraf ./*.d.ts ./*.js ./*.js.map"

packages/nativescript-material-button/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
"name": "nativescript-material-button",
33
"version": "3.2.3",
44
"description": "Material button component",
5-
"main": "./button",
5+
"main": "./button.js",
6+
"module": "./button.mjs",
67
"typings": "./button.d.ts",
78
"scripts": {
8-
"tsc-win": "..\\..\\node_modules\\.bin\\tsc && copy ..\\..\\src\\button\\button.d.ts .\\",
9-
"tsc": "cp ../../src/button/button.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck",
9+
"tsc": "cp ../../src/button/button.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck -d",
10+
"tsc-win": "copy ..\\..\\src\\button\\button.d.ts .\\ && ..\\..\\node_modules\\.bin\\tsc --skipLibCheck -d",
11+
"build": "npm run tsc && npm run build.esm && node ../../build.esm.js && ../../node_modules/.bin/rimraf ./build/esm && npm run ngc",
12+
"build.esm": "tsc -skipLibCheck --target es2015 --module esnext --module esnext --removeComments --outDir ./build/esm",
1013
"ngc-win": "..\\..\\node_modules\\.bin\\ngc",
1114
"ngc": "NODE_OPTIONS=--max_old_space_size=8192 ../../node_modules/.bin/ngc",
1215
"clean": "../../node_modules/.bin/rimraf ./*.d.ts ./*.js ./*.js.map"

packages/nativescript-material-cardview/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
"name": "nativescript-material-cardview",
33
"version": "3.2.3",
44
"description": "Material cardview component",
5-
"main": "./cardview",
5+
"main": "./cardview.js",
6+
"module": "./cardview.mjs",
67
"typings": "./cardview.d.ts",
78
"scripts": {
8-
"tsc-win": "..\\..\\node_modules\\.bin\\tsc && copy ..\\..\\src\\cardview\\cardview.d.ts .\\",
9-
"tsc": "cp ../../src/cardview/cardview.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck",
9+
"tsc": "cp ../../src/cardview/cardview.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck -d",
10+
"tsc-win": "copy ..\\..\\src\\cardview\\cardview.d.ts .\\ && ..\\..\\node_modules\\.bin\\tsc --skipLibCheck -d",
11+
"build": "npm run tsc && npm run build.esm && node ../../build.esm.js && ../../node_modules/.bin/rimraf ./build/esm && npm run ngc",
12+
"build.esm": "tsc -skipLibCheck --target es2015 --module esnext --module esnext --removeComments --outDir ./build/esm",
1013
"ngc-win": "..\\..\\node_modules\\.bin\\ngc",
1114
"ngc": "NODE_OPTIONS=--max_old_space_size=8192 ../../node_modules/.bin/ngc",
1215
"clean": "../../node_modules/.bin/rimraf ./*.d.ts ./*.js ./*.js.map"

packages/nativescript-material-core/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
"name": "nativescript-material-core",
33
"version": "3.2.3",
44
"description": "Material Core component",
5-
"main": "./core",
5+
"main": "./core.js",
6+
"module": "./core.mjs",
67
"typings": "./core.d.ts",
78
"scripts": {
8-
"tsc-win": "..\\..\\node_modules\\.bin\\tsc && copy ..\\..\\src\\core\\core.d.ts .\\",
9-
"tsc": "cp ../../src/core/core.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck",
9+
"tsc": "cp ../../src/core/core.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck -d",
10+
"tsc-win": "copy ..\\..\\src\\core\\core.d.ts .\\ && ..\\..\\node_modules\\.bin\\tsc --skipLibCheck -d",
11+
"build": "npm run tsc && npm run build.esm && node ../../build.esm.js && ../../node_modules/.bin/rimraf ./build/esm",
12+
"build.esm": "tsc -skipLibCheck --target es2015 --module esnext --module esnext --removeComments --outDir ./build/esm",
1013
"clean": "../../node_modules/.bin/rimraf ./*.d.ts ./*.js ./*.js.map android"
1114
},
1215
"nativescript": {

packages/nativescript-material-dialogs/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
"name": "nativescript-material-dialogs",
33
"version": "3.2.3",
44
"description": "Material Dialogs component",
5-
"main": "./dialogs",
5+
"main": "./dialogs.js",
6+
"module": "./dialogs.mjs",
67
"typings": "./dialogs.d.ts",
78
"scripts": {
8-
"tsc-win": "..\\..\\node_modules\\.bin\\tsc && copy ..\\..\\src\\dialogs\\dialogs.d.ts .\\",
9-
"tsc": "cp ../../src/dialogs/dialogs.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck",
9+
"tsc": "cp ../../src/dialogs/dialogs.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck -d",
10+
"tsc-win": "copy ..\\..\\src\\dialogs\\dialogs.d.ts .\\ && ..\\..\\node_modules\\.bin\\tsc --skipLibCheck -d",
11+
"build": "npm run tsc && npm run build.esm && node ../../build.esm.js && ../../node_modules/.bin/rimraf ./build/esm",
12+
"build.esm": "tsc -skipLibCheck --target es2015 --module esnext --module esnext --removeComments --outDir ./build/esm",
1013
"clean": "../../node_modules/.bin/rimraf ./*.d.ts ./*.js ./*.js.map"
1114
},
1215
"nativescript": {

packages/nativescript-material-floatingactionbutton/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
"name": "nativescript-material-floatingactionbutton",
33
"version": "3.2.3",
44
"description": "Material floatingactionbutton component",
5-
"main": "./floatingactionbutton",
5+
"main": "./floatingactionbutton.js",
6+
"module": "./floatingactionbutton.mjs",
67
"typings": "./floatingactionbutton.d.ts",
78
"scripts": {
8-
"tsc-win": "..\\..\\node_modules\\.bin\\tsc && copy ..\\..\\src\\floatingactionbutton\\floatingactionbutton.d.ts .\\",
9-
"tsc": "cp ../../src/floatingactionbutton/floatingactionbutton.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck",
9+
"tsc": "cp ../../src/floatingactionbutton/floatingactionbutton.d.ts ./ && ../../node_modules/.bin/tsc --skipLibCheck -d",
10+
"tsc-win": "copy ..\\..\\src\\floatingactionbutton\\floatingactionbutton.d.ts .\\ && ..\\..\\node_modules\\.bin\\tsc --skipLibCheck -d",
11+
"build": "npm run tsc && npm run build.esm && node ../../build.esm.js && ../../node_modules/.bin/rimraf ./build/esm && npm run ngc",
12+
"build.esm": "tsc -skipLibCheck --target es2015 --module esnext --module esnext --removeComments --outDir ./build/esm",
1013
"ngc-win": "..\\..\\node_modules\\.bin\\ngc",
1114
"ngc": "NODE_OPTIONS=--max_old_space_size=8192 ../../node_modules/.bin/ngc",
1215
"clean": "../../node_modules/.bin/rimraf ./*.d.ts ./*.js ./*.js.map"

0 commit comments

Comments
 (0)