mirror of
https://github.com/actions/setup-java.git
synced 2024-12-01 21:00:56 -05:00
Remove old dist/index.js file (#96)
* Remove old dist/index.js file * Misc fixes
This commit is contained in:
parent
d34a7e45c8
commit
fe06bcdc44
3 changed files with 15 additions and 15 deletions
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
|
@ -8,21 +8,21 @@
|
||||||
|
|
||||||
### NCC
|
### NCC
|
||||||
|
|
||||||
In order to avoid uploading `node_modules` to the repository, we use [zeit/ncc](https://github.com/zeit/ncc) to create a single `index.js` file that gets saved in `dist/`.
|
In order to avoid uploading `node_modules` to the repository, we use [zeit/ncc](https://github.com/zeit/ncc) to create multiple `index.js` files that gets saved under `dist/`.
|
||||||
|
There are two main files that get created
|
||||||
|
- `dist/setup/index.js`
|
||||||
|
- Core `setup-java` logic that downloads and installs an appropriate version of Java
|
||||||
|
- Handling creating a `settings.xml` file to make it easier to publish packages
|
||||||
|
- `dist/cleanup/index/js`
|
||||||
|
- Extra cleanup script that is used to remove GPG keys (needed for certain self-hosted runner scenarios)
|
||||||
|
|
||||||
If you're developing locally you can run
|
If you're developing locally, after doing `npm install`, you can use the following commands
|
||||||
```
|
```yaml
|
||||||
npm install
|
npm run build # runs tsc along with ncc
|
||||||
tsc
|
npm run format # runs prettier --write
|
||||||
ncc build
|
npm run format-check # runs prettier --check
|
||||||
```
|
npm run test # runs jest
|
||||||
You can also do
|
npm run release # add all the necessary ncc files under dist/* to the git staging area
|
||||||
```
|
|
||||||
npm run-script build # runs tsc
|
|
||||||
npm run-script format # runs prettier --write
|
|
||||||
npm run-script format-check # runs prettier --check
|
|
||||||
npm run-script test # runs jest
|
|
||||||
npm run-script release # runs ncc build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Any files generated using `tsc` will be added to `lib/*`, however those files also are not uploaded to the repository and are excluded using `.gitignore`.
|
Any files generated using `tsc` will be added to `lib/*`, however those files also are not uploaded to the repository and are excluded using `.gitignore`.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "setup java action",
|
"description": "setup java action",
|
||||||
"main": "dist/index.js",
|
"main": "dist/setup/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ncc build -o dist/setup src/setup-java.ts && ncc build -o dist/cleanup src/cleanup-java.ts",
|
"build": "ncc build -o dist/setup src/setup-java.ts && ncc build -o dist/cleanup src/cleanup-java.ts",
|
||||||
"format": "prettier --write **/*.ts",
|
"format": "prettier --write **/*.ts",
|
||||||
|
|
Loading…
Reference in a new issue