export fixes

This commit is contained in:
Anton Lavrenov
2021-09-23 16:17:14 -05:00
parent 03b9ac1aaa
commit cb55ec8706
3 changed files with 15 additions and 7 deletions

View File

@@ -13,11 +13,21 @@
"browser": "./lib/index.js",
"typings": "./lib/index-types.d.ts",
"type": "module",
"exports": {
"node": {
"import": "./lib/index-node.js",
"require": "./cmj/index-node.js"
},
"browser": {
"import": "./lib/index.js",
"require": "./cmj/index.js"
}
},
"scripts": {
"start": "npm run test:watch",
"compile": "npm run clean && npm run tsc && cp ./src/index-types.d.ts ./lib/index-types.d.ts && npm run rollup && cp ./package-cmj.json ./cmj/package.json && cp ./src/index-types.d.ts ./cmj/index-types.d.ts",
"build": "npm run compile && cp ./src/index-types.d.ts ./lib && gulp build && node ./rename-imports.mjs",
"test:import": "npm run build && node ./test/import-test.js &&node ./test/import-test.mjs",
"test:import": "npm run build && node ./test/import-test.cjs &&node ./test/import-test.mjs",
"test": "npm run test:browser && npm run test:node",
"test:build": "parcel build ./test/unit-tests.html --dist-dir test-build --target none --public-url ./ --no-source-maps",
"test:browser": "npm run test:build && mocha-headless-chrome -f ./test-build/unit-tests.html -a disable-web-security",