Giter Club home page Giter Club logo

Comments (8)

nicksrandall avatar nicksrandall commented on August 17, 2024 1

@davidtaboas Sorry for the delayed response. Yes, I did this by publishing my plop code as a (private) npm module. Then in each of my projects, my plopfile.js looks something like this:

module.exports = require('my-plops');

and that's it!

from plop.

amwmedia avatar amwmedia commented on August 17, 2024

is your main goal to have multiple projects use the same plop generators and templates? If so I think @nicksrandall was doing this by publishing them as an npm module. Maybe he would be kind enough to share how that approach worked for him πŸ˜„

from plop.

amwmedia avatar amwmedia commented on August 17, 2024

@davidtaboas the short answer to your question is no, plop doesn't support dynamically downloading templates when you trigger plop. However if you're looking to centralize your generators for use on multiple projects, there's a pretty nice solution to be had with npm ;-)

from plop.

calcaide avatar calcaide commented on August 17, 2024

@nicksrandall Thanks for that idea, actually I made a couple of plop generators (plop-react-webpack and plop-node-express) with that approach and works pretty well.

Just note, that in the generator plopfile.js, in all templateFile property I had to writte the route like that node_modules/plop-node-express/.... is that correct? I mean, another way to do it? Thanks in advance.

from plop.

amwmedia avatar amwmedia commented on August 17, 2024

@calcaide I believe right now this is the way you would do this. However, soon I'll be adding in full support for these types of approaches. The way I'm planning to do this would allow your shared plopfiles to reference everything locally like they normally would, but give the consumer plopfile control to specify where the generated files should be placed. still working out the details, but this is sort of the "next" thing on my agenda for plop after I get it integrated with node-plop

from plop.

calcaide avatar calcaide commented on August 17, 2024

@amwmedia Many thanks for the answer. The node-plop looks pretty cool, are you accepting contributors? Because I am interested in contribute to the project. Since I meet plop (a few weeks ago) I really fall in love with, I think is very much simpler than Yeoman. Actually, I am using Plop as a full project generator (replacing yeoman) and as micro-generator. Thank you for make Plop

from plop.

amwmedia avatar amwmedia commented on August 17, 2024

@calcaide really glad you like plop and are having good success with it. I'm always open to ideas and contributions! I would just ask that if you have an idea for a new feature, start the conversation as an issue so we can brainstorm and layout a plan for implementation.

Things that are ready to be worked on are the integration work so that plop is using node-plop internally and documentation for node-plop. Let me know how you'd like to be involved. I'm actually planning to take on this feature (sharable modules) next within node-plop... after I finish up the additional test coverage that I'm wrapping up now.

from plop.

calcaide avatar calcaide commented on August 17, 2024

@amwmedia ok, you are right. I thing start the conversation as an issue is perfect. I will do that to not pollute more this issue. My intention is start contributing with little things and ideas.

from plop.

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.