Package Exports
- @readr-media/react-component
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@readr-media/react-component) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@readr-media/react-component · 
Feature
@readr-media/react-component整理了 Readr 網站/靜態專題所需之共用元件。- 詳細使用方式可參閱各元件的 README.md。
- 注意:此套件僅支援
ES modules,需注意使用環境須為 Node.js 12 / Next.js 12 以上。
Components
- Readr LOGO: see src/logo
- 頁尾贊助按鈕: see src/donate-button
- 訂閱電子報按鈕: see src/subscribe-button
- 相關報導: see src/related-report
- Header贊助按鈕: see src/donate-btn-header-rect
How to Use This Pkg?
- Install the npm package
yarn add @readr-media/react-component - Import component in the desired place
Installation
yarn install
Development
$ yarn dev
// or
$ npm run dev
// or
$ make devBuild (Webpack Bundles and ES5 Transpiling)
$ yarn build
// or
$ npm run build
// or
$ make buildTranspile React, ES6 Codes to ES5
$ make build-libNPM Publish
After executing Build scripts, we will have /lib folders,
and then we can execute publish command,
npm publishNote: before publish npm package, we need to bump the package version first.
TODOs
- 建立 CI pipeline,透過 CI 產生 npm package,並且上傳至 npm registry
- 透過 Lerna 控制 packages 之間的版號