Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for custom template directories #35

Closed
malept opened this issue Dec 18, 2016 · 1 comment · Fixed by #45
Closed

Support for custom template directories #35

malept opened this issue Dec 18, 2016 · 1 comment · Fixed by #45

Comments

@malept
Copy link
Member

malept commented Dec 18, 2016

There are a bunch of framework-specific Electron boilerplates, e.g., for React & Vue. Perhaps we should allow initializing using a custom template directory?

@malept
Copy link
Member Author

malept commented Dec 28, 2016

I was thinking about this today in the context of the current init command. As it's written, there's an optional lintstyle attribute that chooses whether to copy in an .eslintrc (for the airbnb coding standard). You can't really replicate that with a template directory, unless you plan on duplicating files (which I'd like to avoid doing en masse), there would need to be some logic involved in copying.

So, my current idea is to define a mini framework for creating boilerplates. It would look something like this:

  • A package would be named electron-forge-init-$TEMPLATE_NAME, e.g. electron-forge-init-backbone
  • electron-forge-init-$TEMPLATE_NAME - The CLI. electron-forge init $TEMPLATE_NAME [args...] passes the args to this
  • tmpl/ - The folder where all of the templated files are stored. Dotfiles are prefixed with _ instead of .
  • The electron-forge module would have public helper methods to facilitate copying files/folders to the correct places.

init would need to change to have a required templatename argument. The existing template in Electron Forge would be known as default. (Or figure out how to allow the templatename to be omitted and actually default to default - not sure how difficult that would be.)

@MarshallOfSound what do you think?

MarshallOfSound added a commit that referenced this issue Dec 30, 2016
MarshallOfSound added a commit that referenced this issue Dec 30, 2016
MarshallOfSound added a commit that referenced this issue Dec 30, 2016
MarshallOfSound added a commit that referenced this issue Dec 30, 2016
dsanders11 pushed a commit that referenced this issue Jan 14, 2023
Add a "Make installers" command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant