Skip to content

Commit

Permalink
build: include a source map in the packaged dist (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
zimeg authored Oct 1, 2024
1 parent 56ba675 commit 288e8c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/index.js",
"scripts": {
"lint": "eslint .",
"build": "ncc build src/index.js -o dist --license licenses.txt",
"build": "ncc build src/index.js -o dist --license licenses.txt --source-map",
"local": "act public --eventpath .github/workflows/local/event.json --secret-file .github/workflows/local/.env --platform ubuntu-latest=node:20-buster",
"test:mocha": "mocha --config .mocharc.json test/*-test.js test/**/*-test.js",
"test": "npm run lint && c8 npm run test:mocha"
Expand Down
2 changes: 1 addition & 1 deletion src/health-score.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
* @description Compiles the health score components
* @param {import('@actions/core')} core `@actions/core` GitHub Actions core helper utility
* @param {import('@actions/github')} github `@actions/github` GitHub Actions core helper utility
* @returns {import('./types').HealthScore} score Health score details object
* @returns {Promise<import('./types').HealthScore>} score Health score details object
*/
compile: async function compileScore(core, github) {
// TODO: wire up action outputs
Expand Down
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ const hs = require('./health-score');
const startTime = new Date();
hs.compile(core, github)
.then((score) => hs.report(startTime, core, github, score))
.then(console.log);
.then(console.log)
.catch((err) => {
core.setFailed('Failed to check up on the health score!');
console.error(err);
});

0 comments on commit 288e8c7

Please sign in to comment.