Open byersolomongmail opened 1 month ago
for a sort of working solution
git clone https://github.com/curlconverter/curlconverter.github.io.git
docker build -f ./docker/Dockerfile -t curlconverter.github.io-nginx .
docker run -d -p 8080:80
have the stand-alone library hosted on jsdeliver
I looked at their website and I don't see what I have to do to get them to host it. Don't they just host everything automatically?
IDK it's there and doesn't work gives errors. I am not as good at node and stuff. https://www.jsdelivr.com/package/npm/curlconverter-release I think there has to be a browserify that is run on it for it to work
So I tried to do this a few days ago. This was my experience trying to use curlconverter from https://www.jsdelivr.com/package/npm/curlconverter
<script src="https://cdn.jsdelivr.net/npm/curlconverter@4.9.0/dist/src/index.min.js"></script>
throws
Uncaught SyntaxError: export declarations may only appear at top level of a module
because it is an ESModule
<script type="module" src="https://cdn.jsdelivr.net/npm/curlconverter@4.9.0/dist/src/index.min.js"></script>
throws
Uncaught TypeError: The specifier “yamljs” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./”, “../” or “/”.
So then you have to build an importmap to resolve each dependency from jsDelivr:
<script type="importmap">
{
"imports": {
"yamljs": "https://cdn.jsdelivr.net/npm/yamljs@0.3.0/dist/yaml.min.js",
"tree-sitter": "https://cdn.jsdelivr.net/npm/tree-sitter@0.21.1/index.min.js",
// ..and so on
}
}
</script>
<script type="module" src="https://cdn.jsdelivr.net/npm/curlconverter@4.9.0/dist/src/index.min.js"></script>
at this point I gave up, fired up webpack, and just built my own bundle :D
I think the request here is to publish a built asset as part of the package which has all the dependencies bundled so that it can be pulled in as a single file from jsDelivr that is usable in the browser.
it would be very useful to have the stand-alone library hosted on jsdeliver with the tree-sitter and everything it is very hard to follow the node_modules packaging and the massive tree-sitter.