This is not a template repository for the assestment. Here you will only find the tasks to be carried out and a couple of instructions. Read them carefully
- Create an empty Contentful space
- Get Space Id
- Generate a Contentful Management Token (CMA)
- Paste the Space Id and CMA Token at
config/import.json
file. - Execute
npm install
and thennpm run import
- You should now have your space configured with 3 content types, 2 locales and several entries.
// Book Content Type
{
title: { type: 'Symbol', required: true, localized: true },
authors: { type: 'Array', required: true },
status: { type: 'Symbol' },
categories: { type: 'Array', required: true },
description: { type: 'RichText', localized: true }
}
// Category Content Type
{
name: { type: 'Symbol', required: true, localized: true },
description: { type: 'Text', localized: true }
}
// Author Content Type
{
name: { type: 'Symbol', required: true, unique: true },
nationality: { type: 'Symbol', localized: true },
biography: { type: 'Text', localized: true }
}
// Locale 1
{
"name": "English (United States)",
"code": "en-US",
}
// Locale 2
{
"name": "Spanish",
"code": "es",
}
Develop a script using the contentful-migration library. The script should be able to:
- Create a new Content Type with the following fields:
Magazine (id: magazine)
- Title (id: title): Short Text - Required, unique, localized.
- Authors (id: authors): References (author) - Required.
- Categories (id: categories): References (category) - Required.
- Publication date (id: publicationDate): Date - Required.
- Content (id: content): Long Text - Localized.
- Create an entry of the Content Type Magazine, adding values to all fields.
- Develop a script using the contentful-migration library. The script should be able to:
- Modify the already created Book content type as follows:
- Remove
Sold
as one of the validation values for thestatus
field and migrate the content withSold
value toOut of Stock
. - Add field
Pages
: TypeNumber
.
- Remove
- Modify the already created Book content type as follows:
- Use GitLab CI/CD to implement a basic pipeline that performs the build and execution of the scripts from Task 1 and Task 2 iteratively.
- Develop a Vue component that displays the entries retrieved from Contentful using the Contentful API.
- The component should be able to receive the data and render it properly in the user interface.
- Integrate the component into a simple of a Vue application.
- Develop some Unit Testing for the Vue component (Bonus Task)
- Use GitLab CI/CD to implement a basic pipeline that performs the build and deployment of a Vue application.