Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-minified browser build no longer in the repository? #181

Closed
samikatz opened this issue Aug 16, 2018 · 5 comments
Closed

Non-minified browser build no longer in the repository? #181

samikatz opened this issue Aug 16, 2018 · 5 comments
Assignees
Milestone

Comments

@samikatz
Copy link

Hi,
I work on a PHP-based CMS that uses JSON5. We try to add all third party JS in non-minified form as it's helpful when debugging. Where can I get a copy of non-minified build of JSON5? I think there should be one in the repository or at least linked in the README.md as this can be a potential deterrent to user adoption.

@jordanbtucker jordanbtucker self-assigned this Aug 16, 2018
@jordanbtucker jordanbtucker added this to the v2.0.0 milestone Aug 16, 2018
@jordanbtucker
Copy link
Member

Good point! I've scheduled this for the v2.0.0 release.

@jordanbtucker
Copy link
Member

Fixed. The non-minified version is at dist/index.js and the minified version is at dist/index.min.js. You'll need to upgrade to v2.0.0 to see the change.

@samikatz
Copy link
Author

@jordanbtucker I can't actually see the files in the repo. The dist directory is specified in the .gitignore file, did you perhaps forget to commit it? Or do you mean that these files should exist after running the build command?

@jordanbtucker
Copy link
Member

jordanbtucker commented Aug 17, 2018

Sorry for the confusion. No, the dist directory is not committed to the repository, but it is included in the npm package. Here's a few ways to access dist/index.js.

Option 1: Install it from npm

npm install json5

Find the file at node_modules/json5/dist/index.js

Option 2: Use unpkg
Download the file at https://unpkg.com/json5@2/dist/index.js or use it in the browser directly.

<script src="https://unpkg.com/json5@2/dist/index.js"></script>

Option 3: Build it

git clone https://github.com/json5/json5
cd json5
npm install
npm run build

Find the file at dist/index.js

By the way, there's a few long lines of regular expressions near the beginning of the file, which might make it seem like it's minified, but if you look further down the file, you'll see it's not.

@jordanbtucker
Copy link
Member

I just released v2.0.1 which ensures that the bundles in the dist directory target ES5. In v2.0.0 they were targeting ES6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants