Skip to content

Commit

Permalink
fix: use packemon (#9)
Browse files Browse the repository at this point in the history
* fix: use packemon

* chore: remove

* fix: use index mjs wrapper

* fix: add types

* add keywords
  • Loading branch information
azu committed Sep 4, 2022
1 parent ab94c70 commit 5cb6c03
Show file tree
Hide file tree
Showing 4 changed files with 2,025 additions and 845 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -84,3 +84,7 @@ crashlytics-build.properties

/lib
/module
/mjs
/esm
/cjs
/dts
58 changes: 49 additions & 9 deletions package.json
Expand Up @@ -4,7 +4,8 @@
"description": "Check the text is ends with period mark.",
"keywords": [
"text",
"natural-language"
"natural-language",
"nlp"
],
"homepage": "https://github.com/azu/check-ends-with-period",
"bugs": {
Expand All @@ -17,26 +18,48 @@
"license": "MIT",
"author": "azu",
"type": "module",
"main": "lib/check-ends-with-period.js",
"module": "module/check-ends-with-period.js",
"types": "lib/check-ends-with-period.d.ts",
"exports": {
"./package.json": "./package.json",
"./*": {
"node": {
"import": "./mjs/*.mjs",
"require": "./cjs/*.cjs"
}
},
".": {
"require": "./lib/check-ends-with-period.js",
"import": "./module/check-ends-with-period.js"
"types": "./dts/check-ends-with-period.d.ts",
"browser": {
"module": "./esm/index.js",
"import": "./esm/index.js",
"default": "./lib/index.js"
},
"node": {
"import": "./cjs/index-wrapper.mjs",
"require": "./cjs/index.cjs"
},
"default": "./lib/index.js"
}
},
"main": "./cjs/index.cjs",
"module": "./esm/index.js",
"types": "./dts/check-ends-with-period.d.ts",
"directories": {
"test": "test"
},
"files": [
"bin/",
"cjs/**/*.{cjs,mjs,map}",
"dts/**/*.d.ts",
"esm/**/*.{js,map}",
"lib/",
"lib/**/*.{js,map}",
"mjs/**/*.{mjs,map}",
"module/",
"src/"
"src/",
"src/**/*.{ts,tsx,json}"
],
"scripts": {
"build": "tsc -p . && tsc -p tsconfig.cjs.json",
"build": "packemon build --addExports --declaration",
"prepublishOnly": "npm run build",
"test": "mocha \"test/**/*.{js,ts}\"",
"watch": "tsc -p . --watch"
Expand All @@ -48,7 +71,24 @@
"@types/mocha": "^9.1.1",
"@types/node": "^17.0.42",
"mocha": "^10.0.0",
"packemon": "^2.4.0",
"ts-node": "^10.8.1",
"typescript": "^4.7.3"
}
},
"packemon": [
{
"inputs": {
"index": "src/check-ends-with-period.ts"
},
"format": "esm",
"platform": "browser"
},
{
"inputs": {
"index": "src/check-ends-with-period.ts"
},
"format": "cjs",
"platform": "node"
}
]
}
8 changes: 0 additions & 8 deletions tsconfig.cjs.json

This file was deleted.

0 comments on commit 5cb6c03

Please sign in to comment.