twreporter-react-components
What is this
The React components of articles at The Reporter Taiwan.
Published as an npm package.
Why do we this
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.
How to install this
yarn add @twreporter/react-article-components
How to use this
import Article from '@twreporter/react-article-components'
const Page = ({ record }) => <Article post={record} />
How to develop this
We use webpack-dev-server
to render a mock article with all elements for development.
make dev
How to build this
make build
We use Prettier to take care of code format and use ESlint with JavaScript Standard Style for code-quality rules. It will run prettier
and eslint
on pre-build and pre-commit hooks.
You can also run prettier
and eslint
with:
make lint