Skip to content

Commit

Permalink
[#26] Set build paths to clojure defaults (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonase committed Feb 7, 2016
1 parent 026bf55 commit 4ad5eeb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 49 deletions.
44 changes: 10 additions & 34 deletions backend/resources/org/akvo/dash/public/index.html
@@ -1,36 +1,12 @@
<!DOCTYPE html>
<html lang="en" class="welcome">
<head>
<title>Welcome to Duct</title>
<link rel="stylesheet" href="/assets/normalize.css/normalize.css">
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
<h1>Welcome to <span class="outer"><span class="inner">Duct</span></span></h1>
<div class="intro">
<p>Congratulations! Your project <span class="project-name">backend</span> is
ready and running.</p>
<p>This is a static welcome page located at <code>resources/backend/index.html</code>
in the project directory. Remove or replace it when you start developing.
If you remove the index page entirely, be sure to change the <code>:aliases</code>
map in <code>backend.system/base-config</code>.
</div>
<div class="profiles">
<h2>Template profiles used:</h2>
<dl>
<dt>+example</dt>
<dd>Adds an example endpoint at <a href="/example">/example</a>.</dd>
<dt>+postgres</dt>
<dd>Adds a PostgreSQL dependency and database component. The database used for
development defaults to <code>postgres</code> on <code>localhost</code>.</dd>
<dt>+ragtime</dt>
<dd>Adds Ragtime migrations. Use <code>(migrate)</code> and <code>(rollback)</code>
in the REPL. Migrations are stored in <code>resources/backend/migrations</code>.
</dd>
<dt>+site</dt>
<dd>Adds middleware and configuration suited for a user-facing website.</dd>
</dl>
</div>

</body>
<html>
<head>
<meta charset="utf-8"/>
<title>Akvo DASH</title>
<base href="/"/>
</head>
<body>
<div id="root"></div>
<script type="text/javascript" src="build/bundle.js"></script>
</body>
</html>
12 changes: 0 additions & 12 deletions client/index.html

This file was deleted.

3 changes: 3 additions & 0 deletions client/server.js
Expand Up @@ -2,7 +2,10 @@ var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');

const contentBase = __dirname.substring(0, __dirname.lastIndexOf('/')) + '/backend/resources/org/akvo/dash/public'

new WebpackDevServer(webpack(config), {
contentBase: contentBase,
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true,
Expand Down
8 changes: 5 additions & 3 deletions client/webpack.config.js
Expand Up @@ -7,18 +7,20 @@ const entry = process.env.NODE_ENV === 'production' ?
[
"./src/index.jsx"
] : [
'webpack-dev-server/client?http://0.0.0.0:3000', // WebpackDevServer host and port
'webpack-dev-server/client?http://0.0.0.0:3030', // WebpackDevServer host and port
'webpack/hot/only-dev-server', // "only" prevents reload on syntax errors
"./src/index.jsx"
];

const path = __dirname.substring(0, __dirname.lastIndexOf('/')) + '/backend/resources/org/akvo/dash/public/build'

module.exports = {
entry: entry,
devtool: 'source-map',
output: {
path: __dirname,
path: path,
filename: "bundle.js",
publicPath: '/'
publicPath: 'build'
},
resolve: {
extensions: ['', '.js', '.jsx']
Expand Down

0 comments on commit 4ad5eeb

Please sign in to comment.