Skip to content

Commit

Permalink
Break out xsl-path config so it can be separate for each cht version
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuester committed Jan 5, 2024
1 parent fded776 commit ced2627
Show file tree
Hide file tree
Showing 30 changed files with 1,897 additions and 23,817 deletions.
11 changes: 5 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ for version in "${versions[@]}"; do
# 210 patch to disable db-object-widget
(cd build/"$version" && patch -f webapp/src/js/enketo/widgets.js < ../../patches/210-disable-db-object-widgets.patch)
(cd build/"$version" && npm run build-cht-form)
done

# TODO update this to split out xsl by cht version
mkdir -p ext/xsl
mkdir -p ext/enketo-transformer/xsl
cp ./build/cht-core-4-6/api/src/xsl/openrosa2html5form.xsl ext/xsl
cp ./build/cht-core-4-6/api/src/enketo-transformer/xsl/* ext/enketo-transformer/xsl
mkdir -p dist/"$version"/xsl
mkdir -p dist/"$version"/enketo-transformer/xsl
cp ./build/cht-core-4-6/api/src/xsl/openrosa2html5form.xsl dist/"$version"/xsl
cp ./build/cht-core-4-6/api/src/enketo-transformer/xsl/* dist/"$version"/enketo-transformer/xsl
done

npx webpack --config webpack.config.cht-core.js --env.cht='cht-core-4-6'

Expand Down
12 changes: 12 additions & 0 deletions cht-bundles/cht-core-4-6/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const path = require('path');

Check failure on line 1 in cht-bundles/cht-core-4-6/bundle.js

View workflow job for this annotation

GitHub Actions / test (16.x)

'path' is assigned a value but never used
module.exports = {
ddocs: require('../../build/cht-core-4-6-ddocs.json'),
RegistrationUtils: require('../../build/cht-core-4-6/shared-libs/registration-utils'),
CalendarInterval: require('../../build/cht-core-4-6/shared-libs/calendar-interval'),
RulesEngineCore: require('../../build/cht-core-4-6/shared-libs/rules-engine'),
RulesEmitter: require('../../build/cht-core-4-6/shared-libs/rules-engine/src/rules-emitter'),
nootils: require('../../build/cht-core-4-6/node_modules/cht-nootils'),
Lineage: require('../../build/cht-core-4-6/shared-libs/lineage'),
ChtScriptApi: require('../../build/cht-core-4-6/shared-libs/cht-script-api'),
convertFormXmlToXFormModel: require('../../build/cht-core-4-6/api/src/services/generate-xform.js').generate,
};
6 changes: 6 additions & 0 deletions cht-bundles/cht-core-4-6/xsl-paths.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const path = require('path');

module.exports = {
FORM_STYLESHEET: path.join(__dirname, '../dist/cht-core-4-6/xsl/openrosa2html5form.xsl'),
MODEL_STYLESHEET: path.join(__dirname, '../dist/cht-core-4-6/enketo-transformer/xsl/openrosa2xmlmodel.xsl'),
};
11 changes: 0 additions & 11 deletions cht-core-4-6.js

This file was deleted.

3,663 changes: 1,832 additions & 1,831 deletions dist/all-chts-bundle.dev.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/all-chts-bundle.dev.js.map

Large diffs are not rendered by default.

45 changes: 23 additions & 22 deletions dist/cht-core-4-6/cht-core-bundle.dev.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cht-core-4-6/cht-core-bundle.dev.js.map

Large diffs are not rendered by default.

File renamed without changes.
2 changes: 1 addition & 1 deletion docs/Harness.html
Original file line number Diff line number Diff line change
Expand Up @@ -4826,7 +4826,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/core-adapter.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/dev-mode_mock.cht-conf.contact-summary-lib.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/dev-mode_mock.cht-conf.nools-lib.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/dev-mode_mock.rules-engine.rules-emitter.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/form-host_form-filler.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -1880,7 +1880,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/harness.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jsdocs.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/mock.cht-conf.module_contact-summary-lib.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/mock.cht-conf.module_nools-lib.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/mock.rules-engine.module_rules-emitter.html
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-core-adapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="mock.cht-
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 15:09:31 GMT-0600 (Central Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 05 2024 16:44:32 GMT-0600 (Central Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
Loading

0 comments on commit ced2627

Please sign in to comment.