Coder Social home page Coder Social logo

dieproduktmacher / contentful-tooling Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 27 KB

Collection of useful packages for easier and standardised integration of Contentful based web applications

Home Page: https://www.dieproduktmacher.com/

License: MIT License

TypeScript 99.60% JavaScript 0.40%
cli contentful migrations-runner

contentful-tooling's Introduction

Logo DPM

DPM Contentful Tooling

About The Project

This repository is used as a collection for useful contentful tools. The first tool added, is a migration tool to support schema creation in CI/CD.

Getting Started

Prerequisites

  • Make sure Node.js (>= v18) and NPM NPM is installed
  • Set up / Access to a Contentful space with read / write permissions

Setup

  1. Clone this repository

  2. Run npm install on root level (it's a monorepo using npm workspaces)

  3. Create a new .env file based on the .env.sample file from the root folder of this repo and add your contentful credentials:

      CONTENTFUL_SPACE = **SPACE_ID**
      CONTENTFUL_MANAGEMENT_TOKEN = **PERSONAL_ACCESS_TOKEN**
    

Troubleshooting

Usage

Migration Tool (Contentful Schema CI/CD)

Run the migration tool via npm run migration-tool <args...> with the following argument options:

deployProd

deploy new version of production environment by running all new migrations

deployStage

run new migrations on the current staging environment

ciTestMigrations

test new migrations by running them against a new temporary ci environment

resetStage

delete the contents of the stage environment and reset it to the state of the current master environment

createMigration <name>

create a new migration file

diffContentTypes <environment1> <environment2>

compares the content types of environment1 with environment2 based on a JSON file comparison

generateTypeDefinitions <environment>

generates typescript types from all content types in the given environment. Types based on contentful.js library types.

listEnvironments

list all available environments
How to test if everything is set up correctly?

To test the the migration tool is setup correctly and is connected to the contentful space, you can run npm run migration-tool listEnvironments and you should see a table with all created environments on your contentful space.

Roadmap

Order of the following list does not necessarily represent prioritization

Migrations

  • Publish as installable / executable NPM package
  • Make it backwards compatibility with Contentful CLI < 10
  • Add example migrations based on commonly used content types, e.g. Page Metadata, CTA, Accordeon, Tabs, MediaWrapper
  • Create a documentation page
  • Generalise deploy{Env} / reset{Env} scripts

Other packages

  • Add CSV (Excel, Numbers) to JSON Converter for content imports

Contact

DieProduktmacher GmbH Hofmannstraße 7a 81379 Munich

E-Mail: code[at]produktmacher.com Website: www.dieproduktmacher.com

contentful-tooling's People

Contributors

timmyjs avatar

Stargazers

 avatar

Watchers

Robbie Redfearn avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.