Skip to content

Charles H. Spurgeon sermons from spurgeongems scraped in with puppeteer in stored in a JSON.

License

Notifications You must be signed in to change notification settings

FottyM/spurgeon-gems

Repository files navigation

Charles H. Spurgeon sermons.

Charles H. Spurgeon sermons from spurgeongems scraped in with puppeteer in stored in a JSON.

Commands

TSDX scaffolds your new library inside /src.

To run TSDX, use:

npm start # or yarn start

This 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 lunch

This will lunch chromium and download the sermons in a json/spurgeongems.json file located at the root of the project.

Configuration

Code quality is set up for you with prettier, husky, and lint-staged. Adjust the respective fields in package.json accordingly.

Setup Files

This is the folder structure we set up for you:

/src
  index.tsx       # EDIT THIS
package.json
README.md         # EDIT THIS
tsconfig.json

Rollup

TSDX uses Rollup as a bundler and generates multiple rollup configs for various module formats and build settings. See Optimizations for details.

TypeScript

tsconfig.json is set up to interpret dom and esnext types, as well as react for jsx. Adjust according to your needs.

GitHub Actions

Two actions are added by default:

  • main which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix
  • size which comments cost comparison of your library on every pull request using size-limit

Optimizations

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.