strapi-supercharged
v0.4.2
Published
Supercharge your Strapi applications and plugins with typescript compiler
Downloads
74
Maintainers
Readme
Getting Started
To get a local copy up and running follow these simple steps.
Installation to an existing project
- Install
strapi-supercharged
andtypescript
dev dependenciesnpm install --save-dev strapi-supercharged typescript # yarn add -D strapi-supercharged typescript
- 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
- Clone the repo
git clone https://github.com/digisquad-io/strapi-supercharged-template.git
- Install NPM packages
npm install # yarn
- 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
Autocomplete built in and custom methods
Autocomplete for your models in query
Embed documentation & improved configuration
Advanced linter configuration
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.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/amazing-feature
) - Commit your Changes (
git commit -m 'feat(amazing-feature): add something amazing'
) - Push to the Branch (
git push origin feature/amazing-feature
) - 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]