Giter Site home page Giter Site logo

Comments (3)

MitkoTschimev avatar MitkoTschimev commented on May 23, 2024

Yeah, I was thinking about this kind of idea already. I received messages where people asked for custom templates -> So what I can imagine is to be able to provide a custom template path (URL to the template) that would be used.

With this feature we would enable an ecosystem where everyone could provide nice templates for any kind of solution. And they don't need to contribute directly to the plugin?

Imagine it as a plugin system in the plugin :D :D

What do you think?

from nx-plugins.

micmania1 avatar micmania1 commented on May 23, 2024

Could that already work within the NX paradigms?

Let say for example this plugin provides a generate command to create an empty shell:

nx g @dev-thought/deploy-it-empty:app <my-app>

That would create the infrastructure folder within the specific app (or potentially create the entire app itself), add necessary files (Pulumi.yaml) and add the deploy/destroy commands to the application. All the user would need to do then is write the pulumi typescript file and add any configuration.

If you wanted to extend this to create templates, you could potentially do something similar to this:

import { chain, externalSchematic, Rule } from '@angular-devkit/schematics';

function applyCustomFiles() {
  console.log('Do custom stuff here');
}

function addCustomCommands() {
  console.log('Add custom commands like "serve" to run the service locally');
}

export default function (schema: any): Rule {
  return chain([
    externalSchematic('@dev-thought/deploy-it-empty', 'app', {
      name: schema.name,
    }),
    applyCustomFiles(),
    addCustomCommands(),
  ]);
}

Disclaimer: I'm new to NX/Pulumi and angular workspace schematics so apologies if I make some wrong assumptions. Please feel free to correct me if I get anything wrong.

from nx-plugins.

MitkoTschimev avatar MitkoTschimev commented on May 23, 2024

Yes, kind of this way it would be possible. I would skip the whole command line support for it. Because I expect that the person who wants to use a special template, knows which one he chose and with which application/library it is compatible.

from nx-plugins.

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.