Skip to content

Commit

Permalink
fix: declarations are sometimes empty. Closes #105
Browse files Browse the repository at this point in the history
  • Loading branch information
wessberg committed Jul 27, 2020
1 parent e9ed130 commit 0e41f7c
Show file tree
Hide file tree
Showing 16 changed files with 768 additions and 536 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -687,10 +687,6 @@ Babel will then be used for all other syntax transformation from then on, depend

[See this explainer](./documentation/explainer/why_is_babel-plugin-transform-runtime_and_tslib_included_by_default.md).

#### My declaration files are always empty.

If `rollup-plugin-ts` generates empty declaration files and it shouldn't, this is most likely because your `tsconfig` file doesn't have a `include` property matchign your source directory or `exclude` property matching your destination directory, and so TypeScript will consider all files inside the project root and potentially produce an invalid internal folder structure when the entry file(s) to Rollup comes from a subdirectory (such as `src/`). For example, you may have all of your files inside of a `src` folder, and you may use `dist` as your output folder. If that folder isn't already empty, for example from a previous build, and that folder isn't excluded from TypeScript, you may end up in this situation. To resolve it, make sure to either clean up your destination directory for every build, or make sure to exclude it from TypeScript in your config file.

## Starter templates

The following is an evolving list of starter templates for new projects using Rollup, TypeScript, and `@wessberg/rollup-plugin-ts` that you can take a look at and draw inspiration from.
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,31 @@
"license": "MIT",
"devDependencies": {
"@rollup/plugin-alias": "^3.1.1",
"@rollup/plugin-commonjs": "^13.0.0",
"@rollup/plugin-commonjs": "^14.0.0",
"@rollup/plugin-json": "^4.1.0",
"@types/node": "^14.0.20",
"@types/node": "^14.0.26",
"@types/prettier": "^2.0.2",
"@types/semver": "^7.3.1",
"@typescript-eslint/eslint-plugin": "^3.6.0",
"@typescript-eslint/parser": "^3.6.0",
"@wessberg/rollup-plugin-ts": "^1.2.27",
"@typescript-eslint/eslint-plugin": "^3.7.0",
"@typescript-eslint/parser": "^3.7.0",
"@wessberg/rollup-plugin-ts": "^1.2.28",
"@wessberg/scaffold": "^1.0.30",
"@wessberg/ts-config": "^1.0.16",
"ava": "3.10.1",
"ava": "3.11.0",
"babel-preset-minify": "^0.5.1",
"core-js": "^3.6.5",
"eslint": "^7.4.0",
"eslint": "^7.5.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsdoc": "^29.1.3",
"eslint-plugin-jsdoc": "^30.0.3",
"fast-glob": "^3.2.4",
"husky": "^4.2.5",
"np": "5.2.1",
"pnpm": "^5.3.0",
"pnpm": "^5.4.6",
"prettier": "^2.0.5",
"pretty-quick": "^2.0.1",
"rimraf": "^3.0.2",
"rollup": "^2.21.0",
"rollup": "^2.23.0",
"semver": "7.3.2",
"standard-changelog": "^2.0.24",
"ts-node": "8.10.2",
Expand All @@ -87,16 +87,16 @@
"typescript-3-9-2": "npm:typescript@3.9.2"
},
"dependencies": {
"@babel/core": "^7.10.4",
"@babel/plugin-proposal-async-generator-functions": "^7.10.4",
"@babel/core": "^7.10.5",
"@babel/plugin-proposal-async-generator-functions": "^7.10.5",
"@babel/plugin-proposal-json-strings": "^7.10.4",
"@babel/plugin-proposal-object-rest-spread": "^7.10.4",
"@babel/plugin-proposal-optional-catch-binding": "^7.10.4",
"@babel/plugin-proposal-unicode-property-regex": "^7.10.4",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.10.4",
"@babel/plugin-transform-runtime": "^7.10.5",
"@babel/preset-env": "^7.10.4",
"@babel/runtime": "^7.10.4",
"@babel/runtime": "^7.10.5",
"@rollup/pluginutils": "^3.1.0",
"@types/babel__core": "^7.1.9",
"@wessberg/browserslist-generator": "^1.0.37",
Expand Down
Loading

0 comments on commit 0e41f7c

Please sign in to comment.