[RFC] strapi-plugin-utils #6
Replies: 5 comments 5 replies
-
This sounds like a fantastic idea :) |
Beta Was this translation helpful? Give feedback.
-
I will also add |
Beta Was this translation helpful? Give feedback.
-
I am thinking we should have 3 plugin util packages instead of just one with multi folders.
This will allow for per package configuration as well as reduce unnecessary code. For example with the current strategy if a user only needs the admin utils they would get the server and shared as well with a single package setup. Only downside i see here is the need to install an additional two packages if a user wants everything. Not sure if this is needed for test utils as well. Depends on where we go with that. Any thoughts? P.S. I plan to have first draft ready to be pushed this weekend. |
Beta Was this translation helpful? Give feedback.
-
I have uploaded a first draft of the repo on my own account named strapi-utils. We can move it to the Let me know if anything else is needed before it can be migrated to strapi-community. At the moment it is a bit rough and not ready for public consumption (although all tests are passing 😄 ) |
Beta Was this translation helpful? Give feedback.
-
We created the https://github.com/strapi-community/utils repository ! |
Beta Was this translation helpful? Give feedback.
-
Overview
This RFC is aimed at opening a discussion regarding a utility package for strapi plugin developers to work with. The package will contain common utility functions that plugin developers are consistently in the need of in their own projects.
Motivation
The motivation behind this is to provide a central location for all utilities that a plugin developer might need.
Design
The current design will be as follows.
Language
The langauge for the package will be in typescript to provide the ability to build for both commonjs and esm support in addition to the other benefits of using typescript. This will allow the plugin to provide utilities for both the frontend and backend of a plugin.
Structure
The plan is to have a plugin-utils package and a test-utils package each published seperately via NPM.
plugin-utils
The plugin utils package will contain the common utility functions. The structure of the package itself is as follows:
Utility Access
The utilities themselves can be access via the following code
Current Utiltites
test-utils
This package will contain common utilities needed for plugin tests.
Primer
Let me know what everyone thinks about this and any feedback regarding structure, additional utilities etc. Interested to get this thing moving!
Beta Was this translation helpful? Give feedback.
All reactions