diff options
| author | Marvin Hagemeister <hello@marvinh.dev> | 2023-05-18 21:51:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-18 15:51:17 -0400 |
| commit | 66d25df42cf94e289b1173020a50065732a081d1 (patch) | |
| tree | 77e2adc1374661fc6a94d4ca21d8466577d97df1 /cli/tests/testdata/task/package_json_pre_only | |
| parent | ff0daa2b9d8a149d36173e19ce8dc169921486c7 (diff) | |
fix(npm): run pre and post tasks if present (#19178)
This PR optionally runs pre and posts tasks from `package.json` if
available.
Fixes #19157
Diffstat (limited to 'cli/tests/testdata/task/package_json_pre_only')
3 files changed, 10 insertions, 0 deletions
diff --git a/cli/tests/testdata/task/package_json_pre_only/bin.out b/cli/tests/testdata/task/package_json_pre_only/bin.out new file mode 100644 index 000000000..e96e8e341 --- /dev/null +++ b/cli/tests/testdata/task/package_json_pre_only/bin.out @@ -0,0 +1,4 @@ +Task not found: test +Available tasks: +- pretest (package.json) + echo 'pretest' diff --git a/cli/tests/testdata/task/package_json_pre_only/echo.out b/cli/tests/testdata/task/package_json_pre_only/echo.out new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/cli/tests/testdata/task/package_json_pre_only/echo.out @@ -0,0 +1 @@ +1 diff --git a/cli/tests/testdata/task/package_json_pre_only/package.json b/cli/tests/testdata/task/package_json_pre_only/package.json new file mode 100644 index 000000000..032a5d4ea --- /dev/null +++ b/cli/tests/testdata/task/package_json_pre_only/package.json @@ -0,0 +1,5 @@ +{ + "scripts": { + "pretest": "echo 'pretest'" + } +} |
