-
Notifications
You must be signed in to change notification settings - Fork 21
Dynamically create a lib.js bundle if external browserified node libraries are required #3
Comments
@bookmoons Would you be interested in this as a bounty? If so, PM me on Slack. |
Thank you for the offer. Yes I'm interested. Sent a PM on Slack. |
I'm getting into this today. |
Perfect! I'll set up the bounty. |
Do you think it makes sense to prebundle everything? Tentatively doing it that way in #7. |
Unfortunately, I think we'll need to create the final I'm not an expert at browserify or webpack and similar tools, but maybe we could have one big bundle that is prebuilt and just filter out the modules not needed at conversion time? |
Alright, will look into it. |
Have to put this aside. It'll be a while before I can get back to it. |
@bookmoons Ok, let me know when you get back to it. Sent you a slack message as well 🙂 |
This has been resolved by #13 and could be closed. |
To make the experience smoother when installing this tool from NPM (not yet published as of Feb 7th 2018) we should improve how browserified node libraries are used.
Today one needs to run
./bundle
, after cloning the repo and installing the node dependencies, to download and browserify the necessary node libs to bridge the gap between feature sets in JMeter and k6. The generated k6 JS code then refers to these browserified libraries viaimport libName from "./build/libName.js"
.I propose we instead bundle browserified versions of the possible dependant node libraries and then use browserify or webpack as part of the conversion process to create a
jmeter-compat.js
file that we output to the CWD where thejmeter-to-k6 <input> > <output>
is run.The
lib.js
file would then be used like this:import { papaparse, jsonpath } from "./jmeter-compat.js"
I propose we also add a
-o filename
flag to the CLI to support specifying where the generated JS script should be saved, and thus also thejmeter-compat.js
file.The text was updated successfully, but these errors were encountered: