0.0.16 • Published 4 years ago

cms-test v0.0.16

Weekly downloads
18
License
ISC
Repository
github
Last release
4 years ago

This handles updating Contentful types to keep in sync with Contentful-Translators versions.

Before using this library: All users need a Contentful Management API token. This personal access token can be generated through the Contentful Web UI, and needs to be added to the local .env file.

This token is different from the Contentful Access token as it allows for fetching and updating content models and entries.

To import Content Types to a new Contentful space:

IMPORTANT:

  • Implement environmental aliases in the new contentful space (https://www.contentful.com/developers/docs/concepts/environment-aliases/)
  • If the new contentful space already has content entries - CREATE A NEW ENVIRONMENT FROM MASTER. This will serve as a backup if the entries are overwritten.
  • In the local .env file, and the Contentful Space IDs for the reference input space and output space
  • run npm run initNewSpace

This will copy ALL content types from the reference space into the new space. Additionally, it will copy the version entry (which tracks the current version and last migration script file run against the current version).

To start a new migration:

npm run initNewMigration {filename}

This will create a new Contentful dev environment for testing, and update the repo's .env file. Additionally, it will generate the a migration file named 0001-filename.js. All content model migrations should be handled by using the Contentful Migration API within this file.

To test a new migration script against the test dev environment run the following: npm run runMigration {filename}

The file name with the file type is required. From the above example, that would be 0001-filename.js

If the content type changes look correct on the dev environment, then a new version of this repository is ready for publication.

Post publication run: npm run postPublish {new version}

The new version corresponds with the current version of this package. Running this script will create a new environment in the Contentful global space from the dev environment. It will also delete the dev environment, and update the master alias to point to the latest version environment.

0.0.10

4 years ago

0.0.11

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.14

4 years ago

0.0.15

4 years ago

0.0.16

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago