mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-24 13:29:01 -05:00
changed demo to serve without sub-directory
This commit is contained in:
parent
50cf171c8a
commit
823bbc0b5f
3 changed files with 21 additions and 14 deletions
|
@ -20,7 +20,7 @@ which will install the required build dependencies, then run
|
||||||
|
|
||||||
npm run dev
|
npm run dev
|
||||||
|
|
||||||
which will run the development server and opens `http://localhost:8000/demo/index.html` in your browser. Any changes you make to the source will automatically rebuild and reload the page.
|
which will run the development server and opens `http://localhost:8000/` in your browser. Any changes you make to the source will automatically rebuild and reload the page.
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
|
|
|
@ -12,21 +12,21 @@
|
||||||
|
|
||||||
<title>Matter.js Demo</title>
|
<title>Matter.js Demo</title>
|
||||||
|
|
||||||
<!-- libs -->
|
<!-- Libs -->
|
||||||
<script type="text/javascript" src="/demo/lib/decomp.js"></script>
|
<script type="text/javascript" src="./lib/decomp.js"></script>
|
||||||
<script type="text/javascript" src="/demo/lib/pathseg.js"></script>
|
<script type="text/javascript" src="./lib/pathseg.js"></script>
|
||||||
|
|
||||||
<!-- Matter -->
|
<!-- Matter -->
|
||||||
<script src="../build/matter.js"></script>
|
<script src="../build/matter.js"></script>
|
||||||
|
|
||||||
<!-- MatterTools -->
|
<!-- MatterTools -->
|
||||||
<script src="//code.jquery.com/jquery-3.1.1.js"></script>
|
<script src="https://code.jquery.com/jquery-3.1.1.js"></script>
|
||||||
<script src="/demo/lib/matter-tools.gui.js"></script>
|
<script src="./lib/matter-tools.gui.js"></script>
|
||||||
<script src="/demo/lib/matter-tools.inspector.js"></script>
|
<script src="./lib/matter-tools.inspector.js"></script>
|
||||||
<script src="/demo/lib/matter-tools.demo.js"></script>
|
<script src="./lib/matter-tools.demo.js"></script>
|
||||||
|
|
||||||
<!-- Plugins -->
|
<!-- Plugins -->
|
||||||
<script src="/demo/lib/matter-wrap.js"></script>
|
<script src="./lib/matter-wrap.js"></script>
|
||||||
|
|
||||||
<!-- Examples -->
|
<!-- Examples -->
|
||||||
<script src="../examples/airFriction.js"></script>
|
<script src="../examples/airFriction.js"></script>
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
<script src="../examples/timescale.js"></script>
|
<script src="../examples/timescale.js"></script>
|
||||||
<script src="../examples/views.js"></script>
|
<script src="../examples/views.js"></script>
|
||||||
<script src="../examples/wreckingBall.js"></script>
|
<script src="../examples/wreckingBall.js"></script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@ -85,6 +85,6 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="/demo/js/Demo.js"></script>
|
<script src="./js/Demo.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -49,15 +49,22 @@ module.exports = (env = {}) => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
devServer: {
|
devServer: {
|
||||||
contentBase: __dirname,
|
contentBase: [
|
||||||
|
path.resolve(__dirname, './demo'),
|
||||||
|
path.resolve(__dirname, './examples')
|
||||||
|
],
|
||||||
open: true,
|
open: true,
|
||||||
openPage: 'demo/index.html',
|
openPage: '',
|
||||||
compress: true,
|
compress: true,
|
||||||
port: 8000,
|
port: 8000,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/build': {
|
'/build': {
|
||||||
target: 'http://localhost:8000/',
|
target: 'http://localhost:8000/',
|
||||||
pathRewrite: { '^/build' : '/' }
|
pathRewrite: { '^/build' : '/' }
|
||||||
|
},
|
||||||
|
'/examples': {
|
||||||
|
target: 'http://localhost:8000/',
|
||||||
|
pathRewrite: { '^/examples' : '/' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue