Git Product home page Git Product logo

dawn's Introduction

Dawn

Dawn generates project structures for you, so you don't have to.

License

Dawn's code is under the MIT license. All content generated by Dawn is licensed under the Unlicense. See the LICENSES file for more details.

dawn's People

Contributors

lunarwatcher avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

bboal

dawn's Issues

Support template arguments

This may be required for languages like Python, where we can't or don't want to infer all the information from the current repository.

Essentially, by doing :DawnGenerate someTemplate name=someArgument, someTemplate gets access to %name. I'm not entirely sold in this approach specifically, though, because it feels clunky and out of place in a command. Another implementation idea is using popups, but that's gonna require vim/nvim compatibility, because nvim has a different API.

Other implementation ideas are also welcome - especially wrt. templates "requesting" arguments to be present.

More project templates

Dawn needs more templates.

See the docs for the how. These templates should represent a standard; there's not currently a requirement that the templates have to follow the strictest standards, but standard bad practices should be avoided.

Current languages:

  • Vim
  • C++ with CMake
  • C (with CMake? Not sure what proper C devs use as a standard)
  • Go (#6)
  • Python
  • Rust
  • Generic GitHub repo
  • Something else?

There's a lot of flexibility in what counts as an accepted template, but please check in before implementing anything. Here's a few examples of what counts as invalid templates:

  • Generally anything that already has a template generator (such as hugo, libgdx, etc.). At best, though, a template like this could consist of a single command that runs said generator, along with other boilerplate actions, though preferably if it's command line compatible.
  • Heavily opinionated templates, or templates with obvious bad practices; templates should follow a standard as much as possible, as well as established best-practices for any given language. (Example: no using namespace std; ๐Ÿ—ž๏ธ). Indentation is a different can of worms, but could be worth just doing :retab automatically to make it work with the editor's standards. (Not sure if that works from spaces to tabs, but I guess we'll find out if this is attempted)

Note that this isn't a complete list; use common sense when adding templates. To finish off though, a good template:

  • Is minimal
  • Includes some sane project standards for both your language, as well as some sane standards for Git and GitHub projects (a README, a gitignore, an empty license, etc.)
  • Compiles or runs a "Hello, World!" program after being generated. This is purely so any user can instantly verify that the build system has been linked successfully1, and is not an invitation to write a "Hello, World!" program in your favorite language (this isn't one of those repos).
  • May include other features that are commented out in the template (Example: Conan in the C++ template). This may change if we support template arguments (#4)

1: Dunno about you, but the first thing I do when setting up a project is making sure my build system has been correctly configured. For languages where this doesn't make sense, like Python (because a 0 dependency "Hello, World!" program is trivial to do; takes a file and a command, so there's nothing to test here), this part isn't required

Support template autocomplete

Fairly simple; The templates are already exposed through the map, so the names are easy to get. From there, it's just a matter of writing an autocomplete function for the command that generates templates.

Make sure name placeholders handle spaces

If the folder name contains a space, this plugin may potentially behave weirdly. Make sure it doesn't, potentially by removing spaces and replacing them with something else, or by allowing a name input as a second argument to the command in charge of generating templates.

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.