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_post | |
| 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_post')
| -rw-r--r-- | cli/tests/testdata/task/package_json_post/bin.out | 5 | ||||
| -rw-r--r-- | cli/tests/testdata/task/package_json_post/echo.out | 1 | ||||
| -rw-r--r-- | cli/tests/testdata/task/package_json_post/package.json | 6 |
3 files changed, 12 insertions, 0 deletions
diff --git a/cli/tests/testdata/task/package_json_post/bin.out b/cli/tests/testdata/task/package_json_post/bin.out new file mode 100644 index 000000000..9864cc76d --- /dev/null +++ b/cli/tests/testdata/task/package_json_post/bin.out @@ -0,0 +1,5 @@ +Warning Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in an upcoming release. +Task test echo 'test' +test +Task posttest echo 'posttest' +posttest diff --git a/cli/tests/testdata/task/package_json_post/echo.out b/cli/tests/testdata/task/package_json_post/echo.out new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/cli/tests/testdata/task/package_json_post/echo.out @@ -0,0 +1 @@ +0 diff --git a/cli/tests/testdata/task/package_json_post/package.json b/cli/tests/testdata/task/package_json_post/package.json new file mode 100644 index 000000000..82689f7d4 --- /dev/null +++ b/cli/tests/testdata/task/package_json_post/package.json @@ -0,0 +1,6 @@ +{ + "scripts": { + "posttest": "echo 'posttest'", + "test": "echo 'test'" + } +} |
