Skip to content

Commit

Permalink
Setting up webpack, eslint, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
nacmartin committed Dec 2, 2017
1 parent ec31b11 commit 1179ed8
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "react-app",
"rules": {
"jsx-a11y/href-no-hash": 0
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ yarn.lock
.nyc_output/
coverage/
package-lock.json
public/
25 changes: 24 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,28 @@
"main": "src/index.js",
"author": "Victoria Quirante & Nacho Martin",
"license": "MIT",
"private": false
"private": false,
"scripts": {
"watch": "webpack --progress --watch",
"start": "webpack-dev-server --open",
"build": "webpack"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.3",
"babel-loader": "^7.1.2",
"clean-webpack-plugin": "^0.1.17",
"eslint": "^4.12.1",
"eslint-config-react-app": "^2.0.1",
"eslint-plugin-flowtype": "^2.39.1",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.5.1",
"html-webpack-plugin": "^2.30.1",
"webpack": "^3.9.1",
"webpack-dev-server": "^2.9.5"
},
"dependencies": {
"pixi.js": "^4.6.2"
}
}
11 changes: 11 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const map = `
******************
*................*
*................*
*................*
*................*
*................*
******************
`;

console.log(map);
31 changes: 31 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const path = require("path");
const CleanWebpackPlugin = require("clean-webpack-plugin");
const HtmlWebpackPlugin = require('html-webpack-plugin');

var config = {
entry: "./src/index.js",
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "./public")
},
devServer: {
contentBase: "./dist"
},
plugins: [
new CleanWebpackPlugin(["public"]),
new HtmlWebpackPlugin({
title: "Scavenger"
})
],
module: {
loaders: [
{
test: /\.jsx?/,
loaders: ["babel-loader"],
exclude: /node_modules/
}
]
}
};

module.exports = config;

0 comments on commit 1179ed8

Please sign in to comment.