Skip to content

Commit

Permalink
Fixed app routing
Browse files Browse the repository at this point in the history
  • Loading branch information
antongunov committed Oct 11, 2017
1 parent 02de021 commit 34a2e03
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 23 deletions.
8 changes: 6 additions & 2 deletions assets/sass/layout/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
width: 100%;
text-align: center;

&__title {
margin-bottom: 3rem;
&__app {

}

&__button {

}

&__title {
margin-bottom: 3rem;
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
},
"license": "MIT",
"scripts": {
"app": "mkdir build/app && mv build/app.html build/app/index.html",
"build": "npm run static && webpack --progress --hide-modules",
"clean": "rm -rf build && mkdir build",
"sass": "node-sass --include-path node_modules/ assets/sass/main.scss | postcss -o build/assets/css/main.css",
"start": "npm run build && static build",
"static": "npm run clean && npm run public && npm run fonts && npm run pug && npm run sass",
"static": "npm run clean && npm run public && npm run fonts && npm run pug && npm run sass && npm run app",
"dev": "npm run static && webpack-dev-server --inline --hot",
"fonts": "mkdir -p build/assets/fonts/ && cp -r node_modules/font-awesome/fonts/* build/assets/fonts/",
"public": "cp -r public/* build/",
Expand Down
9 changes: 8 additions & 1 deletion pages/app.pug
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@ block head
script(src="/assets/js/main.js" defer)

block body
#app
.page
.page__wrapper
header.page__header.header
main.page__content.main
.main__app
#app
footer.page__footer.footer
+coded-with-love-by("Anton G.", "https://github.com/antongunov")
14 changes: 0 additions & 14 deletions public/app/index.html

This file was deleted.

6 changes: 1 addition & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ module.exports = {
},
devServer: {
contentBase: resolve('build/'),
historyApiFallback: {
rewrites: [
{ from: /^\/app/, to: '/app.html' },
]
},
historyApiFallback: true,
},
};

0 comments on commit 34a2e03

Please sign in to comment.