From 411e6e48f3471ceb0a5b7c1b01184a45ec3240f7 Mon Sep 17 00:00:00 2001 From: David Jay Date: Tue, 8 Nov 2016 12:28:09 -0500 Subject: [PATCH 1/5] Removing unused copy from build process. --- client/coral-admin/webpack.config.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/client/coral-admin/webpack.config.js b/client/coral-admin/webpack.config.js index 2c81bf4fc..8c224bcdb 100644 --- a/client/coral-admin/webpack.config.js +++ b/client/coral-admin/webpack.config.js @@ -23,10 +23,6 @@ module.exports = Object.assign({}, devConfig, { ] }, plugins: [ - new Copy([{ - from: path.join(__dirname, '..', 'coral-embed-stream', 'dist'), - to: './embed/comment-stream' - }]), autoprefixer, precss ] }) From 80754ee57b471092a840ccb2722f6a992b0b013f Mon Sep 17 00:00:00 2001 From: David Jay Date: Tue, 8 Nov 2016 12:55:32 -0500 Subject: [PATCH 2/5] Updating build scripts for coral-admin --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0c7aab592..2ee7de0ab 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "pretest": "npm install", "test": "mocha tests --recursive", "test-watch": "mocha tests --recursive -w", - "embed-start": "./node_modules/webpack/bin/webpack.js --config ./client/coral-embed-stream/webpack.config.dev.js && ./bin/www" + "embed-start": "npm run build && ./bin/www" }, "config": { "pre-git": { From ee33b8445b08b0dcb946761fbc95b2e63d15a82b Mon Sep 17 00:00:00 2001 From: David Jay Date: Tue, 8 Nov 2016 12:56:22 -0500 Subject: [PATCH 3/5] Adding embed script to appropriate screen in settings. --- .../coral-admin/src/containers/Configure.js | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/client/coral-admin/src/containers/Configure.js b/client/coral-admin/src/containers/Configure.js index 4a36e56e7..f90e8c747 100644 --- a/client/coral-admin/src/containers/Configure.js +++ b/client/coral-admin/src/containers/Configure.js @@ -12,6 +12,8 @@ import { } from 'react-mdl' import Page from 'components/Page' import styles from './Configure.css' +import I18n from 'coral-framework/i18n/i18n' +import translations from '../translations' class Configure extends React.Component { constructor (props) { @@ -40,12 +42,28 @@ class Configure extends React.Component { } + copyToClipBoard (event) { + const copyTextarea = document.querySelector('.' + styles.embedInput) + copyTextarea.select() + + try { + document.execCommand('copy') + } catch (err) { + console.error('Unable to copy') + } + } + getEmbed () { + const embedText = + `
` + return

Copy and paste code below into your CMS to embed your comment box in your articles

- - + +
} @@ -94,3 +112,5 @@ class Configure extends React.Component { } export default connect(x => x)(Configure) + +const lang = new I18n(translations) From 7e720464812cc4268cabc0679bd8cfd0ac281d21 Mon Sep 17 00:00:00 2001 From: David Jay Date: Tue, 8 Nov 2016 12:57:16 -0500 Subject: [PATCH 4/5] Adding npm install to build process for coral-admin so build works. --- client/coral-admin/config.sample.json | 3 --- client/coral-admin/package.json | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 client/coral-admin/config.sample.json diff --git a/client/coral-admin/config.sample.json b/client/coral-admin/config.sample.json deleted file mode 100644 index 55d39db05..000000000 --- a/client/coral-admin/config.sample.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "basePath": "client/coral-admin" -} diff --git a/client/coral-admin/package.json b/client/coral-admin/package.json index 048359526..f7217952e 100644 --- a/client/coral-admin/package.json +++ b/client/coral-admin/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "build": "./node_modules/.bin/webpack --config webpack.config.js", + "build": "npm install && ./node_modules/.bin/webpack --config webpack.config.js", "start": "./node_modules/.bin/webpack-dev-server --config webpack.config.dev.js --inline --hot --content-base public --port 3142" }, "keywords": [], From 661b402351c6a7eff9e7549762af39bc6f28e84b Mon Sep 17 00:00:00 2001 From: David Erwin Date: Tue, 8 Nov 2016 14:53:28 -0500 Subject: [PATCH 5/5] Remove npm install from coral-admin build --- client/coral-admin/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/coral-admin/package.json b/client/coral-admin/package.json index f7217952e..048359526 100644 --- a/client/coral-admin/package.json +++ b/client/coral-admin/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "build": "npm install && ./node_modules/.bin/webpack --config webpack.config.js", + "build": "./node_modules/.bin/webpack --config webpack.config.js", "start": "./node_modules/.bin/webpack-dev-server --config webpack.config.dev.js --inline --hot --content-base public --port 3142" }, "keywords": [],