Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Supercharge your Strapi applications and plugins with typescript compiler (@types/strapi)

Notifications You must be signed in to change notification settings

digisquad-io/strapi-supercharged

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Strapi Supercharged

Strapi Supercharged

Supercharge your Strapi applications and plugins with typescript compiler
Explore the docs »

View Template · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

Getting Started

To get a local copy up and running follow these simple steps.

Installation to an existing project

  1. Install strapi-supercharged and typescript dev dependencies
    npm install --save-dev strapi-supercharged typescript # yarn add -D strapi-supercharged typescript
  2. Create a tsconfig.json
    {
      "compilerOptions": {
        "lib": ["esnext"],
        "target": "ES1019",
        "moduleResolution": "node",
        "esModuleInterop": true,
        "resolveJsonModule": true,
        "allowJs": true,
        "checkJs": true,
        "strict": true,
        "strictNullChecks": true,
        "noImplicitAny": true,
        "baseUrl": ".",
        "noEmit": true,
        "declaration": false,
        "types": ["strapi-supercharged"]
      },
      "include": ["**/*.js", ".eslintrc.js"]
    }

Installation from template

  1. Clone the repo
    git clone https://github.com/digisquad-io/strapi-supercharged-template.git

    🚀 Or use strapi-supercharged-template

  2. Install NPM packages
    npm install # yarn
  3. Run the tests
    npm test # yarn test

About The Project

“Javascript as Typescript” code

Use all power of Typescript directly into your Javascript

Predict all types from internal and custom methods

Predict all types from internal and custom methods

Autocomplete built in and custom methods

Autocomplete built in and custom methods

Autocomplete for your models in query

Autocomplete for your models in query

Embed documentation & improved configuration

Embed documentation & improved configuration

Advanced linter configuration

Advanced linter configuration

Advanced error detection

Advanced error detection

🎯 Goals

  • Cover API, Plugins and all Internal Strapi typing
  • Ahead-Of-Time compilation errors with Typescript
  • Highly extensible definitions with interface merging

Usage

💡 Declare your Models

@todo

For complete examples, please refer to the Article API model typing or the Product model typing from sample plugin

💡 Register API typing

@todo

For a complete example, please refer to the ArticleAPI typing

💡 Register Plugins typing

@todo

For a complete example, please refer to the SamplePlugin typing

🌠 Use your Supercharged Strapi

In controllers

@todo

For a complete example, please refer to the Article controller

In services

@todo

For a complete example, please refer to the Article service

In middlewares

@todo

For a complete example, please refer to the Sample middleware (from sample plugin)

In scripts

@todo

For a complete example, please refer to the scripts/initData.js demo script

🙋‍♂️ Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/amazing-feature)
  3. Commit your Changes (git commit -m 'feat(amazing-feature): add something amazing')
  4. Push to the Branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

:octocat: tip: try to use . keyboard shortcut on this repository (or shift+;)

License

Distributed under the MIT License. See LICENSE.md for more information.

Contact

digisquad.io - [email protected]

Acknowledgements