Git Product home page Git Product logo

gnerate's Introduction

Dylan Paulus Logo

๐Ÿค“ (Java|Type)Script, CSS, Python, C#, SQL

๐Ÿ  Pacific Northwest

๐Ÿคน Drums, Backpacking, Hiking, Photography

gnerate's People

Contributors

anass-daoudi avatar antzshrek avatar dependabot[bot] avatar ganderzz avatar itsjw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gnerate's Issues

Add Error Handling

Some checks are in place, but going to need to do better. Add error checks for everything!

Command Line Argument: Add Templates & Parameters

Everything done in a config file should also be mirrored in command line arguments.

Add --templatePath= (To resolve template path) and --[key]=[value] (For injecting variables to templates).

This will also need to make having the config file optional.

Options

Add more terminal args.

Some ideas:

  • Make a third argument that is optional that allows creating file in a defined location
  • --typescript adds types to params
  • --connect add this only to containers to add react-redux connect()()
  • --test add unit tests to component

Docs: Write Setup Docs

Need to write docs on how to set up Gnerate.

generate --init will provide a base config file, but still need to describe what templates are, and the templates directory.

Unit Tests

Write unit tests for both the CLI and what it outputs

Add Aliases

It'd be nice to be able to define aliases for templates through the config.

{
alias: {
"test": ["component", "container"]
}
}

Templates: Inject variables

Templates are useless without being able to dynamically inject variables into them!

For example, I would like the have the filename visible to name a JS class the same as the filename.

I imagine this being similar to template strings to make it easy to learn.

class ${rgen.filename} extends React.Component {}

Improve documentation

Improve the docs and readme to help explain gnerate better.

  • Looking to add a full walkthrough of setting up gnerate and using it (Sort of started on the website)
  • Improve readme for contributing to the projects & getting started using gnerate

Config: Resolve cwd to config file path

Right now the config file resolves its path to where the terminal command is being ran. For example, in the example directory (here), I have to put "./example/templates".

The templates path should be smart enough to resolve to path to where the config file is. So, the path to the templates should be "./templates" in the config file.

Code Refactor

Let's clean up some of this code.

  • Move what we can away from index.js
  • Move factory into its own file, we can then move all the component files out of index.js
  • Handle fileName so we don't have to add it to every class
  • Create an interface for 'output' found in classes
  • Handle creating file in a better way
    ...

Improve Dev Tools

Currently the tools for contributing to the project are slim. It would help to create a better way to test gnerate locally, plus add some nice tooling like linting.

This may be a case to include linting into our CI, or use a pre-commit check (Husky?)

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.