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
PR #6 makes everything happen, BUT you have to run unpublish() and then vizmake() to get webpack to re-bundle the js modules if you edit anything since they are not a target.
We could...
make every js module a target in viz.yaml and have the bundle publish step depend on each one.
re-run the webpack bundle step every time vizmake is called no matter what
work webpack into vizmake function
Potential things for number 3:
parameters:
-
id: webpack_input_js
location: src/app.js
-
id: webpack_output_js
location: bundle.js
-
id: webpack_module_dir
dir: src/modules/
...
publish:
-
id: js_bundle # get appropriate script tag
relpath: ??????
mimetype: application/javascript
depends: webpack_output_js
-
id: figure_section # need this so that d3 code gets run after d3 has been loaded
template: layout/templates/main_fig.mustache
publisher: section
depends:
script: js_bundle
context:
script: script
-
id: webpack_config
template: webpack_config.mustache
publisher: ??????
depends:
input: webpack_input_js
output: webpack_output_js
context:
input: input
output: output
---------- webpack_config.mustache ----------
const webpack = require("webpack");
module.exports = {
entry: './{{input}}',
output: {
filename: './{{output}}'
},
plugins: [
new webpack.ProvidePlugin({
d3: 'd3'
})
]
};
---------- vizmake() calls a function called webpacker() ----------
check to see if package.json existed. if not, run `npm init -y`
check to see if correct node_modules are installed. if not install them.
check to make sure webpack.config.js exists (throw error if it doesn't because that should come from publish step)
?? when does package-lock.json get created?
once everything else is published `npm run start`
The text was updated successfully, but these errors were encountered:
PR #6 makes everything happen, BUT you have to run
unpublish()
and thenvizmake()
to get webpack to re-bundle the js modules if you edit anything since they are not a target.We could...
Potential things for number 3:
The text was updated successfully, but these errors were encountered: