Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"plugins": ["syntax-jsx"],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can format

{
  plugins: ['syntax-jsx'],
  presets: ['es2015', 'react', 'babel-preset-stage-0']
}

"presets": ["es2015", "react", "babel-preset-stage-0"]
}
20 changes: 13 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
"aframe-bmfont-text-component": "^0.1.4",
"aframe-react": "^3.4.0",
"aframe-text-component": "^0.3.0",
"babel-polyfill": "^6.3.14"
"graceful-fs": "^4.1.10",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's graceful/lodash/minimatch for?

"lodash": "^4.16.5",
"minimatch": "^3.0.3",
"react": "^15.3.2",
"react-dom": "^15.3.2"
},
"scripts": {
"build": "webpack",
Expand Down Expand Up @@ -37,16 +41,18 @@
"homepage": "https://github.com/ngokevin/aframe-react-boilerplate#readme",
"devDependencies": {
"babel": "^6.3.13",
"babel-core": "^6.3.15",
"babel-loader": "^6.2.0",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babel-preset-stage-0": "^6.3.13",
"babel-core": "^6.18.2",
"babel-loader": "^6.2.7",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-polyfill": "^6.16.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-0": "^6.16.0",
"babel-runtime": "^6.3.13",
"css-loader": "^0.23.0",
"json-loader": "^0.5.4",
"style-loader": "^0.13.0",
"webpack": "^1.12.9",
"webpack": "^1.13.3",
"webpack-dev-server": "^1.14.0"
}
}
4 changes: 1 addition & 3 deletions src/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ class VRScene extends React.Component {
return (
<Scene>
<Camera>
<a-cursor
animation__click="property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150"
>
<a-cursor animation__click="property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150">
</a-cursor>
</Camera>

Expand Down
25 changes: 14 additions & 11 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ require('babel-polyfill');

var IS_PRODUCTION = process.env.NODE_ENV === 'production';

var ENTRY_POINTS = [
'./src/js/app'
];
var BUILD_DIR = path.resolve(__dirname, 'build');

var JS_LOADERS = [
'babel?cacheDirectory&presets[]=react,presets[]=es2015,presets[]=stage-0'
];
var APP_DIR = path.resolve(__dirname, 'src/js');

// var JS_LOADERS = [
// 'babel?cacheDirectory&presets[]=react,presets[]=es2015,presets[]=stage-0'
// ];

var PLUGINS = [];
if (IS_PRODUCTION) {
Expand All @@ -26,12 +26,12 @@ if (IS_PRODUCTION) {
}

module.exports = {
entry: ENTRY_POINTS,
entry: APP_DIR + '/app.js',
output: {
// Bundle will be served at /bundle.js locally.
filename: 'bundle.js',
// Bundle will be built at ./src/media/js.
path: './build',
// Bundle will be built at ./build.
path: BUILD_DIR,
publicPath: '/',
},
module: {
Expand All @@ -42,7 +42,9 @@ module.exports = {
{
// JS.
exclude: /(node_modules|bower_components)/,
loaders: JS_LOADERS,
// loaders: JS_LOADERS,
include: APP_DIR,
loader: 'babel-loader',
test: /\.js$/,
},
{
Expand All @@ -57,14 +59,15 @@ module.exports = {
},
plugins: PLUGINS,
resolve: {
extensions: ['', '.js', '.json'],
extensions: ['', '.js', '.jsx', '.json'],
fallback: path.join(__dirname, 'node_modules'),
modulesDirectories: [
'src/js',
'node_modules',
]
},
resolveLoader: {
root: path.join(__dirname, 'node_modules'),
fallback: [path.join(__dirname, 'node_modules')]
}
};