GithubHelp home page GithubHelp logo

rwb's Introduction

don't use this -- use create react app instead!

rwb's People

Contributors

bobzoller avatar dtinth avatar eloop avatar heyhugo avatar jtemps avatar meyer avatar petehunt avatar petermoresi avatar winkler1 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rwb's Issues

Doesn't build on iojs 3.0 or node.js 4.0

contextify dependency will not build on iojs 3.3.0 or node 4.0. It builds ok with 0.12.7. There are errors from C++.

bash-3.2$ npm install -g git+https://github.com/petehunt/rwb
npm WARN peerDependencies The peer dependency babel-core@* included from babel-loader will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN deprecated [email protected]: Deprecated.

[email protected] install /usr/local/lib/node_modules/rwb/node_modules/webpack-require/node_modules/contextify
node-gyp rebuild

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

CXX(target) Release/obj.target/contextify/src/contextify.o
In file included from ../src/contextify.cc:3:
../node_modules/nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'
NAN_INLINE v8::Local NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:256:25: note: previous definition is here
NAN_INLINE v8::Local NanEnsureLocal(v8::Handle val) {
^
../node_modules/nan/nan.h:661:13: error: no member named 'smalloc' in namespace 'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../node_modules/nan/nan.h:672:12: error: no matching function for call to 'New'
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^~~~~~~~~~~~~~~~~
/Users/jenmoresi/.node-gyp/3.3.0/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'uint32_t' (aka 'unsigned int') to 'enum encoding' for 3rd argument
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/Users/jenmoresi/.node-gyp/3.3.0/include/node/node_buffer.h:43:40: note: candidate function not viable: 2nd argument ('const char ') would lose const qualifier
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate
isolate,
^
/Users/jenmoresi/.node-gyp/3.3.0/include/node/node_buffer.h:28:40: note: candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate, size_t length);
^
/Users/jenmoresi/.node-gyp/3.3.0/include/node/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
In file included from ../src/contextify.cc:3:
../node_modules/nan/nan.h:676:12: error: no viable conversion from 'v8::MaybeLocalv8::Object' to 'v8::Localv8::Object'
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::MaybeLocalv8::Object' to
'const v8::Localv8::Object &' for 1st argument
class Local {
^
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::MaybeLocalv8::Object' to
'v8::Localv8::Object &&' for 1st argument
class Local {
^
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:214:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
V8_INLINE Local(Local that)
^
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:327:13: note: candidate template ignored: could not match 'S ' against 'v8::MaybeLocalv8::Object'
V8_INLINE Local(S
that)
^
In file included from ../src/contextify.cc:3:
../node_modules/nan/nan.h:683:26: error: no member named 'Use' in namespace 'node::Buffer'
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
~~~~~~~~~~~~~~^
In file included from ../src/contextify.cc:1:
In file included from /Users/jenmoresi/.node-gyp/3.3.0/include/node/node.h:42:
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:221:5: error: assigning to 'v8::Primitive *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
(static_cast<T volatile
>(0)) = static_cast<S
>(0);
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:414:12: note: in instantiation of function template specialization 'v8::Localv8::Primitive::Localv8::Value' requested here
return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'

define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

                         ^

In file included from ../src/contextify.cc:1:
In file included from /Users/jenmoresi/.node-gyp/3.3.0/include/node/node.h:42:
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:221:5: error: assigning to 'v8::Boolean volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T
volatile_>(0)) = static_cast<S_>(0);
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:424:12: note: in instantiation of function template specialization 'v8::Localv8::Boolean::Localv8::Value' requested here
return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'

define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

                         ^

In file included from ../src/contextify.cc:1:
In file included from /Users/jenmoresi/.node-gyp/3.3.0/include/node/node.h:42:
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:221:5: error: assigning to 'v8::Function volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T
volatile_>(0)) = static_cast<S_>(0);
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1514:12: note: in instantiation of function template specialization 'v8::Localv8::Function::Localv8::Value' requested here
return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'

define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

                         ^

In file included from ../src/contextify.cc:1:
In file included from /Users/jenmoresi/.node-gyp/3.3.0/include/node/node.h:42:
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:221:5: error: assigning to 'v8::Object volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T
volatile_>(0)) = static_cast<S_>(0);
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1632:12: note: in instantiation of function template specialization 'v8::Localv8::Object::Localv8::Value' requested here
return NanEscapeScope(handle->Get(NanNew(key)).Asv8::Object());
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'

define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

                         ^

