https://github.com/aleksac/directus-api-extensions-typescript
Webpack config for writing directus api extensions in typescript with hot reloading
https://github.com/aleksac/directus-api-extensions-typescript
directus directus-extension hacktoberfest typescript webpack
Last synced: 6 months ago
JSON representation
Webpack config for writing directus api extensions in typescript with hot reloading
- Host: GitHub
- URL: https://github.com/aleksac/directus-api-extensions-typescript
- Owner: AleksaC
- License: mit
- Archived: true
- Created: 2021-10-18T20:14:31.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-06T23:47:34.000Z (almost 4 years ago)
- Last Synced: 2025-04-17T08:33:31.424Z (6 months ago)
- Topics: directus, directus-extension, hacktoberfest, typescript, webpack
- Language: TypeScript
- Homepage:
- Size: 506 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Directus hook typescript example
**Update:** This was created before `v9.0.0` of directus which changed the way
extensions are registered. The code here may still work on new versions, but
I'll still try to update it if I have time.[Directus](https://directus.io/) is a good choice if you need to provide a simple
CRUD dashboard for your project without having to build one yourself or shoehorning
a CMS on top of the existing database.Directus provides a lot of the stuff out of the box, and it can be configured
through the ui and environment variables. In addition to that it can be further
customized by using [extensions](https://docs.directus.io/extensions/introduction/).
Currently directus doesn't support building hooks in typescript. In addition to
that you have to manually restart directus server in order to see the changes
you made to the exension.This repository provides a webpack config that bundles extensions built in
typescript and puts the outputs where directs would expect them to be and
restarts the server after emitting the bundle. Only hooks example is available
at the moment, but other extension types should be easily supported with a few
tweaks to the webpack config and I might add them later.## Getting started
The easiest way to run this example is by using `docker-compose`. Run the
following command to get the example up and running:```shell
git clone git@github.com:AleksaC/directus-api-extensions-typescript.git
cd directus-api-extensions-typescript
cp example/.env.example example/.env
./bootstrap.sh
```## Contact 🙋♂️
- [Personal website](https://aleksac.me)
-![]()
- aleksacukovic1@gmail.com