Ignore script if not found in scripts field on package.json #1443
Answered
by
milesj
harrytran998
asked this question in
Q&A
-
Thank you for your effort to make the awesome project @milesj, I currently open-source this mini project https://github.com/techmely/essential-packages.git. But like the title, after I run The Toolchains & Typescript Task Yml file$schema: 'https://moonrepo.dev/schemas/tasks.json'
implicitInputs:
- 'package.json'
fileGroups:
configs:
- '*.{js,json,yml,yaml}'
sources:
- 'src/**/*'
tests:
- 'src/**/*.test.mts'
- 'tests/**/*.test.mts'
- 'tests/**/*.stories.*'
- '**/__tests__/**/*'
tasks:
build:
command: "tsup"
args: "src/index.ts --clean --format esm --dts --tsconfig tsconfig.build.json"
inputs:
- "@globs(sources)"
- "package.json"
outputs:
- "dist"
clean:
command:
- 'rm -rf dist'
lint:
command: 'bunx'
args: '@biomejs/biome check --apply .'
inputs:
- '/biome.json'
- '/tsconfig.base.json'
- 'tsconfig.json'
- '@globs(sources)'
- '@globs(tests)'
test:
command:
- 'vitest'
args: 'run --passWithNoTests --isolate'
inputs:
- '@globs(sources)'
- '@globs(tests)'
- 'vitest.config.*'
typecheck:
command:
- 'tsc'
args: '--noEmit'
inputs:
- '@globs(sources)'
- '@globs(tests)'
- 'tsconfig.json'
- 'tsconfig.*.json'
- '/tsconfig.base.json'
publish:
command:
- 'node'
args: '../../scripts/publishPkg.mjs'
inputs:
- '@globs(sources)'
- '@globs(tests)'
upgrade.deps:
command: 'npm-check-updates -u' $schema: https://moonrepo.dev/schemas/workspace.json
projects:
- ts-packages/*
vcs:
defaultBranch: main
manager: git
hooks:
commit-msg:
- echo "commit msg"
pre-commit:
- echo "pre commit msg"
pre-push:
- echo "pre push"
prepare-commit-msg:
- echo "prepare commit msg"
hasher:
optimization: "performance"
runner:
cacheLifetime: "24 hours"
archivableTargets:
- ':clean'
- ':format'
- ':lint'
- ':test'
- ':typecheck'
logRunningCommand: true
telemetry: false Here the detail debug log
|
Beta Was this translation helpful? Give feedback.
Answered by
milesj
Apr 22, 2024
Replies: 1 comment 1 reply
-
@harrytran998 You may need to run the clean in a shell, so that it uses the shell's version of clean:
command:
- 'rm -rf dist'
options:
shell: true |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
harrytran998
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@harrytran998 You may need to run the clean in a shell, so that it uses the shell's version of
rm
.