Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

feat: expose package.json in file info #782

Merged
merged 2 commits into from
Sep 6, 2017

Conversation

calebboyd
Copy link
Contributor

This sets the raw package.json data onto a packageJson property in IPackageInformation

Also gets the sass dep extraction tests working on windows.

The test for the packageJson property is a bit hacky, mostly because there is no way (afaik) to configure a PathMaster instance outside of the global Config object

@nchanged
Copy link
Contributor

nchanged commented Sep 6, 2017

Do you really think we need to carry package.json data everywhere?

@calebboyd
Copy link
Contributor Author

calebboyd commented Sep 6, 2017

I figured its useful contextual information for a file. Its just a json object. If you don't want to merge it thats fine. I suppose the plugin could just pull it from the nearest node_modules folder of an "entryFile"...

I've removed it -- still have the other things in though if you want to merge them.

@nchanged
Copy link
Contributor

nchanged commented Sep 6, 2017

i was just thinking, since it's in memory already it can be in the object, I think it's fine.
Btw it won't be available in every file, just the entry point.

@calebboyd
Copy link
Contributor Author

calebboyd commented Sep 6, 2017

Ahh, I was thinking I needed it to identify each module to find the native modules... but I think I can just inspect the dependencies as they become available.

Copy link
Contributor

@nchanged nchanged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nchanged nchanged merged commit 440dd3e into fuse-box:master Sep 6, 2017
@calebboyd calebboyd deleted the package-json-info branch September 6, 2017 17:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants