Skip to content

Commit

Permalink
Set up devDependencies and dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
KamonLeigh committed Mar 15, 2018
1 parent df7542d commit 6362117
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 18 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
node_modules/
public/bundle.js
public/bundle.js.map
public/styles.css
public/styles.css.map
public/dist/
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
"author": "Byron ",
"license": "MIT",
"scripts": {
"serve": "live-server public/",
"build:dev": "webpack",
"build:prod": "webpack -p --env production",
"dev-server": "webpack-dev-server",
"test": "jest --config=jest.config.json",
"start":"node server/server.js",
"heroku-postbuild":"yarn run build:prod"
"start": "node server/server.js",
"heroku-postbuild": "yarn run build:prod"
},
"dependencies": {
"babel-cli": "6.24.1",
Expand All @@ -22,13 +21,9 @@
"babel-preset-env": "1.5.2",
"babel-preset-react": "6.24.1",
"css-loader": "0.28.4",
"enzyme": "3.0.0",
"enzyme-adapter-react-16": "1.0.0",
"enzyme-to-json": "3.0.1",
"express": "4.15.4",
"extract-text-webpack-plugin": "3.0.0",
"jest": "20.0.4",
"live-server": "^1.2.0",
"moment": "2.18.1",
"node-sass": "4.5.3",
"normalize.css": "7.0.0",
Expand All @@ -40,13 +35,18 @@
"react-modal": "2.2.2",
"react-redux": "5.0.5",
"react-router-dom": "4.2.2",
"react-test-renderer": "16.0.0",
"redux": "3.7.2",
"sass-loader": "^6.0.6",
"style-loader": "0.18.2",
"uuid": "3.1.0",
"validator": "8.0.0",
"webpack": "3.1.0",
"webpack": "3.1.0"
},
"devDependencies": {
"enzyme-to-json": "3.0.1",
"enzyme": "3.0.0",
"jest": "20.0.4",
"react-test-renderer": "16.0.0",
"webpack-dev-server": "2.5.1"
}
}
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title></title>
<link rel="icon" type="image/png" href="/img/favicon.png">
<link rel="stylesheet" type="text/css" href="/styles.css">
<link rel="stylesheet" type="text/css" href="/dist/styles.css">
</head>
<body>
<div id="app"></div>
<script src="/bundle.js"></script>
<script src="/dist/bundle.js"></script>
</body>
</html>
5 changes: 3 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = (env) => {
return {
entry: './src/app.js',
output:{
path: path.join(__dirname, 'public'),
path: path.join(__dirname, 'public', 'dist'),
filename:'bundle.js'
},
module:{
Expand Down Expand Up @@ -43,7 +43,8 @@ module.exports = (env) => {
devtool: isProduction ? 'source-map' : 'inline-source-map',
devServer: {
contentBase: path.join(__dirname, 'public'),
historyApiFallback: true
historyApiFallback: true,
publicPath: '/dist/'
}
};
}
Expand Down
16 changes: 15 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"

ansi-styles@^3.0.0:
ansi-styles@^3.0.0, ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
dependencies:
Expand Down Expand Up @@ -1226,6 +1226,14 @@ chalk@^2.3.1:
escape-string-regexp "^1.0.5"
supports-color "^5.2.0"

chalk@^2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65"
dependencies:
ansi-styles "^3.2.1"
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"

cheerio@^1.0.0-rc.2:
version "1.0.0-rc.2"
resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db"
Expand Down Expand Up @@ -5581,6 +5589,12 @@ supports-color@^5.2.0:
dependencies:
has-flag "^3.0.0"

supports-color@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0"
dependencies:
has-flag "^3.0.0"

svgo@^0.7.0:
version "0.7.2"
resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5"
Expand Down

0 comments on commit 6362117

Please sign in to comment.