Skip to content

Commit

Permalink
Use Preconstruct (#17)
Browse files Browse the repository at this point in the history
* Use Preconstruct

* tweak
  • Loading branch information
Andarist authored Jan 7, 2025
1 parent dc0d53e commit 7770f51
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ module.exports = {
loose: true,
modules: false,
targets: {
node: 6,
node: 18,
},
},
],
],
plugins: ['@babel/transform-modules-commonjs'],
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules
lib
dist
32 changes: 28 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,25 @@
"description": "Babel plugin for annotating automatically pure function calls.",
"author": "Mateusz Burzyński <[email protected]> (https://github.com/Andarist)",
"license": "MIT",
"main": "lib/index.js",
"engines": {
"node": ">=18"
},
"main": "dist/babel-plugin-annotate-pure-calls.cjs.js",
"module": "dist/babel-plugin-annotate-pure-calls.esm.js",
"exports": {
".": {
"types": {
"import": "./dist/babel-plugin-annotate-pure-calls.cjs.mjs",
"default": "./dist/babel-plugin-annotate-pure-calls.cjs.js"
},
"module": "./dist/babel-plugin-annotate-pure-calls.esm.js",
"import": "./dist/babel-plugin-annotate-pure-calls.cjs.mjs",
"default": "./dist/babel-plugin-annotate-pure-calls.cjs.js"
},
"./package.json": "./package.json"
},
"files": [
"lib"
"dist"
],
"repository": {
"type": "git",
Expand All @@ -23,7 +39,6 @@
"url": "https://github.com/Andarist/babel-plugin-annotate-pure-calls/issues"
},
"homepage": "https://github.com/Andarist/babel-plugin-annotate-pure-calls#readme",
"dependencies": {},
"peerDependencies": {
"@babel/core": "^7.0.0"
},
Expand All @@ -32,14 +47,15 @@
"@babel/core": "^7.1.0",
"@babel/plugin-transform-modules-commonjs": "^7.1.0",
"@babel/preset-env": "^7.1.0",
"@preconstruct/cli": "^2.8.10",
"babel-plugin-tester": "^5.4.0",
"husky": "^0.14.3",
"jest": "^23.1.0",
"lint-staged": "^7.1.3",
"prettier": "^1.13.5"
},
"scripts": {
"build": "babel src --out-dir lib",
"build": "preconstruct build",
"pretest": "npm run build",
"test": "jest",
"precommit": "lint-staged",
Expand All @@ -56,5 +72,13 @@
"semi": false,
"trailingComma": "all",
"proseWrap": "always"
},
"preconstruct": {
"exports": {
"importConditionDefaultExport": "default"
},
"___experimentalFlags_WILL_CHANGE_IN_PATCH": {
"importsConditions": true
}
}
}

0 comments on commit 7770f51

Please sign in to comment.