@artizy-io/strapi-utils
@artizy-io/strapi-utils
exposes the smerge
utility allowing to create a strapi backend application as a combination
of multiple strapi templates.
It also allows to use template as versioned packages and thus benefit from template updates.
smerge
should be invoked as a post-install step in the backend application package.json
file.
Usage
smerge
utility requires a strapi patch
which is applied in the postinstall
step of the npm/yarn process.
The command line patch-strapi
applies the required patch (provided in the patches
directory) either in a monorepo or a non-monorepo project.
The smerge
merges following directories from multiple strapi templates.
Supported templates are the regular strapi templates but also @artizy-io templates
which can include config
and extensions
directories.
+-- api
+-- components
+-- config
+-- env
+-- production
server.js
database.js
plugins.js :
server.js
+-- data
+-- extensions
to use the smerge
utility and combine multiple strapi templates, update your backend strapi application with:
package.json:
"dependencies": {
"@artizy-io/strapi-template-blog": "^1.0.0",
"@artizy-io/strapi-template-ecommerce": "^1.0.0",
"@artizy-io/strapi-template-corporate": "^1.0.0",
...
"strapi-plugin-import-content": "npm:@artizy-io/strapi-plugin-import-content@1.0.3",
"strapi-provider-upload-aws-s3-with-endpoint": "npm:@artizy-io/strapi-provider-upload-aws-s3-with-endpoint@3.4.3",
...
},
"devDependencies": {
"@artizy-io/strapi-utils":"^1.0.0"
},
"scripts": {
"postinstall": "yarn run smerge",
...
},