Skip to content

Commit

Permalink
docs: update example
Browse files Browse the repository at this point in the history
  • Loading branch information
mfellner committed Dec 27, 2016
1 parent 3012e17 commit 9bb1fbd
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 63 deletions.
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-down-example",
"private": true,
"scripts": {
"dist": "webpack -p",
"dist": "rm -f dist/* && webpack -p",
"start": "webpack-dev-server --inline --content-base dist",
"publish": "gh-pages -d ./dist"
},
Expand Down
2 changes: 1 addition & 1 deletion example/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component, PropTypes } from 'react'
import styled from 'styled-components'
import plugins from './plugins'
import TextArea from './TextArea'
import ReactDown from '../../lib'
import ReactDown from '../../'
import { Page, Row, Column } from 'hedron'

const Title = styled.h1`
Expand Down
17 changes: 15 additions & 2 deletions example/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
const path = require('path')
const webpack = require('webpack')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')

const packageDependencies = Object.keys(require('./package.json')['dependencies'])

module.exports = {
entry: './src/index.js',
entry: {
'index': './src/index.js',
'vendor': [
'markdown-it',
'camel-case'
].concat(packageDependencies)
},
target: 'web',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'index.js'
filename: '[name].js'
},
module: {
rules: [
Expand Down Expand Up @@ -39,6 +48,10 @@ module.exports = {
filename: 'index.html',
template: './src/index.ejs',
inject: false
}),
new webpack.optimize.CommonsChunkPlugin({
names: ['vendor', 'manifest'],
minChunks: Infinity
})
],
externals: {
Expand Down
75 changes: 16 additions & 59 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -185,23 +185,15 @@ aws4@^1.2.1:
version "1.5.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755"

babel-code-frame@^6.11.0, babel-code-frame@^6.16.0:
version "6.16.0"
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.16.0.tgz#f90e60da0862909d3ce098733b5d3987c97cb8de"
dependencies:
chalk "^1.1.0"
esutils "^2.0.2"
js-tokens "^2.0.0"

babel-code-frame@^6.20.0:
babel-code-frame@^6.11.0, babel-code-frame@^6.20.0:
version "6.20.0"
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.20.0.tgz#b968f839090f9a8bc6d41938fb96cb84f7387b26"
dependencies:
chalk "^1.1.0"
esutils "^2.0.2"
js-tokens "^2.0.0"

babel-core@^6.18.0, babel-core@^6.21.0:
babel-core@6.21.0, babel-core@^6.18.0:
version "6.21.0"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.21.0.tgz#75525480c21c803f826ef3867d22c19f080a3724"
dependencies:
Expand Down Expand Up @@ -321,7 +313,7 @@ babel-helpers@^6.16.0:
babel-runtime "^6.0.0"
babel-template "^6.16.0"

babel-loader@^6.2.10:
babel-loader@6.2.10:
version "6.2.10"
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-6.2.10.tgz#adefc2b242320cd5d15e65b31cea0e8b1b02d4b0"
dependencies:
Expand Down Expand Up @@ -622,20 +614,20 @@ babel-register@^6.18.0:
mkdirp "^0.5.1"
source-map-support "^0.4.2"

babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.9.0, babel-runtime@^6.9.1:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.18.0.tgz#0f4177ffd98492ef13b9f823e9994a02584c9078"
dependencies:
core-js "^2.4.0"
regenerator-runtime "^0.9.5"

babel-runtime@^6.20.0:
babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.20.0, babel-runtime@^6.9.0:
version "6.20.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.20.0.tgz#87300bdcf4cd770f09bf0048c64204e17806d16f"
dependencies:
core-js "^2.4.0"
regenerator-runtime "^0.10.0"

babel-runtime@^6.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.18.0.tgz#0f4177ffd98492ef13b9f823e9994a02584c9078"
dependencies:
core-js "^2.4.0"
regenerator-runtime "^0.9.5"

babel-template@^6.14.0, babel-template@^6.15.0, babel-template@^6.16.0, babel-template@^6.8.0:
version "6.16.0"
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.16.0.tgz#e149dd1a9f03a35f817ddbc4d0481988e7ebc8ca"
Expand All @@ -646,21 +638,7 @@ babel-template@^6.14.0, babel-template@^6.15.0, babel-template@^6.16.0, babel-te
babylon "^6.11.0"
lodash "^4.2.0"

babel-traverse@^6.16.0, babel-traverse@^6.18.0:
version "6.19.0"
resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.19.0.tgz#68363fb821e26247d52a519a84b2ceab8df4f55a"
dependencies:
babel-code-frame "^6.16.0"
babel-messages "^6.8.0"
babel-runtime "^6.9.0"
babel-types "^6.19.0"
babylon "^6.11.0"
debug "^2.2.0"
globals "^9.0.0"
invariant "^2.2.0"
lodash "^4.2.0"

babel-traverse@^6.21.0:
babel-traverse@^6.16.0, babel-traverse@^6.18.0, babel-traverse@^6.21.0:
version "6.21.0"
resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.21.0.tgz#69c6365804f1a4f69eb1213f85b00a818b8c21ad"
dependencies:
Expand All @@ -674,16 +652,7 @@ babel-traverse@^6.21.0:
invariant "^2.2.0"
lodash "^4.2.0"

babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.8.0, babel-types@^6.9.0:
version "6.19.0"
resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.19.0.tgz#8db2972dbed01f1192a8b602ba1e1e4c516240b9"
dependencies:
babel-runtime "^6.9.1"
esutils "^2.0.2"
lodash "^4.2.0"
to-fast-properties "^1.0.1"

babel-types@^6.21.0:
babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.21.0, babel-types@^6.8.0, babel-types@^6.9.0:
version "6.21.0"
resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.21.0.tgz#314b92168891ef6d3806b7f7a917fdf87c11a4b2"
dependencies:
Expand Down Expand Up @@ -1219,7 +1188,7 @@ css-selector-tokenizer@^0.7.0:
fastparse "^1.1.1"
regexpu-core "^1.0.0"

css-to-react-native@^1.0.3, css-to-react-native@^1.0.6:
css-to-react-native@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-1.0.6.tgz#728c7e774e56536558a0ecaa990d9507c43a4ac4"
dependencies:
Expand Down Expand Up @@ -2361,7 +2330,7 @@ lodash.indexof@^4.0.5:
version "4.0.5"
resolved "https://registry.yarnpkg.com/lodash.indexof/-/lodash.indexof-4.0.5.tgz#53714adc2cddd6ed87638f893aa9b6c24e31ef3c"

lodash@^4.14.0, lodash@^4.15.0, lodash@^4.16.2, lodash@^4.16.4, lodash@^4.2.0, lodash@^4.3.0:
lodash@^4.14.0, lodash@^4.16.2, lodash@^4.16.4, lodash@^4.2.0, lodash@^4.3.0:
version "4.17.2"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42"

Expand Down Expand Up @@ -3654,19 +3623,7 @@ style-loader@0.13.1:
dependencies:
loader-utils "^0.2.7"

styled-components@^1.0.10:
version "1.1.2"
resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-1.1.2.tgz#d9931dc887322ea9b61e7a4fbda25ebd69240854"
dependencies:
buffer "^5.0.0"
css-to-react-native "^1.0.3"
fbjs "^0.8.4"
glamor "^2.15.5"
inline-style-prefixer "^2.0.4"
lodash "^4.15.0"
supports-color "^3.1.2"

styled-components@^1.2.1:
styled-components@1.2.1, styled-components@^1.0.10:
version "1.2.1"
resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-1.2.1.tgz#5884267dd9c6a8199d4abd3e0714afb973772b42"
dependencies:
Expand Down

0 comments on commit 9bb1fbd

Please sign in to comment.