Skip to content

Commit

Permalink
Use dts-gen to generate new packages (DefinitelyTyped#13405)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy authored Feb 13, 2017
1 parent 9be1d09 commit 33c940d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 255 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ Your package should have this structure:
| tsconfig.json | This allows you to run `tsc` within the package. |
| tslint.json | Enables linting. |

Generate these by running `npm run new-package -- new-package-name`.
Generate these by running `npm run new-package -- --name my-package-name --template module`.
(Other templates are `module-class`, `module-function`, `module-plugin`, `global`, `global-plugin`, and `global-modifying-module`.
This just wraps [dts-gen](https://github.com/Microsoft/dts-gen), so it supports all options from that.)

You may edit the `tsconfig.json` to add new files, to add `"target": "es6"` (needed for async functions), to add to `"lib"`, or to add the `"jsx"` compiler option.

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
},
"scripts": {
"compile-scripts": "tsc -p scripts",
"new-package": "node scripts/new-package.js",
"new-package": "dts-gen --dt",
"not-needed": "node scripts/not-needed.js",
"lint": "node scripts/lint.js",
"test": "node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed --nProcesses 1"
},
"devDependencies": {
"types-publisher": "Microsoft/types-publisher#production"
"types-publisher": "Microsoft/types-publisher#production",
"dts-gen": "latest"
}
}
121 changes: 0 additions & 121 deletions scripts/new-package.js

This file was deleted.

131 changes: 0 additions & 131 deletions scripts/new-package.ts

This file was deleted.

0 comments on commit 33c940d

Please sign in to comment.