Remove dist/ directory

* Move dist/index.html to src/
* Move dist/tripleo_ui_config.js.samle to config/
* Use html webpack plugin to generate dist/index.html on build
* Update documentation

Reasons:

* The dist/ dir conflicts with Python builds in CI
* Semantically, having the two files in that directory doesn't make sense

Closes-bug: 1661261
Change-Id: I0904e9e5c2ced12865611fab21ee1f66d33d52bb
This commit is contained in:
Honza Pokorny 2017-02-02 10:12:11 -04:00
parent 319776bbba
commit 6f2ccc32c6
4 changed files with 17 additions and 6 deletions

View File

@ -104,11 +104,17 @@ Optionally start Karma to run tests after every change:
npm run test:watch
Copy ``dist/tripleo_ui_config.js.sample`` to ``dist/tripleo_ui_config.js``,
uncomment the lines pertaining to OpenStack services (``keystone``, ``tripleo``,
etc), and add the urls where these services can be accessed (in this case, the
IP address of the virt host). You can set values for the other services as well
to override the values coming from the keystone serviceCatalog.
Create the ``dist/`` directory, and copy ``config/tripleo_ui_config.js.sample``
to ``dist/tripleo_ui_config.js``. Uncomment the lines pertaining to OpenStack
services (``keystone``, ``tripleo``, etc), and add the urls where these services
can be accessed (in this case, the IP address of the virt host). You can set
values for the other services as well to override the values coming from the
keystone serviceCatalog.
::
mkdir dist
cp config/tripleo_ui_config.js.sample dist/tripleo_ui_config.js
To access the UI, navigate to ``http://localhost:3000/``

View File

@ -9,6 +9,5 @@
<body>
<div id="react-app-index"></div>
<script src="/tripleo_ui_config.js"></script>
<script src="/tripleo_ui.js"></script>
</body>
</html>

View File

@ -1,4 +1,5 @@
require('es6-promise').polyfill(); // https://github.com/webpack/css-loader/issues/144
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
devtool: 'inline-source-map',
@ -9,6 +10,11 @@ module.exports = {
filename: 'tripleo_ui.js',
sourceMapFilename: 'tripleo_ui.js.map'
},
plugins: [
new HtmlWebpackPlugin({
template: 'src/index.html'
})
],
module: {
loaders: [
// Javascript