Skip to content

Commit

Permalink
Simplify build script (#119)
Browse files Browse the repository at this point in the history
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max and crazy-max committed May 17, 2021
1 parent d025252 commit 5e2f40f
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 108 deletions.
1 change: 0 additions & 1 deletion .gitignore
@@ -1,5 +1,4 @@
/.dev
/lib

# Jetbrains
/.idea
Expand Down
213 changes: 118 additions & 95 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions hack/build.Dockerfile
Expand Up @@ -28,7 +28,7 @@ FROM deps AS build
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \
yarn run build && yarn run package && mkdir /out && cp -Rf dist /out/
yarn run package && mkdir /out && cp -Rf dist /out/

FROM scratch AS build-update
COPY --from=build /out /
Expand Down Expand Up @@ -56,4 +56,4 @@ FROM deps AS format-validate
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \
yarn run format-check \
yarn run format-check
3 changes: 1 addition & 2 deletions package.json
@@ -1,9 +1,8 @@
{
"name": "chocolatey-action",
"description": "GitHub Action for Chocolatey, the package manager for Windows",
"main": "lib/main.js",
"main": "src/main.ts",
"scripts": {
"build": "tsc",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"package": "ncc build --source-map --license licenses.txt"
Expand Down
11 changes: 4 additions & 7 deletions tsconfig.json
@@ -1,16 +1,13 @@
{
"compilerOptions": {
"target": "es6",
"target": "es2015",
"moduleResolution": "node",
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"newLine": "lf",
"outDir": "./lib",
"rootDir": "./src",
"strict": true,
"noImplicitAny": true,
"esModuleInterop": true
},
"exclude": ["node_modules"]
"exclude": ["node_modules", "**/*.test.ts"]
}

0 comments on commit 5e2f40f

Please sign in to comment.