In file included from ../src/contextify.cc:1:
In file included from /Users/jenmoresi/.node-gyp/3.3.0/include/node/node.h:42:
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:221:5: error: assigning to 'v8::Value volatile' from incompatible type 'v8::Context *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T
volatile_>(0)) = static_cast<S_>(0);
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:267:10: note: in instantiation of function template specialization 'v8::Localv8::Value::Localv8::Context' requested here
return NanNew(val);
^
../src/contextify.cc:159:16: note: in instantiation of function template specialization '_NanEnsureLocalv8::Local<v8::Context >' requested here
return NanEscapeScope(NanNew(
^
../node_modules/nan/nan.h:398:43: note: expanded from macro 'NanEscapeScope'

define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

                                      ^

In file included from ../src/contextify.cc:1:
In file included from /Users/jenmoresi/.node-gyp/3.3.0/include/node/node.h:42:
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:221:5: error: assigning to 'v8::Context volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T
volatile_>(0)) = static_cast<S_>(0);
^ ~~~~~~~~~~~~~~~~~~
../src/contextify.cc:159:16: note: in instantiation of function template specialization 'v8::Localv8::Context::Localv8::Value' requested here
return NanEscapeScope(NanNew(
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'

define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

                         ^

In file included from ../src/contextify.cc:1:
In file included from /Users/jenmoresi/.node-gyp/3.3.0/include/node/node.h:42:
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:7070:3: error: assigning to 'v8::Integer volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T
volatile_>(0)) = static_cast<S_>(0);
^ ~~~~~~~~~~~~~~~~~~
../src/contextify.cc:211:13: note: in instantiation of function template specialization 'v8::ReturnValuev8::Integer::Setv8::Value' requested here
NanReturnValue(NanNew(None));
^
../node_modules/nan/nan.h:401:61: note: expanded from macro 'NanReturnValue'

define NanReturnValue(value) return args.GetReturnValue().Set(_NanEnsureLocal(value))

                                                        ^

In file included from ../src/contextify.cc:1:
In file included from /Users/jenmoresi/.node-gyp/3.3.0/include/node/node.h:42:
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:7070:3: error: assigning to 'v8::Boolean volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T
volatile_>(0)) = static_cast<S_>(0);
^ ~~~~~~~~~~~~~~~~~~
../src/contextify.cc:225:13: note: in instantiation of function template specialization 'v8::ReturnValuev8::Boolean::Setv8::Value' requested here
NanReturnValue(NanNew(false));
^
../node_modules/nan/nan.h:401:61: note: expanded from macro 'NanReturnValue'

define NanReturnValue(value) return args.GetReturnValue().Set(_NanEnsureLocal(value))

                                                        ^

In file included from ../src/contextify.cc:1:
In file included from /Users/jenmoresi/.node-gyp/3.3.0/include/node/node.h:42:
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:7070:3: error: assigning to 'v8::Array volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/jenmoresi/.node-gyp/3.3.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T
volatile_>(0)) = static_cast<S_>(0);
^ ~~~~~~~~~~~~~~~~~~
../src/contextify.cc:236:13: note: in instantiation of function template specialization 'v8::ReturnValuev8::Array::Setv8::Value' requested here
NanReturnValue(blank);
^
../node_modules/nan/nan.h:401:61: note: expanded from macro 'NanReturnValue'

define NanReturnValue(value) return args.GetReturnValue().Set(_NanEnsureLocal(value))

                                                        ^

14 errors generated.
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "/usr/local/bin/iojs" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/rwb/node_modules/webpack-require/node_modules/contextify
gyp ERR! node -v v3.3.0
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok

rwb static writes bundle.js and styles.css to system root directory

Running rwb static I'm getting an access error on /bundle.js. Is

~/p/Test> rwb static
The unused option is deprecated. Please use options.discardUnused instead.
The urls option is deprecated. Please use options.normalizeUrl instead.
The idents option is deprecated. Please use options.mergeIdents instead.
The idents option is deprecated. Please use options.reduceIdents instead.
{ [Error: EACCES, open '/bundle.js'] errno: -13, code: 'EACCES', path: '/bundle.js' }

I ran it again as sudo. The bundle.js and styles.css were both created in the root directory.

rwb static error

When running rwb static there is an error: Invariant Violation: You do not have a loader that handles files with the extension: json.

testing recommendation

I think it'd be cool to have some sort of recommendation around testing. Since the build tool bullshit lives in rwb, it seems we could benefit from a bit of coordination to reuse it all for tests.

As a concrete example, here's what I've started within my own rwb project. I like enzyme and mocha, and I like fast tests so I opted for the node flavor rather than karma, etc. But this means I need to babel myself, stub out webpack CSS requires (which is naive and will certainly break), and generally do things that follow a different flow than my production code will.

install deps

$ npm install --save-dev mocha chai enzyme chai-enzyme

package.json

[..snip..]
"scripts": {
  "test": "mocha -r babel-core/register -r ./mocha-compilers *.test.js"
}
[..snip..]

mocha-compilers.js

