1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00

fix frontend and fix deploy to dev-master with lerna

This commit is contained in:
sveisvei 2016-06-19 20:47:34 +02:00
parent 95c9c1ea60
commit 3ff7b671c8
9 changed files with 28 additions and 16 deletions

4
.gitignore vendored
View File

@ -22,8 +22,8 @@ coverage
build/Release
# webpack output
packages/unleash-frontend/public/js/bundle.js
packages/unleash-frontend/public/js/bundle.js.map
packages/unleash-frontend/public/bundle.js
packages/unleash-frontend/public/bundle.js.map
# liquibase stuff
/sql

View File

@ -1 +1 @@
web: npm run db-migrate && npm run start
web: npm run bootstrap && npm run db-migrate && npm run start

View File

@ -28,7 +28,8 @@
"start": "lerna --scope=unleash-server exec npm start",
"publish": "lerna publish",
"publish:dry": "lerna publish --skip-git --skip-npm",
"db-migrate": "lerna --scope=unleash-api exec npm run db-migrate"
"db-migrate": "lerna --scope=unleash-api exec npm run db-migrate",
"heroku-postbuild": "npm run bootstrap && lerna --scope=unleash-frontend exec npm run build"
},
"dependencies": {},
"devDependencies": {

View File

@ -0,0 +1,3 @@
{
"presets": ["es2015", "stage-2", "react"]
}

View File

@ -1,5 +1,5 @@
'use strict';
const server = require('unleash-server');
const server = require('unleash-api');
const unleash = server.start({});
const app = unleash.app;

View File

@ -31,17 +31,19 @@
},
"main": "./lib/index.js",
"dependencies": {
"jsx-loader": "0.12.2",
"lodash": "^3.5.0",
"moment": "^2.13.0",
"react": "^0.13.1",
"react-router": "^0.13.2",
"reflux": "^0.2.10",
"reqwest": "^2.0.5",
"webpack": "^1.13.0",
"webpack-dev-middleware": "^1.6.1"
"reqwest": "^2.0.5"
},
"devDependencies": {
"babel-core": "^6.9.1",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-2": "^6.5.0",
"chai": "3.5.0",
"coveralls": "^2.11.9",
"istanbul": "^0.4.3",
@ -52,7 +54,9 @@
"react-tools": "^0.13.1",
"supertest": "^1.2.0",
"supervisor": "^0.10.0",
"unleash-api": "1.0.0-alpha.2"
"unleash-api": "1.0.0-alpha.2",
"webpack": "^2.1.0-beta.13",
"webpack-dev-middleware": "^1.6.1"
},
"jest": {
"scriptPreprocessor": "<rootDir>/jest-preprocessor.js",

View File

@ -8,10 +8,10 @@
<meta name="description" content="unleash">
<link rel="stylesheet" href="//finncdn.no/bb/css/so/5.5.28/so.min.css">
<link rel="stylesheet" href="css/unleash.css">
<link rel="stylesheet" href="unleash.css">
</head>
<body>
<div id="content"></div>
<script src="js/bundle.js"></script>
<script src="bundle.js"></script>
</body>
</html>

View File

@ -4,15 +4,15 @@
const path = require('path');
const root = path.normalize(path.join(__dirname, '.'));
const jsroot = path.join(path.join(root, 'public'), 'js');
const jsroot = path.join(root, 'public', 'js');
module.exports = {
context: jsroot,
entry: 'app',
entry: './app.jsx',
output: {
path: jsroot,
path: path.join(root, 'public'),
filename: 'bundle.js',
publicPath: '/js/',
},
@ -25,7 +25,11 @@ module.exports = {
module: {
loaders: [
{ test: /\.jsx$/, loader: 'jsx?harmony' },
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
},
],
},