Git Product home page Git Product logo

react-scaffolder's People

Contributors

chariths avatar charithsoori avatar dilantha111 avatar gitter-badger avatar isuruab avatar rajikaimal avatar rehrumesh avatar shapkarin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

react-scaffolder's Issues

Proposals

  • Do not require cli param name for generated file and use "index.js" by default

Template engine

I think about to use some JS template engine to generate files. To easily add some new templates for this project.

react init command doesn't work

expected behaviour

According to the documentation it should create a new project from this command
react init projectname

steps to reproduce the problem.

It gives this error on CLI

isuruAb:github isuruAb$ react init awesome-project
env: node\r: No such file or directory

specifications like the version of the project, operating system, or hardware.

macOS Sierra 10.12.5

Future of react-scaffolder

Areas to discuss

  • What will be the future of react-scaffolder.
  • What features that needs to included.
  • Enhancements on existing features.

Proposals

  • Do not use "components" folder. Some projects can use other structure (for example: src/pages) Move that to the .reactclirc
  • Rename "parent and child" to "Class" and "Function" or "Stateless" as in react docs
  • Update exist templates and add new (for example use proposal class properties and redux)
  • Better validation for prop names (not empty and not starts from space or number)
  • Do not ask question "Add propTypes" if you set at .reactclirc that you always use propTypes

write more test cases

Expected Behaviour

add test cases for missing functions

Would you like to work on the issue?

yes

Update the read me

Actual Behaviour

readme doesn't contain anything about clone from github feature.

Expected Behaviour

Update readme file.add about clone from repo feature.

Would you like to work on the issue?

yes

Clarify the issue or the feature that's going to be implemented

And as CONTRIBUTING.md says "Clarify the issue or the feature that's going to be implemented"

  • Add default config if user don't have ".reactclirc"
  • Count props, don't ask user about a number
  • Remove filename postfix ".react.js"

Also maybe I'll add some features for redux.

I do not agree with name like parent or child, but I like format that you use to store templates and interactive cli.

Improve error messages

Improve error messages in case of exceptions.

  • Trying to use an existing directory name to create a project.
  • Overwriting existing file names.

Arguments as an object

I think that it would be better to use object as argument.
instead of

generate.prototype.createComponent = function(
    module,
    componentName,
    answers,
    answersInner,
    onlyFile, 
    cb
) {}

better is

generate.prototype.createComponent = function({
    module,
    componentName,
    answers,
    answersInner = null,
    onlyFile = false, 
    cb
}) {}

And later use that:

generate.createComponent({
    module: modulename,
    componentName: name,
    cb: function(status) {}
});

Modularize react-scaffolder

This is related to future work. Objective is to create an entire eco system of clients depending on a core set of APIs provided by react-scaffolder.

According to the proposed architecture core APIs will moved into a separate package. Probably similar to react-scaffolder-core.

Core will be consumed by client application. Web client, CLI, Electron application, opening up numerous possibilities rather than sticking into a CLI based solution.

Proposed architecture:

ReferenceError: init is not defined at react init myApp

expected behaviour

โˆš application created successfully

steps to reproduce the problem.

Install react-scaffolder globally and run react init myApp

specifications like the version of the project, operating system, or hardware.

v0.3.0

fix

The error occurs because in bin/initialize.js at rule 14 init is declared without the let/const/var keyword. I've changed it to var and it worked fine.

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.