Git Product home page Git Product logo

redux-cli's People

Contributors

anithri avatar emptyway avatar enyachoke avatar ericwooley avatar ivanpokupec avatar jamesr73 avatar jeremyjs avatar jtmthf avatar lamkeewei avatar mzvast avatar nicolasiensen avatar pustovalov avatar spencercdixon avatar tornewuff avatar tseho avatar vkvelho avatar walreyes 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

redux-cli's Issues

What is the best way to group functionality using redux-cli

I love this tool, but I was wondering how do you group things together using redux-cli

For example, if a component is page specific ( in my case, index.jsx is the container )

screen shot 2016-05-03 at 9 46 46 am

So wonder if I can generate structure like

components/home/
components/school/
components/school/list/
components/school/detail

If not, do you think something like the following would help ?

redux g dump SubmitSchoolButton --f school/list

IDE friendly

Is there a way to make the blueprint's files IDE friendly? Currently I'm using Webstrom, and see error warning everywhere.

Unable to run redux-cli, issue with finding particular modules?

Hi,

Not sure if this is just an issue with me but i cant seem to run any redux commands other than redux which obviously just shows what is available. I get the following:

deepc@DESKTOP-M6C5NC2 MINGW64 /d/Projects/vagrant_local/docker/node/app2
$ redux help generate
module.js:339
    throw err;
    ^

Error: Cannot find module 'C:\Users\deepc\AppData\Roaming\npm\node_modules\redux-cli\bin\index-generate'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:136:18)
    at node.js:963:3

deepc@DESKTOP-M6C5NC2 MINGW64 /d/Projects/vagrant_local/docker/node/app2
$ redux g smart Button
module.js:339
    throw err;
    ^

Error: Cannot find module 'C:\Users\deepc\AppData\Roaming\npm\node_modules\redux-cli\bin\index-g'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:136:18)
    at node.js:963:3

Im running node v 4.2.2 on windows 10. I installed it globally and am trying to use it with React Redux Starter Kit.

Thanks

Creating multiple smart component is failing ?

I'm trying to play around this cli tool, and I create a smart component

roy :: ~/development/poc/redux-cli/test (master) $ redux g smart CommentContainer
  info: installing blueprint...
  create: /Users/roy/development/poc/redux-cli/test/src/containers/CommentContainer.js
  create: /Users/roy/development/poc/redux-cli/test/src/containers/index.js
  create: /Users/roy/development/poc/redux-cli/test/tests/containers/CommentContainer.spec.js

And I create another one, and it is failed, is that expected?

roy :: ~/development/poc/redux-cli/test (master) $ redux g smart CommentContainer2
  info: installing blueprint...
  create: /Users/roy/development/poc/redux-cli/test/src/containers/CommentContainer2.js
  error: Not writing file.  File already exists at: /Users/roy/development/poc/redux-cli/test/src/containers/index.js
  create: /Users/roy/development/poc/redux-cli/test/tests/containers/CommentContainer2.spec.js

cli arguments aren't passed into options.entity.options

Happy Friday!

I've created a blueprint and am trying to add some template variables, but unfortunately any cli arguments I pass aren't being processed, even --debug. Here's a gist with the files. I'm console.loging the entity so you can see the results.

Create gist support for templates

Allow users of the CLI to save a URL to a gist that can be used for the templates of any of the components. Make sure to cache the template response so it's not making api requests on every generation.

Write docs on how to properly build a template gist.

Error code: 128

On a new project creation, I'm getting an error 128 within the setup when it tries to pull from the starter-kit repo.

I believe it fails within function 'pullDownKit()' of /src/cli/redux-new.js.

const pull = exec('git pull https://github.com/davezuko/react-redux-starter-kit.git', {silent: true});
clearInterval(interval);

If I run a git pull of the repo, outside of the cli, its pulls properly.

Here is my terminal output.

redux new testRedux
create: project directory created
create: setting up tracking with git...
error: Something went wrong... please try again. Make sure you have internet access
error: Error code: 128

