mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-03-27 22:55:56 +08:00
[change] move examples
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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>
|
||||
@@ -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' }) => (
|
||||
Reference in New Issue
Block a user