Skip to content

Latest commit

 

History

History
272 lines (180 loc) · 7.5 KB

DEVELOPMENT.md

File metadata and controls

272 lines (180 loc) · 7.5 KB

Development

Table of Contents

Prerequisites

Before you get started, you will need to have the following tools installed on your machine:

  • nodejs (version 12 or later)
  • corepack (run corepack enable, to enable the packageManager mentioned in the package.json)
  • git (optional, but recommended for version control)

This repository includes a list of suggested VS Code extensions. It's a good idea to use VS Code and accept its suggestion to install them, as they'll help with development.

Getting Started

Configuration

The project uses environmental variables for configuration. You can set the environmental variables in a .env file in each of the workspace of the project. Take a look at the .env.example file correspondingly.

Installing the dependencies

After you have set the environmental variables, you can run the project locally by

git clone https://github.com/timelessco/strapi-ts-monorepo
cd strapi-ts-monorepo
yarn install

This will download and install all the required dependencies for the project.

Note: Each projects can be also be executed individually from within the respective folder, but the below commands are used to execute all apps/packages.

Running the project locally

yarn dev
  • For developing strapi app, it provides additional options. Learn more

Building the project

To build the project to a production environment, you can use the

yarn build
  • For building strapi app, it provides additional options Learn more

Deploying the project

Versioning & releasing the project

changesets is used as release tool

yarn release

Note: Before running release command, changeset must be created & versioned which is taken care by PR workflow using changeset-bot in combination with release-or-version-pr.yml. Learn more

More DX scripts

Check and update packages

yarn deps:check - checks for errors in the installed packages

yarn update - interactive cli to update the deps

yarn update:check - checks for the latest updates

Turbo

Check for all the below errors in one command using turbo

yarn lint

AutoFix all the linting errors in one command using turbo

yarn format

Clean all temporary files useing del-cli

yarn clean:all

Prettier

prettier is used to format code. It should be applied automatically when you save files in VS Code or make a Git commit.

Check the formatting errors

yarn lint:prettier

AutoFix the formatting errors

yarn format:prettier

This package includes several forms of linting to enforce consistent code quality and styling. Each should be shown in VS Code, and can be run manually on the command-line:

Eslint

Extends all the necessary rulesets from eslint-config-canonical for the project that lints JavaScript and TypeScript source files

Check for the linting errors

yarn lint:eslint

AutoFix the linting errors

yarn format:eslint

Markdown

(markdownlint-cli2): Checks all Markdown files

Check the markdown linting errors

yarn lint:md

AutoFix the markdown linting errors

yarn format:md

Check Types

(typescript): Checks all TypeScript files

Check TypeScript types

yarn lint:types

Check unused dependencies, exports & types

(knip): Checks all unused dependencies, exports & types

Check the spelling errors

yarn lint:knip

Check Spelling

(cspell): Spell checks across all source files

Check the spelling errors

yarn lint:spelling

Populate project-words.txt with the words that are not in the dictionary & fix

yarn populate:dictionary

Check package.json

(npm-package-json-lint): Lints the package.json file

Check the package.json linting errors

yarn lint:package-json

Test

Run the test suite

yarn test

Contributions

(all-contributors): ✨ Recognize all contributors, not just the ones who push code ✨

Add new contributors

yarn contributors:add

Generate the contributors list

yarn contributors:generate

Learn more

Strapi

  • Resource center - Strapi resource center.
  • Strapi documentation - Official Strapi documentation.
  • Strapi tutorials - List of tutorials made by the core team and the community.
  • Strapi blog - Official Strapi blog containing articles made by the Strapi team and the community.
  • Changelog - Find out about the Strapi product updates, new features and general improvements.

Feel free to check out the Strapi GitHub repository. Your feedback and contributions are welcome!

Community

  • Discord - Come chat with the Strapi community including the core team.
  • Forum - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members.
  • Awesome Strapi - A curated list of awesome things related to Strapi.