diff --git a/.dockerignore b/.dockerignore index f05b1f265..14b1fb97f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,3 @@ node_modules test +.git diff --git a/.gitignore b/.gitignore index 777dcc7f9..29f5961b2 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,3 @@ dump.rdb *.cfg .idea/ coverage/ -yarn.lock diff --git a/Dockerfile b/Dockerfile index 6776e2f04..a01aae254 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM node:7 +# Install yarn +RUN npm install -g yarn + # Create app directory RUN mkdir -p /usr/src/app WORKDIR /usr/src/app @@ -12,9 +15,9 @@ EXPOSE 5000 # Install app dependencies COPY package.json /usr/src/app/ -RUN npm install --production +RUN yarn install --production # Bundle app source COPY . /usr/src/app -CMD [ "npm", "start" ] +CMD [ "yarn", "start" ] diff --git a/INSTALL.md b/INSTALL.md index faee7bb25..f5f82f294 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -27,7 +27,7 @@ Navigate to a directory. ``` git clone https://github.com/coralproject/talk cd talk -npm install +yarn install ``` ### Environmental Variables @@ -42,7 +42,7 @@ Talk uses environmental variables for configuration. You can learn about them in Starting the server: ``` -npm start +yarn start ``` Browse to `http://localhost:3000` (or your custom port.) @@ -54,13 +54,13 @@ Our build process will build all front end components registered [here](https:// One time build: ``` -npm build +yarn build ``` Build, then rebuild when a file is updated (development build): ``` -npm build-watch +yarn build-watch ``` @@ -69,13 +69,13 @@ npm build-watch Run all tests once: ` -npm test +yarn test ` Run our end to end tests (will install Selenium and nightwatch): ` -npm run e2e +yarn e2e ` _Please ensure all tests are passing before submitting a PR!_ diff --git a/circle.yml b/circle.yml index 99b7d852b..f9ac9ea41 100644 --- a/circle.yml +++ b/circle.yml @@ -4,11 +4,20 @@ machine: services: - docker - redis + environment: + PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" + NODE_ENV: "test" dependencies: + override: + - yarn + cache_directories: + - ~/.cache/yarn post: + # Build the static assets + - yarn build # Lint the project here, before tests are ran. - - npm run lint + - yarn lint database: post: @@ -20,9 +29,9 @@ database: test: override: # Run the tests using the junit reporter. - - MOCHA_FILE=$CIRCLE_TEST_REPORTS/junit/test-results.xml NPM_PACKAGE_CONFIG_MOCHA_REPORTER=mocha-junit-reporter npm run test + - MOCHA_FILE=$CIRCLE_TEST_REPORTS/junit/test-results.xml MOCHA_REPORTER=mocha-junit-reporter yarn test # Run the e2e test suite - - E2E_REPORT_PATH=$CIRCLE_TEST_REPORTS/e2e npm run e2e + - E2E_REPORT_PATH=$CIRCLE_TEST_REPORTS/e2e yarn e2e deployment: release: diff --git a/client/coral-admin/README.md b/client/coral-admin/README.md index 067a3cac9..7bc9de36e 100644 --- a/client/coral-admin/README.md +++ b/client/coral-admin/README.md @@ -5,19 +5,19 @@ This app handles moderation for Talk (and maybe more later on) ## Installation - $ npm install + $ yarn install $ cp config.sample.json config.json Then change `config.json` to adjust it to your project ## Building for production - $ npm run build + $ yarn build The public folder has everything you need for deployment. You can just copy that folder to your favorite static web server ## Development - $ npm start + $ yarn start A development server will be running at http://localhost:4132 diff --git a/client/coral-embed-stream/src/Comment.css b/client/coral-embed-stream/src/Comment.css index 8b1378917..09a94aa55 100644 --- a/client/coral-embed-stream/src/Comment.css +++ b/client/coral-embed-stream/src/Comment.css @@ -1 +1,3 @@ - +.Reply { + position: relative; +} diff --git a/client/coral-embed-stream/src/Comment.js b/client/coral-embed-stream/src/Comment.js index 529420941..778614880 100644 --- a/client/coral-embed-stream/src/Comment.js +++ b/client/coral-embed-stream/src/Comment.js @@ -16,6 +16,8 @@ import {ReplyBox, ReplyButton} from 'coral-plugin-replies'; import FlagComment from 'coral-plugin-flags/FlagComment'; import LikeButton from 'coral-plugin-likes/LikeButton'; +import styles from './Comment.css'; + const getAction = (type, comment) => comment.actions.filter((a) => a.type === type)[0]; class Comment extends React.Component { @@ -87,7 +89,7 @@ class Comment extends React.Component { return (
{asset.settings.closedMessage}
- } - {!loggedIn &&{asset.settings.closedMessage}
+ } + {!loggedIn &&copied to clipboard
: null - } - { - this.state.copyFailure - ?copying to clipboard not supported in this browser. Use Cmd + C.
- : null - } +