-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(package): Use microbundle to create cjs and mjs builds and conve…
…rt package to module Signed-off-by: Tilman Vatteroth <[email protected]>
- Loading branch information
1 parent
82c5b19
commit df4b698
Showing
9 changed files
with
3,672 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
{ | ||
"preset": "ts-jest", | ||
"transform": { | ||
"^.+\\.tsx?$": "ts-jest" | ||
}, | ||
"testEnvironment": "node", | ||
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx)$", | ||
"testPathIgnorePatterns": [ | ||
"/dist/" | ||
], | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js" | ||
"extensionsToTreatAsEsm" : [ | ||
".ts" | ||
], | ||
"globals": { | ||
"ts-jest": { | ||
"tsconfig": "tsconfig-cjs.json" | ||
} | ||
"moduleNameMapper" : { | ||
"^(\\.{1,2}/.*)\\.js$" : "$1" | ||
}, | ||
"transform" : { | ||
"^.+\\.tsx?$" : [ | ||
"ts-jest", | ||
{ | ||
"useESM" : true | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,57 @@ | ||
{ | ||
"name": "@mrdrogdrog/optional", | ||
"version": "0.2.0", | ||
"version": "1.0.0", | ||
"description": "Provides a java-like optional class", | ||
"author": "Tilman Vatteroth <[email protected]>", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "tsc-esm && tsc -p tsconfig-cjs.json && find dist/cjs -type d -execdir sh -c 'cd {}; mmv -rd \"*.js*\" \"#1#2\"' \\;", | ||
"build": "microbundle", | ||
"test": "jest", | ||
"prepublish": "rm -rf dist && yarn format && yarn lint && yarn build && yarn test", | ||
"prepublish": "rm -rf dist && yarn lint && yarn build && yarn test", | ||
"lint": "eslint src --ext .ts", | ||
"format": "prettier -c \"src/**/*.{ts,tsx,js}\"", | ||
"format:fix": "prettier -w \"src/**/*.{ts,tsx,js}\"", | ||
"lint:fix": "eslint --fix --ext .ts src", | ||
"docs": "typedoc --plugin typedoc-plugin-markdown --out docs src/index.ts" | ||
}, | ||
"type": "module", | ||
"main": "dist/cjs/index", | ||
"module": "dist/mjs/index.js", | ||
"types": "dist/cjs/index.d.ts", | ||
"source": "src/index.ts", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"module": "./dist/index.esm.js", | ||
"unpkg": "./dist/index.umd.js", | ||
"exports": { | ||
".": { | ||
"import": "./dist/mjs/index.js", | ||
"require": "./dist/cjs/index" | ||
} | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"index.d.ts": [ | ||
"dist/mjs/index.d.ts" | ||
] | ||
} | ||
"require": "./dist/index.cjs", | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.mjs" | ||
}, | ||
"files": [ | ||
"LICENSES/*", | ||
"package.json", | ||
"README.md", | ||
"dist/**" | ||
"dist/index.d.ts", | ||
"dist/index.test.d.ts", | ||
"dist/index.cjs.map", | ||
"dist/index.cjs", | ||
"dist/index.mjs.map", | ||
"dist/index.mjs", | ||
"dist/index.esm.js.map", | ||
"dist/index.esm.js", | ||
"dist/index.umd.js.map", | ||
"dist/index.umd.js" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/mrdrogdrog/optional.git" | ||
}, | ||
"devDependencies": { | ||
"@digitak/tsc-esm": "3.1.4", | ||
"@jest/types": "29.2.1", | ||
"@typescript-eslint/eslint-plugin": "5.40.1", | ||
"@typescript-eslint/parser": "5.40.1", | ||
"eslint": "8.26.0", | ||
"eslint-config-prettier": "8.5.0", | ||
"eslint-plugin-jest": "27.1.3", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"jest": "29.2.1", | ||
"microbundle": "0.15.1", | ||
"prettier": "2.7.1", | ||
"ts-jest": "29.0.3", | ||
"typescript": "4.8.4" | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.