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

Multiple libraries (for instance by extracting provisioning)? #87

Closed
pbjorklund opened this issue May 5, 2016 · 3 comments
Closed

Multiple libraries (for instance by extracting provisioning)? #87

pbjorklund opened this issue May 5, 2016 · 3 comments

Comments

@pbjorklund
Copy link
Contributor

I think we should extract the provisioning from the main "core library" seeing as it's around 25% of the total codebase right now.

My suggestion is that we move everything that is "core" into it's own folder and other "packages" into own folders.

For instance

/src/pnp - The core library
/src/provisioning - The provisioning framework, dependant on the core library

We would then package /src/pnp as pnp.js and /src/provisioning as provisioning.js.

Or: We remove provisioning and let it live as it's own repository that requires this library.

@patrick-rodgers
Copy link
Contributor

Yep, thinking about this as well - it is on the agenda for today's call. I did some code clean-up on it but didn't get the size down much. My ideas are similar to yours - we can have one large src folder but in package we break it out into different .js files. Does make it slightly harder to "include" since package.json supports a single entry (so far as I know). BUT likely most people won't want the provisioning code so why force them to carry the weight. Anyway, on the list for discussion.

@patrick-rodgers
Copy link
Contributor

So, we didn't get to talk about this today - but it was on the agenda ;). No worries, I'll start a Yammer thread on this and see. Right now I am leaning towards a separate .js in dist and I think it could still be used from typescript like

import provisioning from "sp-pnp-js\lib\sharepoint\provisioning\something

Another thing to test...

@patrick-rodgers
Copy link
Contributor

Completed today. pnp.min.js => 79k

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

No branches or pull requests

2 participants