Skip to content

Commit

Permalink
Extended exports and typesVersions
Browse files Browse the repository at this point in the history
  • Loading branch information
hejny committed Sep 17, 2021
1 parent fd2fc4a commit 3f32567
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 12 deletions.
64 changes: 52 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,62 @@
"name": "waitasecond",
"version": "1.8.8",
"description": "Simple tool library for the waiting using Promises.",
"main": "dist/main.js",
"typings": "dist/main.d.ts",
"sideEffects": false,
"files": [
"dist/**"
],
"main": "./dist/main.js",
"types": "./dist/main.d.ts",
"exports": {
".": "./dist/main.js",
"./*": "./dist/functions/*.js"
"./forAllImagesInElement": "./dist/functions/forAllImagesInElement.js",
"./forAnimationFrame": "./dist/functions/forAnimationFrame.js",
"./forDocumentLoad": "./dist/functions/forDocumentLoad.js",
"./forDOMContentLoaded": "./dist/functions/forDOMContentLoaded.js",
"./forEver": "./dist/functions/forEver.js",
"./forImmediate": "./dist/functions/forImmediate.js",
"./forTime": "./dist/functions/forTime.js",
"./forTimeout": "./dist/functions/forTimeout.js",
"./forTimeSynced": "./dist/functions/forTimeSynced.js",
"./forValueDefined": "./dist/functions/forValueDefined.js"
},
"typesVersions": {
"*": {
"./forAllImagesInElement": [
"./dist/functions/forAllImagesInElement.d.ts"
],
"./forAnimationFrame": [
"./dist/functions/forAnimationFrame.d.ts"
],
"./forDocumentLoad": [
"./dist/functions/forDocumentLoad.d.ts"
],
"./forDOMContentLoaded": [
"./dist/functions/forDOMContentLoaded.d.ts"
],
"./forEver": [
"./dist/functions/forEver.d.ts"
],
"./forImmediate": [
"./dist/functions/forImmediate.d.ts"
],
"./forTime": [
"./dist/functions/forTime.d.ts"
],
"./forTimeout": [
"./dist/functions/forTimeout.d.ts"
],
"./forTimeSynced": [
"./dist/functions/forTimeSynced.d.ts"
],
"./forValueDefined": [
"./dist/functions/forValueDefined.d.ts"
]
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com:hejny/waitasecond.git"
},
"author": "Pavol Hejný",
"license": "MIT",
"scripts": {
"test": "npm run test-unit && npm run test-integration",
"test-unit": "jest --config jestconfig.json",
Expand All @@ -31,12 +77,6 @@
"preversion": "npm run lint && npm test && npm run generate-main-exports-commit && npm run build && npm run prettier-commit",
"postversion": "npm run generate-documentation-commit && git push && git push --tags && npm publish"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com:hejny/waitasecond.git"
},
"author": "Pavol Hejný",
"license": "MIT",
"dependencies": {
"ts-essentials": "^8.1.0"
},
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-main-exports/generate-main-exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,6 @@ async function main() {
}

/**
* TODO: Generate also exports and typesVersions in package.json
* TODO: This should be an indipendent lib
*/

0 comments on commit 3f32567

Please sign in to comment.