From e805573bd41c23aa53ebed20812fbdf5cf679ecf Mon Sep 17 00:00:00 2001 From: David Jay Date: Wed, 2 Nov 2016 15:45:52 -0700 Subject: [PATCH] Adding build script to package.json --- client/coral-embed-stream/webpack.config.js | 8 ++++---- package.json | 1 + routes/api/stream/index.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/client/coral-embed-stream/webpack.config.js b/client/coral-embed-stream/webpack.config.js index 10076a159..2db94e6af 100644 --- a/client/coral-embed-stream/webpack.config.js +++ b/client/coral-embed-stream/webpack.config.js @@ -8,7 +8,7 @@ module.exports = { devtool: 'source-map', entry: [ 'babel-polyfill', - './src/app' + path.join(__dirname, 'src', 'app') ], output: { path: path.join(__dirname, '..', '..','dist', 'coral-embed-stream'), @@ -23,13 +23,13 @@ module.exports = { }, plugins: [ new Copy([{ - from: './index.html' + from: path.join(__dirname, 'index.html') }, { - from: './style/default.css' + from: path.join(__dirname, 'style', 'default.css') }, { - from: './public/', + from: path.join(__dirname, 'public'), to: './' }, { diff --git a/package.json b/package.json index 632135005..a93714339 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "lint": "eslint .", "start": "./bin/www", + "build": "webpack --config ./client/coral-embed-stream/webpack.config.js", "embed-start": "node client/coral-embed-stream/dev-server.js" }, "repository": { diff --git a/routes/api/stream/index.js b/routes/api/stream/index.js index f1b1536d2..feb3faf9d 100644 --- a/routes/api/stream/index.js +++ b/routes/api/stream/index.js @@ -3,7 +3,7 @@ const express = require('express'); const router = express.Router(); router.get('/', (req, res) => { - console.log('asset_id, should be assetTest', req.query.asset_id) + console.log('Stream endpoint has been hit with asset_id ', req.query.asset_id) res.setHeader('Content-Type', 'application/json'); res.send(JSON.stringify([ {