chrisdiana / cms.js

Client-Side JavaScript Site Generator

Home Page:http://chrisdiana.github.io/cms.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Split CMS.js file in to smaller parts

jreitz-dev opened this issue · comments

I think it would be great if we would split up the "large" file into smaller chunks so it's more readable.
Is there any interest in it?

Hey @wasnlosdu yes I’m definitely on board with that. I actually have a working branch already started splitting out the code. I’ll push it up and let you know when it’s up.

Was going to propose this myself, but @wasnlisdu beat me to it. A big plus would be that end users could (possibly) swap out parts. For example, if they want to use Mustache for templates, GitLab or Bitbucket for hosting, etc..

@chrisdiana - that sounds awesome if you need any help just ask :)

I f think I like the idea @MorganConrad but I'm concerned we might overcomplicate things. What do you think?

@wasnlosdu I agree my ideas might overcomplicate. They are more of a version 3 or 4 thing. But good to keep in mind as you split up and modularize CMS.js.

@MorganConrad let's try to remember that.

@chrisdiana do you have an opinion about the feature idea?

Yeah I agree with you @wasnlosdu as we might fall into the trap of over-complicating things. We can maybe leverage plugin extending or config extending similar to how the markdown engine works. This way we can keep the core clean while not limiting features. Once I get a chance to push up the split code maybe you all can take a look and see if we missed anything.

Hey @wasnlosdu @MorganConrad so I split up the code into smaller modules so it's easier to maintain. While I was at it, I also just figured I'd move the code to ES6/Babel since we would be combining files anyway at that point. So now it's using rollup with a few plugins for building but the source is still dependency free...keeping it nice and small. I'm sure I missed a few things in the migration so feel free to PR if you find any lingering items or any suggestions as well!

One more thing, also added a development setup wiki page too which will probably need some development but at least a good starting point.

Hey @chrisdiana - I'm back from my vacation and I must say, things look pretty good. 👍

Great to hear @wasnlosdu !