mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-01 10:07:35 +00:00
[change] move examples
This commit is contained in:
@@ -4,6 +4,7 @@ var ROOT = path.join(__dirname, '..')
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
DIST_DIRECTORY: path.join(ROOT, 'dist'),
|
DIST_DIRECTORY: path.join(ROOT, 'dist'),
|
||||||
|
EXAMPLES_DIRECTORY: path.join(ROOT, 'examples'),
|
||||||
SRC_DIRECTORY: path.join(ROOT, 'src'),
|
SRC_DIRECTORY: path.join(ROOT, 'src'),
|
||||||
ROOT_DIRECTORY: ROOT,
|
ROOT_DIRECTORY: ROOT,
|
||||||
TEST_ENTRY: path.join(ROOT, 'tests.webpack.js')
|
TEST_ENTRY: path.join(ROOT, 'tests.webpack.js')
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ var path = require('path')
|
|||||||
|
|
||||||
module.exports = assign({}, base, {
|
module.exports = assign({}, base, {
|
||||||
devServer: {
|
devServer: {
|
||||||
contentBase: constants.SRC_DIRECTORY
|
contentBase: constants.EXAMPLES_DIRECTORY
|
||||||
},
|
},
|
||||||
entry: {
|
entry: {
|
||||||
example: path.join(constants.SRC_DIRECTORY, 'example')
|
example: path.join(constants.EXAMPLES_DIRECTORY, 'index')
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: 'example.js',
|
filename: 'examples.js',
|
||||||
path: constants.DIST_DIRECTORY
|
path: constants.DIST_DIRECTORY
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,4 +6,4 @@
|
|||||||
<style>html { font-family: sans-serif; }</style>
|
<style>html { font-family: sans-serif; }</style>
|
||||||
<style id="react-stylesheet"></style>
|
<style id="react-stylesheet"></style>
|
||||||
<div id="react-root"></div>
|
<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'
|
import ReactDOM from 'react-dom'
|
||||||
|
|
||||||
const Heading = ({ children, size = 'normal' }) => (
|
const Heading = ({ children, size = 'normal' }) => (
|
||||||
Reference in New Issue
Block a user