Skip to content
This repository has been archived by the owner on Jun 6, 2019. It is now read-only.

houkiboshi-fabric/contents

Repository files navigation

houkiboshi-fabric contents

houkiboshi-fabric dataset

Requirements

Recommended

Install

git clone git@github.com:houkiboshi-fabric/contents.git
cd contents/
cp .env.example .env
code .env # Edit and save required environment variables on your editor
nodenv update-version-defs && nodenv install # <-- optional
yarn install

Tasks

Build

  • Add timestamps
    • import from under src/, export into dist/
    • timestamps from git commit history
      • created_at
      • modified_at
  • Join entities to id and ids references
  • Add relative paths for Web pages
yarn build

Build schemas

  • Build new JSON Schema files locally
    • All properties of schemas named *_id or *_ids have enum that are ids collected from actual dataset. So you can use auto-complete with ids in your editor like Visual Studio Code.
    • Generate default snippets from examples for Visual Studio Code
yarn build-schemas

Update assets

  • Check assets updates and sync
yarn update-assets

Validate

  • Validate json files using Ajv
    • src/**/*.json
yarn validate

Format

  • Format .{js,json,md} files using prettier
  • Sort properties of json according to schema properties
yarn format

Watch

  • Run update-assets once at the first
  • Watch file changing continually and run tasks below
    • build-schemas
    • validate
    • lint
  • watch target pattern src/**/*.{json,md}
yarn watch
// or
yarn start

Lint

  • Run lint to src/**/*.{json,md}
    • json description property
    • Markdown body contents
yarn lint

Lint and fix

  • Run lint to src/**/*.{json,md} and fix automatically if possible
yarn fix

Lint JavaScript files

yarn lint-js

Test

  • Run JavaScript test using Jest
yarn test
// or
yarn test:watch

Deploy

  • yarn build & commit files under dist/ and push them to gh-pages branch
  • You don't need to run this task manually in most cases since this task will be run automatically on CI.
yarn deploy

Author

houkiboshi-fabric

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •