Remove webpack-dev-server
Severe security problems, and it is not needed since it only is used locally. Here, it is replaced by a watch script, and relative paths to assets and resources so that index.html can be viewed directly in the browser instead of via a dev server. Also, some minor production preparing stuffs (hiding elements not yet ready) and some ugly white space inconsistecy fixes.
This commit is contained in:
parent
79bbf9188c
commit
7677570ad2
6 changed files with 2374 additions and 700 deletions
|
|
@ -2,12 +2,12 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<link rel="stylesheet" href="/assets/style.css">
|
<link rel="stylesheet" href="assets/style.css">
|
||||||
<title>🤘 Brütal Legend 🤘</title>
|
<title>🤘 Brütal Legend 🤘</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="brutal"></div>
|
<div id="brutal"></div>
|
||||||
<footer>av <a href="http://madr.se" rel="author">madr</a> 2018</footer>
|
<footer>av <a href="http://madr.se" rel="author">madr</a> 2018</footer>
|
||||||
</body>
|
</body>
|
||||||
<script src="/bundle.js"></script>
|
<script src="bundle.js"></script>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
3052
package-lock.json
generated
3052
package-lock.json
generated
File diff suppressed because it is too large
Load diff
12
package.json
12
package.json
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "redux-simple-starter",
|
"name": "brutal-legend",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Simple starter package for Redux with React and Babel support",
|
"description": "React+Redux app",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"repository": "git@github.com:StephenGrider/ReduxSimpleStarter.git",
|
"repository": "git@github.com:StephenGrider/ReduxSimpleStarter.git",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js",
|
"build": "webpack -p --define process.env.NODE_ENV='\"production\"' --progress --colors",
|
||||||
"build": "webpack -p --define process.env.NODE_ENV='\"production\"' --progress --colors"
|
"watch": "webpack -p --define process.env.NODE_ENV='\"production\"' --watch --progress --colors"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|
@ -16,12 +16,12 @@
|
||||||
"babel-preset-es2015": "^6.1.18",
|
"babel-preset-es2015": "^6.1.18",
|
||||||
"babel-preset-react": "^6.1.18",
|
"babel-preset-react": "^6.1.18",
|
||||||
"webpack": "^1.12.9",
|
"webpack": "^1.12.9",
|
||||||
"webpack-dev-server": "^1.14.0"
|
"webpack-cli": "^3.2.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"babel-preset-stage-1": "^6.1.18",
|
"babel-preset-stage-1": "^6.1.18",
|
||||||
"react": "16.3.2",
|
"react": "16.3.2",
|
||||||
"react-dom": "16.3.2",
|
"react-dom": ">=16.3.3",
|
||||||
"react-redux": "5.0.7",
|
"react-redux": "5.0.7",
|
||||||
"redux": "4.0.0"
|
"redux": "4.0.0"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ export default class Album extends Component {
|
||||||
img,
|
img,
|
||||||
purchased_on,
|
purchased_on,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const imagePath = `/assets/covers/${img}`;
|
const imagePath = `assets/covers/${img}`;
|
||||||
const song = songs.join(', ');
|
const song = songs.join(', ');
|
||||||
return (
|
return (
|
||||||
<article>
|
<article>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ export default class SortSelect extends Component {
|
||||||
render() {
|
render() {
|
||||||
const { value, handleOnChange } = this.props;
|
const { value, handleOnChange } = this.props;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div hidden>
|
||||||
<label htmlFor="sortBy">Sortera efter</label>
|
<label htmlFor="sortBy">Sortera efter</label>
|
||||||
<select
|
<select
|
||||||
id="sortBy"
|
id="sortBy"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import {SET_SORT_KEY} from '../actions';
|
import { SET_SORT_KEY } from '../actions';
|
||||||
|
|
||||||
export default (state = 'id', action) => {
|
export default (state = 'id', action) => {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue