https://github.com/phrase/tms-contentful-integration
https://github.com/phrase/tms-contentful-integration
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/phrase/tms-contentful-integration
- Owner: phrase
- Created: 2022-07-29T09:25:53.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-19T11:30:19.000Z (over 3 years ago)
- Last Synced: 2025-02-06T07:13:12.940Z (over 1 year ago)
- Language: TypeScript
- Size: 342 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Installation
#### `npm install`
### Available Scripts
In the project directory, you can run:
#### `npm start`
Creates or updates your app definition in Contentful, and runs the app in development mode.
Open your app to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
#### `npm run build`
Builds the app for production to the `build` folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
#### `npm run upload`
Uploads the build folder to contentful and creates a bundle that is automatically activated.
The command guides you through the deployment process and asks for all required arguments.
Read [here](https://www.contentful.com/developers/docs/extensibility/app-framework/create-contentful-app/#deploy-with-contentful) for more information about the deployment process.
#### `npm run upload-ci`
Similar to `npm run upload` it will upload your app to contentful and activate it. The only difference is
that with this command all required arguments are read from the environment variables, for example when you add
the upload command to your CI pipeline.
For this command to work, the following environment variables must be set:
- `CONTENTFUL_ORG_ID` - The ID of your organization
- `CONTENTFUL_APP_DEF_ID` - The ID of the app to which to add the bundle
- `CONTENTFUL_ACCESS_TOKEN` - A personal [access token](https://www.contentful.com/developers/docs/references/content-management-api/#/reference/personal-access-tokens)