Skip to content

Commit

Permalink
feat: improve exports for ESM and add shorthand export for the full.p…
Browse files Browse the repository at this point in the history
…retty build
  • Loading branch information
targos committed Oct 13, 2023
1 parent f0fcc89 commit 688aedd
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
'use strict';

module.exports = require('./dist/openchemlib-core');
module.exports = require('./dist/openchemlib-core.js');
2 changes: 1 addition & 1 deletion full.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
'use strict';

module.exports = require('./dist/openchemlib-full');
module.exports = require('./dist/openchemlib-full.js');
3 changes: 3 additions & 0 deletions full.pretty.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use strict';

module.exports = require('./dist/openchemlib-full.pretty.js');
2 changes: 1 addition & 1 deletion minimal.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
'use strict';

module.exports = require('./dist/openchemlib-minimal');
module.exports = require('./dist/openchemlib-minimal.js');
20 changes: 19 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@
"test-only": "jest"
},
"main": "./core.js",
"exports": {
".": "./core.js",
"./minimal": "./minimal.js",
"./minimal.js": "./minimal.js",
"./core": "./core.js",
"./core.js": "./core.js",
"./full": "./full.js",
"./full.js": "./full.js",
"./full.pretty": {
"types": "./full.d.ts",
"default": "./full.pretty.js"
},
"./full.pretty.js": {
"types": "./full.d.ts",
"default": "./full.pretty.js"
}
},
"files": [
"dist",
"types.d.ts",
Expand All @@ -36,7 +53,8 @@
"core.js",
"core.d.ts",
"full.js",
"full.d.ts"
"full.d.ts",
"full.pretty.js"
],
"repository": {
"type": "git",
Expand Down

0 comments on commit 688aedd

Please sign in to comment.