Charles H. Spurgeon sermons from spurgeongems scraped in with puppeteer in stored in a JSON.
TSDX scaffolds your new library inside /src.
To run TSDX, use:
npm start # or yarn startThis builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.
To do a one-off build, use npm run build or yarn build.
To run tests, use npm test or yarn test.
npm run lunchThis will lunch chromium and download the sermons in a json/spurgeongems.json file located at the root of the project.
Code quality is set up for you with prettier, husky, and lint-staged. Adjust the respective fields in package.json accordingly.
This is the folder structure we set up for you:
/src
index.tsx # EDIT THIS
package.json
README.md # EDIT THIS
tsconfig.jsonTSDX uses Rollup as a bundler and generates multiple rollup configs for various module formats and build settings. See Optimizations for details.
tsconfig.json is set up to interpret dom and esnext types, as well as react for jsx. Adjust according to your needs.
Two actions are added by default:
mainwhich installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrixsizewhich comments cost comparison of your library on every pull request usingsize-limit
Please see the main tsdx optimizations docs. In particular, know that you can take advantage of development-only optimizations:
// ./types/index.d.ts
declare var __DEV__: boolean;
// inside your code...
if (__DEV__) {
console.log('foo');
}You can also choose to install and use invariant and warning functions.