I'm running El Capitan
git version 2.5.4 (Apple Git-61)
Node v5.3.0

Redux CLI exits with error

I installed redux-cli as per instruction like below

npm i -g redux-cli

and using node installed with nvm. When I run redux g dumb HelloWorld, redux-cli is throwing error

/usr/bin/env: node --harmony: No such file or directory

How to use it with node installed by NVM? I can symlink node to path where cli is looking for but looks like dirty hack to me.

Make BrowserSync a core dependency

**This is indirectly related to the CLI but equally important since it is using react-redux-starter-kit. I'll take this up there but wanted to get input here as well.

Why?
Because everyone should be testing across multiple devices and browsers while building their apps.

What?
Make BrowserSync a core dependency and integrate it into the server.

Opinionated things I'd love to get feedback on:

  1. Is this something that other feel would be valuable? If so, I'd like feedback so I can open a PR and contribute back as I work on integrating BrowserSync into my local project.
  2. Should this be super opinionated and included as the default? (I would argue Yes because it doesn't actually change or alter the current behavior in any way. Rather, it provides an enhancement running on different, configurable port.)
  3. Should we be building, merging, and deploying things without properly testing them across many devices and browsers? No.
  4. Does BrowserSync make it easier, more efficient, and more enjoyable to do #3. Yes.
  5. If we want to expose config options for BrowserSync (which i think we should), where would be the ideal place for them?

Option to create test within component folder

Awesome work on this. Looking forward to putting it to some good use!

It would be great if there was an option to have the automatic tests created in the same folder as the component/container/form/duck rather than in a test directory.

I am unsure if this can be done with blueprints? Or if it will need to be written in as part of the commands?

Ideas for maintaining parity with react-redux-starter-kit

First off, this is ✨ awesome ✨ , amazing work. Unfortunately I don't have the time right this second to type out as detailed of an issue as I'd like, but I wanted to put it out there in case you had any initial thoughts or ideas. Basically, what can be done in the base starter kit repo to make it easier to maintain feature consistency/parity?

For example, at work we have a fork of the starter kit and have built an updater utility that automatically migrates changes from the base template to the target project. Unfortunately it's not yet open sourced, so I'd have to talk to the team about what would have to be done to get something like that out the door and in good enough condition for public consumption.

I've been (very slowly) working toward a more "stable" v2.0.0 release, but would be willing to tag a new version earlier if that makes sense for you, since, despite my best efforts, pulling latest master isn't always perfect. Basically, tell me what you need from me and I'll do my best to accommodate.

Add a destroy option to delete the generated files

$ redux g dumb Todo

  info: installing blueprint...
  create: ~/example/src/component/Todo.js
  create: ~/example/tests/component/Todo.spec.js
  info: finished installing blueprint.

$ redux d dumb Todo

  Are you sure? [y/n]:
  removing: ~/example/src/component/Todo.js
  removing: ~/example/tests/component/Todo.spec.js
  info: finished destroying Todo

Consider a name change

As big of a fan of redux as I am, this project got more general with the introduction of blueprints. I think blueprints got a lot of things right that something like YO got wrong, specifically committing the blueprints into the project. So I could see this project taking off.

I intend to use this on several projects which are not redux based. (I work in marketing and have to deal with dozens of projects with all kinds of setups).

This is still a really young project, it might be a good idea to change the name while you still can? It's going to be confusing if this is still going in 5 years and no one is using redux.

Generator fails: Syntax Error

I ran the following commands.

$ redux new practice-redux-container
$ cd practice-redux-container
$ redux g smart hello
$ redux g dumb hi

Did I forget to configure something?

/usr/local/lib/node_modules/redux-cli/node_modules/jsonfile/index.js:38
      throw err
            ^
SyntaxError: practice-redux-container/.reduxrc: Unexpected token u
    at Object.parse (native)
    at Object.readFileSync (/usr/local/lib/node_modules/redux-cli/node_modules/jsonfile/index.js:34:17)
    at ProjectSettings.loadSettings (/usr/local/lib/node_modules/redux-cli/lib/models/project-settings.js:45:44)
    at new ProjectSettings (/usr/local/lib/node_modules/redux-cli/lib/models/project-settings.js:38:10)
    at Generate.SubCommand (/usr/local/lib/node_modules/redux-cli/lib/models/sub-command.js:28:41)
    at new Generate (/usr/local/lib/node_modules/redux-cli/lib/sub-commands/generate.js:45:82)
    at Object.<anonymous> (/usr/local/lib/node_modules/redux-cli/lib/cli/redux-generate.js:19:18)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

$ redux g dumb hi
/usr/local/lib/node_modules/redux-cli/node_modules/jsonfile/index.js:38
      throw err
            ^
SyntaxError: practice-redux-container/.reduxrc: Unexpected token u
    at Object.parse (native)
    at Object.readFileSync (/usr/local/lib/node_modules/redux-cli/node_modules/jsonfile/index.js:34:17)
    at ProjectSettings.loadSettings (/usr/local/lib/node_modules/redux-cli/lib/models/project-settings.js:45:44)
    at new ProjectSettings (/usr/local/lib/node_modules/redux-cli/lib/models/project-settings.js:38:10)
    at Generate.SubCommand (/usr/local/lib/node_modules/redux-cli/lib/models/sub-command.js:28:41)
    at new Generate (/usr/local/lib/node_modules/redux-cli/lib/sub-commands/generate.js:45:82)
    at Object.<anonymous> (/usr/local/lib/node_modules/redux-cli/lib/cli/redux-generate.js:19:18)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

Configuration for components/__tests__

I love the idea of redux-cli. I use snippets to create boilerplates but having a generator on the command line - priceless. My folder structure is like:

root
├── components
│   ├──Foo.js
│   ├──__tests__
│      ├──Foo.test.js
├── containers
│   ├──__tests__
├── reducers
│   ├──__tests__
└── index.js

Is there a way to configure the paths so that __tests__ point to the subfolder of the parent folder?

redux new project-name shows "Fetching ... react-redux-starter-kit.git from github" for a long time

Hi,

I am running redux 1.3.2 and trying to do the "redux new [project-name]". It shows these messages:

  info: Creating new directory...
  create: Created directory: test-proj
  info: Setting up tracking with git...
  loading: Fetching [email protected]:davezuko/react-redux-starter-kit.git from git  loading: 
  Fetching [email protected]:davezuko/react-redux-starter-kit.git from git  loading: 
  Fetching [email protected]:davezuko/react-redux-starter-kit.git from github. ⠸
The authenticity of host 'github.com (192.30.252.129)' can't be established.
  loading: Fetching [email protected]:davezuko/react-redux-starter-kit.git from git

and the window buffer just keeps showing Fetching [email protected]:davezuko/react-redux-starter-kit.git from git. I even waited 10 minutes and I just see those same lines scrolling by. Finally, I did a ctrl-c to see if there's anything actually getting saved into my "test-proj" directory. The only thing I see is the .git directory. In the directory where test-proj is, I see that redux-cli created a .reduxrc file, i.e.

/projects
   +--> .reduxrc
   +--> test-proj/
          +--> .git/

What am I doing wrong here?

Make adding tests optional

Not every module I make is going to need a unit test file (sometimes you have a deadline and need to push something out, or whatever).

It would be great to have a shortcut to skip the test generation. EG:
redux g -nt dumb SimpleButton # shorthand
redux g --no-toest dumb SimpleButton #full

I agree with the ideal of 100% unit test coverage, but it's not always practical.

-

Disregard this..my mistake

Using namespaces in files names

Hi! Our team is actively using namespaces in projects and when I'm trying to define the name of generated file like this:

redux g dumb Foo/Bar

the CLI generates this:

  create: /home/vagrant/Code/todo/src/components/Foo/Bar/Foo/Bar.js
  create: /home/vagrant/Code/todo/tests/components/Foo/Bar.spec.js

Foo/Bar is doubled in the file name, but not in the test.

You can reproduce it on the fresh installation of this boilerplate:
https://github.com/davezuko/react-redux-starter-kit

My version of redux-cli is 1.4.2.

Am I doing something wrong or it's just not supported yet?

'new projectName' never finishes fetching react-redux-starter-kit

I've been operating under the assumption this is some dumb local environment issue, and it probably still is, but it's got me baffled.

Using [email protected], on node 5.7.0 on Mac OS. I re-installed redux-cli multiple times and have no trouble with that. But if I try to scaffold a project with it, the install runs forever, with no errors and no timeout. At the moment, it has been a half hour, with no progress. I was playing with it before a three-day business trip, and when I came back from that trip and opened the terminal window again, the same fetch was still going, even though it had been on-line and off-line dozens of times since then.

It eternally sticks on:
loading: Fetching [email protected]:davezuko/react-redux-starter-kit.git from github.

I can download that repo by itself with no trouble: either a zip download or a clone completes successfully, and almost immediately.

Here's a full capture of the current terminal:

voila_capture 2016-03-24_13-05-19_

Create generator for routes

Curious as to how I could inject a route into a pre-built routes.js file.

Maybe there could be a routes manifest and the routes.js gets built dynamically from the routes manifest. That way it's easy to add lines to the generated routes manifest and have the app always reflect the right routes. Kind of like how Rails has a routes config.

Route generator should also probably create the appropriate View container file for that route by appending RouteName + View.

Generate redux module file in lowercase

Hey guys,

First of all, congrats for this awesome tool, it's been very helpful to bootstrap a new project.

I was using the duck generator and I realized that the file name is being generated in camel case, isn't it the case of these files to be generated in sneak case? If you agree with that I can submit a pull request ;)

Cheers!

Make component case configurable

I develop with a team on a Mac and deploy on a Linux machine. Mac is not case sensitive, so having case sensitive file names leads to undiscovered import errors until it is deployed.

Fetching the starter kit with https

I had an issue when I tried using the client from a new machine where I had not added my ssh key to git. The client just stuck at fetching and it took me a while to notice what was wrong. Why don't you just use https. I also know for sure I can't use it at work were they have blocked ssh.

Getting more done in GitHub with ZenHub

Hola! @joyvuu-dave has created a ZenHub account for the SpencerCDixon organization. ZenHub is the leading team collaboration and project management solution built for GitHub.


How do I use ZenHub?

To get set up with ZenHub, all you have to do is download the browser extension and log in with your GitHub account. Once you do, you’ll get access to ZenHub’s complete feature-set immediately.

What can ZenHub do?

ZenHub adds a series of enhancements directly inside the GitHub UI:

  • Real-time, customizable task boards for GitHub issues;
  • Burndown charts, estimates, and velocity tracking based on GitHub Milestones;
  • Personal to-do lists and task prioritization;
  • “+1” button for GitHub issues and comments;
  • Drag-and-drop file sharing;
  • Time-saving shortcuts like a quick repo switcher.

Add ZenHub to GitHub

Still curious? See more ZenHub features or read user reviews. This issue was written by your friendly ZenHub bot, posted by request from @joyvuu-dave.

ZenHub Board

Problem with redux g duck

I'm trying to create duck "posts", but it returns error below:

 $ redux g duck posts                                                                                                                                                                                                                             [18:31:41]
  info: installing blueprint...
  create: /Users/XXX/Projects/shop-public-service/src/redux/modules/posts.js
  error: error was: ejs:1
 >> 1| import reducer, { defaultState } from 'redux/modules/<%= name %>';
    2| import deepFreeze from 'deep-freeze';
    3|
    4| describe('(Redux) <%= name %>', () => {

name is not defined (Error in blueprint template: /usr/local/lib/node_modules/redux-cli/blueprints/duck/files/__test__/redux/modules/__name__.test.js)

Is there any way to get this to work properly?
BTW great job doing this. I've always dreamt about react/redux cli, just like ember one.

Cheers!

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.