These are the building directories for directus extensions
- cd the directory of the needed extension type (e.g: endpoint)
- create a source file
./src/<extensionname.js>
- create a destination folder in the project extensions
extension/<extensiontype>/<extensionname>/
- each extension type has an
.envrc
file where you set the source and path for each extension.
- build it using
npx directus-extension build -i $SOURCE_EXT -o $PATH_EXT
- you can take a a step further by adding
-w
for auto building (this with autoreload in the directus project = love)
- for easier debuggin don't minify the output :
--no-minify
The final build command there for would be
# cd extensiontype (e.g: endpoint)
npx directus-extension build -i $SOURCE_COPYSTUDENT -o $PATH_COPYSTUDENT -w --no-minify