The React components of articles at The Reporter Taiwan.
Published as an npm package.
This is built for twreporter-react and Editorial Tool (you can build the editorial tool using Plate). These Article React Components will be used on Article Page and Editorial Tool.
yarn add @twreporter/react-article-components
// es6
import Article from '@twreporter/react-article-components'
const Page = ({ record }) => <Article post={record} />
There are two dev modes:
-
We use
webpack-dev-server
to render a mock article with all elements for development.# Start the webpack-dev-server npm run dev-server
-
Or use
babel --watch
to complie the source file if there's any change happenedmake dev
# Build the distribution files
make build