-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdate-package-json.js
More file actions
32 lines (26 loc) · 1009 Bytes
/
Copy pathupdate-package-json.js
File metadata and controls
32 lines (26 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* @license
* SPDX-License-Identifier: MIT
*
* Copyright (c) 2025-2026 Ryan Johnson
*
* Script to update package.json for GitHub Action.
*/
const fs = require('fs');
const path = require('path');
const packageJsonPath = path.join(__dirname, 'package.json');
const packageJson = require(packageJsonPath);
packageJson.description =
'A GitHub Action for efficiently setting up Task (go-task/task) task runner in GitHub Actions.';
packageJson.scripts = {
test: 'jest',
'test:memory':
'node --expose-gc --max-old-space-size=4096 node_modules/.bin/jest --runInBand --detectOpenHandles --forceExit',
build: 'tsc',
lint: "eslint 'src/**/*.ts' '__tests__/**/*.ts'",
'lint:fix': "eslint --fix 'src/**/*.ts' '__tests__/**/*.ts'",
format: "prettier --write 'src/**/*.ts' '__tests__/**/*.ts'",
clean: 'rm -rf dist coverage'
};
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');
console.log('✅ package.json description and scripts updated successfully!');