function noop() {
  return {};
}

require.extensions['.css'] = noop;

MyComponent.test.js

import React from 'react';
import chai, {expect} from 'chai';
import chaiEnzyme from 'chai-enzyme';
chai.use(chaiEnzyme());
import {shallow} from 'enzyme';

import MyComponent from './MyComponent';

describe('<MyComponent />', () => {
  it('renders hello world', () => {
    const wrapper = shallow(<MyComponent />);
    expect(wrapper).to.have.text('Hello, world!');
  });
});

Thoughts on how we could make this better? I'm happy to work on a PR once there's a plan.

React 0.14?

Howdy!

Really dig the project, but I was wondering if there's any particular reason why you're defaulting to React v0.13?

I'd be happy to make (and test) a PR to update this if it's welcome ๐Ÿ˜บ

โœŒ๏ธ

CORS

Hello. Thank you for this great way to build React projects. ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

I'm using Cloud9, so I tried:

RWB_PORT=$PORT RWB_PUBLIC_URL=http://$IP/ rwb serve

Then I received this error in console:

XMLHttpRequest cannot load http://dev-hnordt.c9.io/fd659a8394f48eb37284.hot-update.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://dev-hnordt.c9.io:8080' is therefore not allowed access.

Would be great to have CORS enabled.

Does not work out of the box for me

Heyo, just set this up and was super excited to hack out a few components on this but it looks like I'm getting an exception at first run.

VM579:1 Uncaught TypeError: ReactHotAPI is not a function

Any ideas here?

Babel 6 support?

Is there a way to get Babel 6 presets like es2015 and stage-0 working?

I could have sworn I had it working recently but can't figure it out now...

Cannot find module myapp/init

Should this be installed with -g? The 4-line example mkdir/init does not mention. Getting this error--

$ md myapp
~/repos/myapp
$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
...
Is this ok? (yes) 

~/repos/myapp
$ npm install -g react-cli
npm WARN deprecated [email protected]: react-tools is deprecated. For more information, visit https://fb.me/react-tools-deprecated
/usr/local/bin/react-cli -> /usr/local/lib/node_modules/react-cli/bin/react
[email protected] /usr/local/lib/node_modules/react-cli
โ”œโ”€โ”€ [email protected] ([email protected])
โ”œโ”€โ”€ [email protected] ([email protected])
โ””โ”€โ”€ [email protected] ([email protected])
~/repos/myapp
$ react-cli init
module.js:338
    throw err;
          ^
Error: Cannot find module '/Users/Jeff/repos/myapp/init'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.module.exports.render (/usr/local/lib/node_modules/react-cli/lib/facade.js:9:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/react-cli/bin/react:14:20)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

Error when used with ParseReact

I'm having some trouble using it with ParseReact (building a larger app). After running rwb static I'm getting this error:

/Users/jaredpalmer/workspace/github/shellypalmer/blah/node_modules/parse/lib/browser/StorageController.browser.js:24
    return localStorage.getItem(path);
           ^
ReferenceError: localStorage is not defined
    at Object.e.exports.getItem (/Users/jaredpalmer/workspace/github/shellypalmer/blah/node_modules/parse/lib/browser/StorageController.browser.js:24:12)
    at Object.e.exports.getItemAsync (/Users/jaredpalmer/workspace/github/shellypalmer/blah/node_modules/parse/lib/browser/Storage.js:43:52)
    at Object.e.exports.currentInstallationId (/Users/jaredpalmer/workspace/github/shellypalmer/blah/node_modules/parse/lib/browser/InstallationController.js:44:33)
    at Object.v.request (/Users/jaredpalmer/workspace/github/shellypalmer/blah/node_modules/parse/lib/browser/RESTController.js:176:35)
    at Object.u.default.setQueryController.find (/Users/jaredpalmer/workspace/github/shellypalmer/blah/node_modules/parse/lib/browser/ParseQuery.js:1138:27)
    at e.o.value (/Users/jaredpalmer/workspace/github/shellypalmer/blah/node_modules/parse/lib/browser/ParseQuery.js:289:25)
    at e.s.value (/Users/jaredpalmer/workspace/github/shellypalmer/blah/node_modules/parse-react/lib/browser/Subscription.js:145:26)
    at new e (/Users/jaredpalmer/workspace/github/shellypalmer/blah/node_modules/parse-react/lib/browser/Subscription.js:94:10)
    at Object.r [as subscribeToQuery] (/Users/jaredpalmer/workspace/github/shellypalmer/blah/node_modules/parse-react/lib/browser/SubscriptionManager.js:47:20)
    at e.p.subscribe (/Users/jaredpalmer/workspace/github/shellypalmer/blah/node_modules/parse-react/lib/browser/ParsePatches.js:53:32)

This project is awesome btw.

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.