Coder Social home page Coder Social logo

Comments (6)

sahat avatar sahat commented on May 28, 2024

Sure, would love to see this. The way I did JS Library generator is first by building a fully-featured example, then break it apart into optional features like Travis CI, code coverage, license type.

I assume some of the options would follow that patterns, while other options would be orthogonal to each other, and those usually take a little longer to implement from my experience.

Let me know if you have any questions. But to give you a brief idea of how generators work:

  1. All generators are categorized by type.
  2. Each generator contains modules directory.
  3. When you call await getModule() you give it a file path starting with the generator type, but excluding modules directory, e,g static-site/metalsmith/index.js.
  4. To "create a new file", you use lodash's set function. Essentially you are creating a big JavaScript object, where object nesting translates into directory structure.
  5. All files are created on params.build object.
  6. You call replaceCodeMemory on files inside params.build that you have assigned in Step 4. Each file is a Node Buffer.

from megaboilerplate.

bnb avatar bnb commented on May 28, 2024

@sahat Hey! I'd like to try to work on this today. Got one question: would you be able to explain the .gitkeep file with the Jekyll and Middleman examples? Is that something native to the SSGs or to the Mega Boilerplate project?

from megaboilerplate.

sahat avatar sahat commented on May 28, 2024

Ah those are just hacks. There used to be images in there which I removed but wanted to keep folder around. The reason because images were getting corrupted when I create a zip archive. The issue has been resolved, so you can feel free to use any binary data in the generator.

from megaboilerplate.

sahat avatar sahat commented on May 28, 2024

@bnb How is the progress coming along with Metalsmith?

from megaboilerplate.

bnb avatar bnb commented on May 28, 2024

@sahat: Hey! So I've actually been re-evaluating Metalsmith recently for some other projects, and I've come to realize it's probably not good to continue using it, nor add it to a project such as megaboilerate.

There are 7 deps that are severely out of date in the Metalsmith project. The last commit was ~2 months ago, and the community and project hasn't been growing.

Adding it to Megaboilerate would add support for a stale project that would either be painfully maintained or ignored and neglected in the future.

Apologies for the trouble!

from megaboilerplate.

sahat avatar sahat commented on May 28, 2024

@bnb No worries, I agree with you. Thanks for the follow up.

from megaboilerplate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.