Skip to content

Commit

Permalink
Added easy gh pages deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
EloB committed May 19, 2016
1 parent 43c6c3c commit 1edc8fd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules/
dist/
build/
npm-debug.log
.DS_Store
.DS_Store
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"private": true,
"scripts": {
"start": "NODE_ENV=development webpack-dev-server --hot --inline",
"clean": "rimraf dist/",
"clean": "rimraf build",
"build": "NODE_ENV=production webpack --optimize-minimize",
"serve": "serve dist/"
"serve": "serve build",
"deploy": "gh-pages -d build"
},
"devDependencies": {
"autoprefixer": "^6.3.6",
Expand All @@ -17,6 +18,7 @@
"babel-preset-stage-0": "^6.5.0",
"css-loader": "^0.23.1",
"extract-text-webpack-plugin": "^1.0.1",
"gh-pages": "^0.11.0",
"html-webpack-plugin": "^2.17.0",
"html-webpack-template": "^5.0.0",
"material-ui": "^0.15.0",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ addEventListener('load', () => {
<h1>{framework}</h1>
<ul>
{components.map((component, index) => (
<li key={component}><a href={`/${framework}/${component}.html`}>{component}</a></li>
<li key={component}><a href={`${framework}/${component}.html`}>{component}</a></li>
))}
</ul>
</div>
Expand All @@ -22,4 +22,4 @@ addEventListener('load', () => {
),
document.getElementById('container')
)
}, false);
}, false);
7 changes: 3 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ module.exports = {
index: './src/index'
}),
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js',
publicPath: '/'
path: path.join(__dirname, 'build'),
filename: 'dist/[name].js'
},
module: {
loaders: [
Expand Down Expand Up @@ -55,7 +54,7 @@ module.exports = {
template: require('html-webpack-template'),
appMountId: 'container'
}),
new ExtractTextPlugin('[name].css', { allChunks: true }),
new ExtractTextPlugin('dist/[name].css', { allChunks: true }),
new webpack.DefinePlugin({
process: {
env: {
Expand Down

0 comments on commit 1edc8fd

Please sign in to comment.