Skip to content

ShikharY10/directutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magator Logo

directutils

Utility for directus extensions 👩🏽‍💻
Made with ❤️  by developers for developers

Welcome to the Directus Extension Utility directus. Your NPM package solution for streamlined Directus extension development!

Are you tired of the hassles that come with creating and maintaining Directus extensions? Look no further, as our utility is here to make your life easier. This comprehensive NPM package addresses two crucial challenges developers often face in the Directus ecosystem.

  • Automated Code Migration: Say goodbye to manual code copying! Our utility simplifies the process by automatically copying generated code from your dist/index.js file to your Directus repository. This time-saving feature eliminates tedious, error-prone tasks, allowing you to focus on your extension's core functionality.

  • Seamless Directus API Access: Your Directus extension deserves the power to interact with the Directus API effortlessly. Our utility equips you with a rich set of functions, enabling you to make API calls from your extension with ease. Whether you need to fetch data, create content, or manage users, we've got you covered.

Simplify your Directus extension development workflow today with our user-friendly utility. Say hello to enhanced productivity and reduced development headaches. Get started now and experience the difference!

Installation

npm install directutils

Example

Use it as file change listner

Replace the below command with "dev" script in generated package.json file of extension

{
  "scripts": {
    "dev": "concurrently \"directutils gossip <destination-file>\" \"directus-extension build -w --no-minify\""
  }
}

Be make sure replace these in above command

  • <destination-file> : Full path of the destination file in which you want the content to be copied.

Environment variable expected by this package

STATIC_ACCESS_TOKEN="directus-static-access-token"
MODE="dev-or-pro"
ENVIRONMENT="local-or-remote"
DIRECTUS_REMOTE_BASE_URL="directus-remote-url"
DIRECTUS_LOCAL_BASE_URL="http://127.0.0.1:3000"