Coder Social home page Coder Social logo

mohebifar / racket Goto Github PK

View Code? Open in Web Editor NEW
290.0 10.0 15.0 75 KB

A complete starting app for developing universal React/Redux web apps with generators, best practices and more

Home Page: https://racket-demo.herokuapp.com/

License: MIT License

JavaScript 95.02% CSS 4.98%
racket redux react universal best-practices yeoman-generator

racket's Introduction

Racket Logo

Generators, best practices and a complete starting app for developing universal React/Redux web app
Racket Version Downloads MIT License Get help on Codementor

Racket

Racket is a yeoman generator for creating universal/isomorphic web applications. One of the pains for developers who want to use React or want to develop universal apps was knowing which libraries to choose and how tie them up! Racket responds to this issue by giving you the option to choose the tools/technologies that you prefer the most and offering a good structure that you can maintain for years!

No need to copy or fork, just use the command-line generator!

Creating, developing and maintaining a universal react app had never been so easy!

Live running demo

Suggestion: I do recommend to create a simple app with React + Redux yourself, before using Racket.

Racket Screencast

Installation

First, note that you need to use npm 3. If you have not upgraded to npm 3, run:

npm i -g npm@3

Install yo and generator-racket via npm:

npm i -g yo generator-racket

Create a directory for your app and cd into it:

mkdir my-awesome-app
cd my-awesome-app

Then run the following command to start creating your app.

yo racket

Features

From each item with multiple options, you can choose the one you prefer:

Generators

Component

To generate a component run:

yo racket:component <component-name> [--stateless]

Route

To generate a new route and component run:

yo racket:route <component-name>

Redux module

To generate a redux module run:

yo racket:redux-module <name>

racket's People

Contributors

avindra avatar mohebifar avatar pshvedov 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

racket's Issues

Heroku deploy example

Hey, first of all thanks for this yeoman generator, it helps big time developing universal react apps.

Could you please provide some instructions on how you deployed the example app to Heroku.
I've tried deploying to Heroku but I get an error at npm run build regarding not finding webpack.
Thanks.

remote: -----> Building dependencies
remote:        Installing node modules (package.json)
remote:
remote:        > [email protected] postinstall /tmp/build_5d938f69de6d3c3cbf4ad96f7559dbb3
remote:        > npm run build
remote:
remote:
remote:        > [email protected] build /tmp/build_5d938f69de6d3c3cbf4ad96f7559dbb3
remote:        > webpack --colors --config ./webpack/prod.config.js
remote:
remote:        sh: 1: webpack: not found
remote:
remote:        npm ERR! Linux 3.13.0-91-generic
remote:        npm ERR! argv "/tmp/build_5d938f69de6d3c3cbf4ad96f7559dbb3/.heroku/node/bin/node" "/tmp/build_5d938f69de6d3c3cbf4ad96f7559dbb3/.heroku/node/bin/npm" "run" "build"
remote:        npm ERR! node v4.1.1
remote:        npm ERR! npm  v3.9.0
remote:        npm ERR! file sh
remote:        npm ERR! code ELIFECYCLE
remote:        npm ERR! errno ENOENT
remote:        npm ERR! syscall spawn
remote:        npm ERR! [email protected] build: `webpack --colors --config ./webpack/prod.config.js`
remote:        npm ERR! spawn ENOENT
remote:        npm ERR!
remote:        npm ERR! Failed at the [email protected] build script 'webpack --colors --config ./webpack/prod.config.js'.

removing example preset or making it optional

having racket generate a example app increases the setup time dramatically.

why not just generate the bare minimum?

  • the index route
  • the App and NotFound container
  • the html header component

typo

Rouer instead of Router on the docs

Removing bootstrap

Hi @mohebifar! Thank you for the repo! Is there a way or documentation to use this generator without the bootstrap part? I'd like to just use CSS Modules as much as possible?

Styles Load Late

First off thank you for the fantastic tool-set. After working with just about all of them I find yours the most succinct example available right now.

The one issue I've noticed is that there is a brief moment in the page lifecycle that the styles aren't loaded. I was wondering if you had any insight into that? Is this something a user would see in production or is this this just something we devs see because of the way webpack loads things.

I tried the template without bootstrap on the chance that it was due to that and the same thing happened.

Thanks in advance and again thanks for such a great tool kit.

When I run the CMD 'npm run dev' throw an err on terminal console

When I run the CMD 'npm run dev' throw an err on terminal console:

[1] to be executed: "node bin/server.js" [0] ==> Webpack development server listening on port 8080 [1] [webpack-isomorphic-tools] [error].development()method is now deprecated (for server-side instance only, not for webpack plugin instance) and has no effec t. Set up a properprocess.env.NODE_ENVvariable instead.

It always make the 'webpack-hot-middleware' bad. Is this a bug and how to resolve it?
This is my question, thx!

npm run build FAILED

When I run 'npm run build' , I get the next error.

C:\Projects\pruebas-react\racketApp\node_modules.bin\webpack:2
basedir=$(dirname "$(echo "$0" | sed -e 's,,/,g')")
^^^^^^
SyntaxError: missing ) after argument list
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:513:28)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.runMain (module.js:575:10)
at run (bootstrap_node.js:352:7)
at startup (bootstrap_node.js:144:9)
at bootstrap_node.js:467:3

Incompatibility with Windows 7

The command npm run build and thus yo racket as well fails on Win 7.

Here's the error:

C:\Users\Schlaus\Documents\racket\node_modules\.bin\webpack:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3

Looking at package.json it seems the C:\Users\Schlaus\Documents\racket\node_modules\.bin\webpack is run via node:

package.json, line 13
"build": "node ./node_modules/.bin/webpack --colors --config ./webpack/prod.config.js"

Is this intentional? Removing node from the start of the line makes the command work.

Besides that, scripts in package.json that use the syntax

NODE_ENV=production NODE_PATH=./src node ./bin/server.js

ie. define a variable at the start wont work on Win 7 without the cross-env package:

cross-env NODE_ENV=production NODE_PATH=./src node ./bin/server.js

Could you consider adding cross-env, or mention in the docs which steps need to be taken for Win 7 compatibility?

Exception running yo racket

I've just installed yo and generator-racket and I got "Cannot find module 'yeoman-environment'" error after I ran the yo racket.

I'm running it in a linux machine, node version 6.2.2, NPM version 3.10.3

$ yo racket
module.js:442
throw err;
^

Error: Cannot find module 'yeoman-environment'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object. (/usr/lib/node_modules/yo/lib/router.js:9:23)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)

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.