You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Use correct js path
* Print stdout/stderr of js-post-build
* Add changelog
* Update documentation
* Mention the working dir as well
# Conflicts:
# CHANGELOG.md
# docs/docson/build-schema.json
# rewatch/CompilerConfigurationSpec.md
# tests/build_tests/post-build/input.js
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@
14
14
15
15
#### :boom: Breaking Change
16
16
17
+
-`js-post-build` now passes the correct output file path based on `in-source` configuration: when `in-source: true`, the path next to the source file is passed; when `in-source: false`, the path in the `lib/<module>/` directory is passed. Additionally, stdout and stderr from the post-build command are now logged. https://github.com/rescript-lang/rescript/pull/8190
Copy file name to clipboardExpand all lines: docs/docson/build-schema.json
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -124,7 +124,8 @@
124
124
"type": "object",
125
125
"properties": {
126
126
"cmd": {
127
-
"type": "string"
127
+
"type": "string",
128
+
"description": "Shell command to run after each JS file is compiled. The absolute path to the output JS file is appended as an argument. The path respects the `in-source` setting."
128
129
}
129
130
}
130
131
},
@@ -454,7 +455,7 @@
454
455
},
455
456
"js-post-build": {
456
457
"$ref": "#/definitions/js-post-build",
457
-
"description": "(Experimental) post-processing hook. bsb will invoke `cmd ${file}` whenever a `${file}` is changed"
458
+
"description": "Post-processing hook. The build system will invoke `cmd <absolute-path-to-js-file>` after each JS file is compiled. The path respects the `in-source` setting: when true, the path is next to the source file; when false, the path is in the `lib/<module>/` directory. The command runs with the same working directory as the build process (typically the project root)."
0 commit comments