Skip to content

Commit

Permalink
Update site builder
Browse files Browse the repository at this point in the history
Summary: Closes #905

Differential Revision: D3011398

Pulled By: steveluscher

fb-gh-sync-id: b096f497e09b829c612c08344e40755b4a037918
shipit-source-id: b096f497e09b829c612c08344e40755b4a037918
  • Loading branch information
Steven Luscher authored and Facebook Github Bot 6 committed Mar 4, 2016
1 parent 191bd3c commit 912fadb
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 15 deletions.
9 changes: 5 additions & 4 deletions website-prototyping-tools/RelayPlayground.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ import 'codemirror/mode/javascript/javascript';

import Codemirror from 'react-codemirror';
import React from 'react';
import ReactDOM from 'react/lib/ReactDOM';
import ReactChildren from 'react-children';
import ReactDOM from 'react-dom';
import Relay from 'react-relay'; window.Relay = Relay;
import RelayLocalSchema from 'relay-local-schema';

import babel from 'babel-core/browser';
import babelRelayPlaygroundPlugin from './babelRelayPlaygroundPlugin';
import debounce from 'lodash.debounce';
import defer from 'lodash.defer';
import errorCatcher from 'babel-plugin-react-error-catcher/error-catcher';
import errorCatcherPlugin from 'babel-plugin-react-error-catcher';
import evalSchema from './evalSchema';
import getBabelRelayPlugin from 'babel-relay-plugin';
import {transform} from 'babel-core';
import {introspectionQuery} from 'graphql/utilities';
import {graphql} from 'graphql';

Expand Down Expand Up @@ -96,7 +97,7 @@ class PlaygroundRenderer extends React.Component {
} catch (e) {}
}
_update = () => {
ReactDOM.render(React.Children.only(this.props.children), this._container);
ReactDOM.render(ReactChildren.only(this.props.children), this._container);
}
render() {
return <div ref="mountPoint" />;
Expand Down Expand Up @@ -216,7 +217,7 @@ export default class RelayPlayground extends React.Component {
}
};
try {
var {code} = babel.transform(appSource, {
var {code} = transform(appSource, {
filename: 'RelayPlayground',
plugins : [
babelRelayPlaygroundPlugin,
Expand Down
4 changes: 2 additions & 2 deletions website-prototyping-tools/evalSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/* eslint-disable no-unused-vars, no-eval */

import babel from 'babel-core/browser';
import {transform} from 'babel-core';

var GraphQL = require('graphql');
var GraphQLRelay = require('graphql-relay');
Expand All @@ -24,6 +24,6 @@ export default function(source) {
default: throw new Error(`Cannot find module "${path}"`);
}
}
var {code} = babel.transform(source, {code: true, ast: false});
var {code} = transform(source, {ast: false, code: true});
return eval(code);
}
2 changes: 1 addition & 1 deletion website-prototyping-tools/graphiql.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'graphiql/graphiql.css';

import GraphiQL from 'graphiql';
import React from 'react'; window.React = React;
import ReactDOM from 'react/lib/ReactDOM';
import ReactDOM from 'react-dom';

import evalSchema from './evalSchema';
import queryString from 'querystring';
Expand Down
17 changes: 10 additions & 7 deletions website-prototyping-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"license": "BSD-3-Clause",
"dependencies": {
"autoprefixer-loader": "3.1.0",
"babel": "5.8.23",
"babel-core": "5.8.25",
"babel-loader": "5.3.2",
"babel-plugin-react-error-catcher": "1.1.9",
"babel-core": "^5.8.35",
"babel-loader": "^5.4.0",
"babel-plugin-react-error-catcher": "^1.1.11",
"babel-relay-plugin": "../scripts/babel-relay-plugin",
"codemirror": "5.6.0",
"css-loader": "0.16.0",
"fbjs": "^0.7.2",
"file-loader": "0.8.4",
"graphiql": "0.1.3",
"graphql": "0.4.13",
Expand All @@ -27,12 +27,15 @@
"normalize.css": "3.0.3",
"querystring": "0.2.0",
"raw-loader": "0.5.1",
"react": "^0.14.0-rc",
"react": "^0.14.7",
"react-children": "0.0.3",
"react-codemirror": "0.1.5",
"relay-local-schema": "0.3.0",
"react-dom": "^0.14.7",
"react-relay": "../",
"react-universal": "0.0.3",
"relay-local-schema": "0.3.0",
"style-loader": "0.12.3",
"webpack": "1.12.0"
"webpack": "^1.12.14"
},
"scripts": {
"start": "webpack --watch --progress --colors",
Expand Down
2 changes: 1 addition & 1 deletion website-prototyping-tools/playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import 'babel/polyfill';

import React from 'react'; window.React = React;
import ReactDOM from 'react/lib/ReactDOM';
import ReactDOM from 'react-dom';
import RelayPlayground from './RelayPlayground';

import filterObject from 'fbjs/lib/filterObject';
Expand Down
5 changes: 5 additions & 0 deletions website-prototyping-tools/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ module.exports = {
},
],
},
node: {
fs: 'empty',
module: 'empty',
net: 'empty',
},
output: {
path: path.resolve(__dirname, '../website', BUILD_DIR, 'relay/prototyping'),
filename: '[name].js',
Expand Down

0 comments on commit 912fadb

Please sign in to comment.