Skip to content

Commit

Permalink
Merge branch 'release/0.0.19'
Browse files Browse the repository at this point in the history
  • Loading branch information
witnessmenow committed Apr 28, 2016
2 parents ad8ccdc + f66c594 commit 6fda02a
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
*.log
.idea
dist
builds
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ language: node_js
before_install: if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi

node_js:
- "4.4.2"
- "4"
- "5"
- "stable"
Expand All @@ -14,3 +13,4 @@ script:
- npm run lint
- npm run test
- npm run prepublish
- npm run bundle-js
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [0.0.19] - 2016-04-28

- No Issue: Adding a bundle-js build step to create browser compatible chat-template.js (witnessmenow)

## [0.0.18] - 2016-04-27

- No Issue: Fixed chats not looping back around (Paul.O'Flaherty)
Expand Down
20 changes: 12 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chat-template",
"version": "0.0.18",
"version": "0.0.19",
"description": "Chat-Template is a React component that enables quick prototyping of bot conversations.",
"repository": {
"type": "git",
Expand All @@ -15,7 +15,10 @@
"test": "npm run lint && npm run testonly",
"test-watch": "npm run testonly -- --watch --watch-extensions js",
"storybook": "start-storybook -p 9010",
"publish-storybook": "bash .scripts/publish_storybook.sh"
"publish-storybook": "bash .scripts/publish_storybook.sh",
"bundle-js-dev": "webpack --config ./webpack.dev.config.js",
"bundle-js-prod": "webpack -p --config ./webpack.prod.config.js",
"bundle-js": "npm run test && npm run bundle-js-dev && npm run bundle-js-prod"
},
"devDependencies": {
"@kadira/storybook": "^1.19.0",
Expand All @@ -27,7 +30,9 @@
"babel-polyfill": "^6.5.0",
"babel-preset-es2015": "^6.5.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-1": "^6.5.0",
"babel-preset-stage-2": "^6.5.0",
"babel-runtime": "^6.5.0",
"chai": "^3.5.0",
"enzyme": "^2.2.0",
"eslint": "^2.7.0",
Expand All @@ -37,26 +42,25 @@
"eslint-plugin-jsx-a11y": "^1.0.3",
"eslint-plugin-react": "^5.0.1",
"git-url-parse": "^6.0.1",
"jsdom": "^8.3.1",
"jsdom": "^8.4.1",
"material-ui": "0.15.0-alpha.2",
"mocha": "^2.4.5",
"raw-loader": "^0.5.1",
"react": "^15.0.0",
"react-addons-test-utils": "^15.0.0",
"react-dom": "^15.0.0",
"sinon": "^1.17.3",
"style-loader": "^0.13.1"
"style-loader": "^0.13.1",
"webpack": "^1.13.0"
},
"peerDependencies": {
"react": "^0.14.7 || ^15.0.0"
},
"dependencies": {
"@kadira/storybook": "^1.19.0",
"aphrodite": "^0.3.0",
"babel-preset-stage-1": "^6.5.0",
"babel-runtime": "^6.5.0",
"object-assign-deep": "0.0.4",
"react-addons-css-transition-group": "^15.0.1"
"react-addons-css-transition-group": "^15.0.1",
"react-dom": "^15.0.0"
},
"main": "dist/index.js",
"engines": {
Expand Down
10 changes: 10 additions & 0 deletions src/bundle/wrapper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Conversation } from '../index';
import ReactDOM from 'react-dom';
import React from 'react';

const showChatTemplate = (messages, element, delay = 1, height = 300) => {
ReactDOM.render(<Conversation delay={delay} height={height} messages={messages} />,
element);
};

module.exports = showChatTemplate;
18 changes: 18 additions & 0 deletions webpack.dev.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
entry: './src/bundle/wrapper.js',
output: {
libraryTarget: 'var',
library: 'showChatTemplate',
path: 'builds',
filename: 'chat-template.js',
},
module: {
loaders: [
{
test: /\.js/,
loader: 'babel',
include: __dirname + '/src',
}
],
},
};
27 changes: 27 additions & 0 deletions webpack.prod.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const webpack = require('webpack');

module.exports = {
entry: './src/bundle/wrapper.js',
output: {
libraryTarget: 'var',
library: 'showChatTemplate',
path: 'builds',
filename: 'chat-template-min.js',
},
module: {
loaders: [
{
test: /\.js/,
loader: 'babel',
include: __dirname + '/src',
}
],
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
})
],
};

0 comments on commit 6fda02a

Please sign in to comment.