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

source and dist files out of sync #46

Open
obedm503 opened this issue May 15, 2019 · 2 comments
Open

source and dist files out of sync #46

obedm503 opened this issue May 15, 2019 · 2 comments

Comments

@obedm503
Copy link

I'm having an issue where this plugin kept modifying indentation in my package.json even after adding PACKAGE_JSON_INDENT: 2 to the configuration. After an inspection of the dist files I noticed that PACKAGE_JSON_INDENT was nowhere to be found.

Turns out that PACKAGE_JSON_INDENT was added in a very recent pr (#39) but the source files were not recompiled.

Note: I didn't recompile dist in this PR, since my build made a lot of other unrelated changes.

comment

So, the new config option was never really released.

My suggestion is to add a "prepublishOnly" script that compiles the files before publishing to npm. This would also mean making git ignore dist/ to avoid confusion like what happened in #39.

My other suggestion is to also, remove PACKAGE_JSON_INDENT. PACKAGE_JSON_INDENT is not necessary since the plugin could just use whatever indentation was already in use.

What do you think? I could submit pr's and address both issues.

@obedm503
Copy link
Author

ping @radswiat since I noticed you're not "watching" the repo

@ATrogolo
Copy link

Hi @obedm503,
I've got the same issue you're writing about: the option PACKAGE_JSON_INDENT isn't considered by the latest release (1.2.2).
Everytime I build my solution, I need to format package.json file.

Is your pull-request ready to merge?

Thanks,
Andrea

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

No branches or pull requests

2 participants