migrate back to commonjs

This commit is contained in:
Anton Lavrenov
2023-04-13 23:27:56 -05:00
parent 9fd79e8642
commit 8e955f9dd5
11 changed files with 17707 additions and 17749 deletions

View File

@@ -9,41 +9,12 @@
"lib",
"cmj"
],
"main": "./cmj/index-node.js",
"main": "./lib/index-node.js",
"browser": "./lib/index.js",
"typings": "./lib/index-types.d.ts",
"type": "module",
"__ignore_exports": {
".": {
"node": {
"require": "./cmj/index-node.js",
"import": "./lib/index-node.js",
"default": "./lib/index-node.js"
},
"require": "./cmj/index.js",
"import": "./lib/index.js",
"default": "./lib/index.js"
},
"./cmj": {
"import": "./cmj/index.js",
"require": "./cmj/index-node.js",
"node": "./cmj/index-node.js",
"default": "./cmj/index.js"
},
"./cmj/*": {
"import": "./cmj/*.js",
"require": "./cmj/*.js",
"default": "./cmj/*.js"
},
"./lib/*": {
"import": "./cmj/*.js",
"require": "./cmj/*.js",
"default": "./cmj/*.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",
"compile": "npm run clean && npm run tsc && cp ./src/index-types.d.ts ./lib/index-types.d.ts && npm run rollup",
"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.cjs &&node ./test/import-test.mjs",
"test": "npm run test:browser && npm run test:node",
@@ -51,7 +22,7 @@
"test:browser": "npm run test:build && mocha-headless-chrome -f ./test-build/unit-tests.html -a disable-web-security",
"test:node": "ts-mocha -p ./test/tsconfig.json test/unit/**/*.ts --exit && npm run test:import",
"test:watch": "rm -rf ./parcel-cache && parcel serve ./test/unit-tests.html ./test/manual-tests.html ./test/sandbox.html ./test/text-paths.html",
"tsc": "tsc --removeComments && tsc --build ./tsconfig-cmj.json",
"tsc": "tsc --removeComments",
"rollup": "rollup -c --bundleConfigAsCjs",
"clean": "rm -rf ./lib && rm -rf ./types && rm -rf ./cmj && rm -rf ./test-build",
"watch": "rollup -c -w",
@@ -88,8 +59,8 @@
}
],
"devDependencies": {
"@parcel/transformer-image": "2.8.2",
"@size-limit/preset-big-lib": "^8.1.0",
"@parcel/transformer-image": "2.8.3",
"@size-limit/preset-big-lib": "^8.2.4",
"@types/mocha": "^10.0.1",
"canvas": "^2.11.2",
"chai": "4.3.7",
@@ -100,24 +71,24 @@
"gulp-exec": "^5.0.0",
"gulp-jsdoc3": "^3.0.0",
"gulp-rename": "^2.0.0",
"gulp-replace": "^1.1.3",
"gulp-replace": "^1.1.4",
"gulp-typescript": "^5.0.1",
"gulp-uglify": "^3.0.2",
"gulp-uglify-es": "^3.0.0",
"gulp-util": "^3.0.8",
"mocha": "10.2.0",
"mocha-headless-chrome": "^4.0.0",
"parcel": "2.8.2",
"parcel": "2.8.3",
"process": "^0.11.10",
"rollup": "^3.7.5",
"rollup": "^3.20.2",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-typescript2": "^0.34.1",
"size-limit": "^8.1.0",
"size-limit": "^8.2.4",
"ts-mocha": "^10.0.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
"typescript": "^5.0.4"
},
"keywords": [
"canvas",