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
34 changes: 34 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "react-playlist",
"version": "1.0.0",
"description": "All the course files for the Net Ninja React tutorial playlist on YouTube",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npm run build",
"build": "webpack -d && webpack-dev-server --content-base src/ --inline --hot --port 1234 --history-api-fallback"
},
"repository": {
"type": "git",
"url": "git+https://github.com/rpcvjet/react-playlist.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/rpcvjet/react-playlist/issues"
},
"homepage": "https://github.com/rpcvjet/react-playlist#readme",
"dependencies": {
"react": "^15.5.3",
"react-dom": "^15.5.3"
},
"devDependencies": {
"babel-core": "^6.24.1",
"babel-loader": "^6.4.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"webpack": "^2.3.3",
"webpack-dev-server": "^2.4.2"
}
}
3 changes: 3 additions & 0 deletions src/app/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use strict';

alert('it works');
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<title>React - Novice to Ninja!</title>
</head>
<body>

<script src="/app/bundle.js" charset="utf-8"></script>
</body>
</html>
29 changes: 29 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'use strict';

var path = require('path');

module.exports = {

entry: path.resolve(__dirname, 'src') + '/app/index.js',
output: {
path: path.resolve(__dirname, 'dist') + '/app',
filename: 'bundle.js',
publicPath: '/app/'
},
module: {
loaders: [
{
test: /\.js$/,
include: path.resolve(__dirname, 'src'),
loader: 'babel-loader',
query: {
presets: ['react', 'es2015']
}
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
}
]
}
};