generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build]: Replace
node_modules
with a single-file bundle produced by…
… `ncc` Detailed description of changes: * Add `package` script to `package.json` that builds the TypeScript code and "links" it together with all of its (transitive) dependencies in a single `index.js` file. * Change the `main` file in `package.json` to `dist/index.js`. `ncc` allows only the out dir can be specified - the filename is always `index.js`. * Add `lib/` and `dist/*` to .gitingore, but exclude `dist/index.js` so it will be committed. * Delete the `node_modules` and `lib` folders * Add a `.gitattributes` file in order to set mark `dist/index.js` as `binary` for git diff and merge purposes * Update `.gitignore` to the latest version from `https://github.com/github/gitignore/blob/master/Node.gitignore` * Set the `target` in `tsconfig.json` to `es2017`, which is [supported by current Node.js version - v12][1], as should make for cleaner generated "down-leveled" code as it has native async/await support [1]: https://node.green/
- Loading branch information
1 parent
a6d682f
commit 4287ead
Showing
9 changed files
with
47 additions
and
430 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Mark .pnp.cjs as binary to prevent git from trying to merge it | ||
/dist/index.js binary linguist-generated | ||
/.pnp.* binary linguist-generated | ||
/.yarn/releases/** binary linguist-generated | ||
|
||
# Set the language for these files to json5 to ensure GitHub doesn't show the comments as errors | ||
/.vscode/*.json linguist-language=JSON5 | ||
tsconfig.json linguist-language=JSON5 |
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 |
---|---|---|
|
@@ -11,4 +11,4 @@ inputs: | |
required: false | ||
runs: | ||
using: "node12" | ||
main: "lib/main.js" | ||
main: "dist/index.js" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.