Skip to content

Commit 0fb3d10

Browse files
authoredMay 29, 2023
Merge pull request #77 from MatteoPologruto/switch-to-ncc-packaging
Use ncc to compile the action
2 parents 51cd93c + 1b412c9 commit 0fb3d10

File tree

193 files changed

+5205
-14097
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+5205
-14097
lines changed
 

‎.github/CONTRIBUTING.md

+2-21
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,10 @@ npm run test
4141

4242
### 6. Build
4343

44-
It is necessary to compile the code before it can be used by GitHub Actions. We check in the `node_modules` to provide runtime dependencies to the system using the Action, so be careful not to `git add` all the development dependencies you might have under your local `node_modules`.
45-
Remember to run these commands before committing any code changes:
44+
It is necessary to compile the code before it can be used by GitHub Actions. Remember to run these commands before committing any code changes:
4645

4746
```
48-
npm run build
49-
```
50-
51-
remove all the dependencies:
52-
53-
```
54-
rm -rf node_modules
55-
```
56-
57-
add back **only** the runtime dependencies:
58-
59-
```
60-
npm install --production
61-
```
62-
63-
check in the code that matters:
64-
65-
```
66-
git add lib node_modules
47+
task build
6748
```
6849

6950
### 7. Commit

‎.github/workflows/check-packaging-ncc-typescript-npm.yml renamed to ‎.github/workflows/check-packaging-ncc-typescript-task.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,16 @@ jobs:
3939
with:
4040
node-version: ${{ env.NODE_VERSION }}
4141

42-
- name: Install dependencies
43-
run: npm install
42+
- name: Install Task
43+
uses: arduino/setup-task@v1
44+
with:
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
version: 3.x
4447

4548
- name: Build project
46-
run: |
47-
npm run build
49+
run: task ts:build
4850

4951
- name: Check packaging
5052
# Ignoring CR because ncc's output has a mixture of line endings, while the repository should only contain
5153
# Unix-style EOL.
52-
run: git diff --ignore-cr-at-eol --color --exit-code lib
54+
run: git diff --ignore-cr-at-eol --color --exit-code dist

0 commit comments

Comments
 (0)