question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide package.json and JSONCrush in a cjs, es, umd module variants

See original GitHub issue

This has been asked in various ways in:

Having cjs, es, umd variants that people can choose from would be very helpful.

Perhaps the previous pull requests are doing too much or aren’t the right approach for your taste? But there’s still the challenge of getting started quickly with JSONCrush in various JS environments.

Maybe a more amicable approach would be to create a simple build script to wrap JSONCrush.js in these 3 module types? Before I put in the effort, would you consider such a pull request?

(Things like babel/typescript are nice… so some meta data in the package.json to help those tools would be nice. But in my opinion, its not critical to provide many builds JSONCrush in ES3/ES5 and minified flavors. That can be left to build tools the downstream users setup. But having a few of the standard module formats would be helpful for someone who wants to quickly import the module to evaluate it.)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
KilledByAPixelcommented, Jan 8, 2021

the next step that i am comfortable with is getting back control of the npm and adding modules and package.json, after that maybe more but i think i need to start there.,

1reaction
antialiascommented, Aug 5, 2021

Just pushed out a major update to JSONCrush that wraps it in a module, adds package.json, and is now updated on NPM!

well that’s a start, but if there is any intention for this package to be maintained we really need the build script to be included in this repository and for it to automatically run whenever npm publish is run.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Create a Hybrid NPM Module for ESM and CommonJS.
Creating a single NPM module that works in all environments.
Read more >
Publish ESM and CJS in a single package - Anthony Fu
A short tutorial of shipping both ESM and CJS dual formats in a single NPM package.
Read more >
Hybrid npm packages (ESM and CommonJS) - 2ality
In this blog post, we look at npm packages that contain both ES modules and CommonJS modules.
Read more >
jsoncrush - npm
Compress JSON in URL friendly strings. Latest version: 1.1.8, last published: 5 months ago. Start using jsoncrush in your project by running ...
Read more >
Rolling (up) a multi module system (esm, cjs...) compatible ...
So in case these are included in the npm package there seems to be no reason to provide a special, unbundled umd version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found