[change] move examples

This commit is contained in:
Nicolas Gallagher
2015-10-19 18:32:38 -07:00
parent 75f653818a
commit 5f7b3f5fef
4 changed files with 6 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ var ROOT = path.join(__dirname, '..')
module.exports = {
DIST_DIRECTORY: path.join(ROOT, 'dist'),
EXAMPLES_DIRECTORY: path.join(ROOT, 'examples'),
SRC_DIRECTORY: path.join(ROOT, 'src'),
ROOT_DIRECTORY: ROOT,
TEST_ENTRY: path.join(ROOT, 'tests.webpack.js')

View File

@@ -5,13 +5,13 @@ var path = require('path')
module.exports = assign({}, base, {
devServer: {
contentBase: constants.SRC_DIRECTORY
contentBase: constants.EXAMPLES_DIRECTORY
},
entry: {
example: path.join(constants.SRC_DIRECTORY, 'example')
example: path.join(constants.EXAMPLES_DIRECTORY, 'index')
},
output: {
filename: 'example.js',
filename: 'examples.js',
path: constants.DIST_DIRECTORY
}
})

View File

@@ -6,4 +6,4 @@
<style>html { font-family: sans-serif; }</style>
<style id="react-stylesheet"></style>
<div id="react-root"></div>
<script src="/example.js"></script>
<script src="/examples.js"></script>

View File

@@ -1,4 +1,4 @@
import React, { Image, StyleSheet, Text, TextInput, Touchable, View } from '.'
import React, { Image, StyleSheet, Text, TextInput, Touchable, View } from '../src'
import ReactDOM from 'react-dom'
const Heading = ({ children, size = 'normal' }) => (