Initial Strapi plugin project

This commit is contained in:
2026-02-05 10:19:56 +00:00
parent f6de861195
commit efa89313fa
100 changed files with 48612 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
import type { Core } from '@strapi/strapi';
const bootstrap = ({ strapi }: { strapi: Core.Strapi }) => {
// bootstrap phase
};
export default bootstrap;
+4
View File
@@ -0,0 +1,4 @@
export default {
default: {},
validator() {},
};
+1
View File
@@ -0,0 +1 @@
export default {};
+13
View File
@@ -0,0 +1,13 @@
import type { Core } from '@strapi/strapi';
const controller = ({ strapi }: { strapi: Core.Strapi }) => ({
index(ctx) {
ctx.body = strapi
.plugin('strapi-plugin-checkbox-list')
// the name of the service file & the method.
.service('service')
.getWelcomeMessage();
},
});
export default controller;
+5
View File
@@ -0,0 +1,5 @@
import controller from './controller';
export default {
controller,
};
+7
View File
@@ -0,0 +1,7 @@
import type { Core } from '@strapi/strapi';
const destroy = ({ strapi }: { strapi: Core.Strapi }) => {
// destroy phase
};
export default destroy;
+30
View File
@@ -0,0 +1,30 @@
/**
* Application methods
*/
import bootstrap from './bootstrap';
import destroy from './destroy';
import register from './register';
/**
* Plugin server methods
*/
import config from './config';
import contentTypes from './content-types';
import controllers from './controllers';
import middlewares from './middlewares';
import policies from './policies';
import routes from './routes';
import services from './services';
export default {
register,
bootstrap,
destroy,
config,
controllers,
routes,
services,
contentTypes,
policies,
middlewares,
};
+1
View File
@@ -0,0 +1 @@
export default {};
+1
View File
@@ -0,0 +1 @@
export default {};
+7
View File
@@ -0,0 +1,7 @@
import type { Core } from '@strapi/strapi';
const register = ({ strapi }: { strapi: Core.Strapi }) => {
// register phase
};
export default register;
+4
View File
@@ -0,0 +1,4 @@
export default () => ({
type: 'admin',
routes: [],
});
+14
View File
@@ -0,0 +1,14 @@
export default () => ({
type: 'content-api',
routes: [
{
method: 'GET',
path: '/',
// name of the controller file & the method.
handler: 'controller.index',
config: {
policies: [],
},
},
],
});
+9
View File
@@ -0,0 +1,9 @@
import contentAPIRoutes from './content-api';
import adminAPIRoutes from './admin';
const routes = {
'content-api': contentAPIRoutes,
admin: adminAPIRoutes,
};
export default routes;
+5
View File
@@ -0,0 +1,5 @@
import service from './service';
export default {
service,
};
+9
View File
@@ -0,0 +1,9 @@
import type { Core } from '@strapi/strapi';
const service = ({ strapi }: { strapi: Core.Strapi }) => ({
getWelcomeMessage() {
return 'Welcome to Strapi 🚀';
},
});
export default service;
+10
View File
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig",
"include": ["./src"],
"exclude": ["**/*.test.ts"],
"compilerOptions": {
"rootDir": "../",
"baseUrl": ".",
"outDir": "./dist"
}
}
+8
View File
@@ -0,0 +1,8 @@
{
"extends": "@strapi/typescript-utils/tsconfigs/server",
"include": ["./src"],
"compilerOptions": {
"rootDir": "../",
"baseUrl": "."
}
}