Skip to content

Commit

Permalink
Convert to ESM-only
Browse files Browse the repository at this point in the history
  • Loading branch information
ezzatron committed Oct 30, 2021
1 parent b156993 commit 7e2fb98
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 20 deletions.
File renamed without changes.
4 changes: 0 additions & 4 deletions .size-limit.js → .size-limit.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@ module.exports = [
path: 'artifacts/dist/index.js',
limit: '500 B',
},
{
path: 'artifacts/dist/index.es.js',
limit: '500 B',
},
]
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ website-%:

################################################################################

artifacts/dist: rollup.config.js tsconfig.json node_modules $(JS_SOURCE_FILES)
node_modules/.bin/rollup --config rollup.config.js

artifacts/dist: tsconfig.build.json node_modules $(JS_SOURCE_FILES)
@rm -rf "$@"
node_modules/.bin/tsc -p "$<"
@touch "$@"
File renamed without changes.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@snout/jest-config')
export {default} from '@snout/jest-config'
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
"publishConfig": {
"access": "public"
},
"type": "module",
"main": "artifacts/dist/index.js",
"module": "artifacts/dist/index.es.js",
"typings": "artifacts/dist/index.d.ts",
"exports": {
"import": "./artifacts/dist/index.es.js",
"require": "./artifacts/dist/index.js"
".": "./artifacts/dist/index.js"
},
"sideEffects": false,
"files": [
Expand All @@ -31,18 +30,17 @@
"node": ">=14"
},
"scripts": {
"prepublishOnly": "rollup --config rollup.config.js",
"size-limit-build": "rollup --config rollup.config.js",
"prepublishOnly": "tsc -p tsconfig.build.json",
"size-limit-build": "tsc -p tsconfig.build.json",
"size-limit-clean": "rm -rf artifacts/dist"
},
"dependencies": {
"@snout/regexp": "^0.2.1"
"@snout/regexp": "^0.3.0"
},
"devDependencies": {
"@size-limit/preset-small-lib": "^5.0.3",
"@snout/eslint-config": "^2.0.0",
"@snout/jest-config": "^1.0.2",
"@snout/rollup-config": "^1.1.2",
"@snout/jest-config": "^2.1.0",
"@snout/tsconfig": "^1.0.3",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
Expand Down
4 changes: 0 additions & 4 deletions rollup.config.js

This file was deleted.

File renamed without changes.
9 changes: 9 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "artifacts/dist",
},
"include": [
"src/**/*"
]
}

0 comments on commit 7e2fb98

Please sign in to comment.