@content-app/core
Advanced tools
Comparing version 0.1.3 to 0.1.4
{ | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"license": "MIT", | ||
@@ -22,3 +22,2 @@ "typings": "dist/index.d.ts", | ||
}, | ||
"peerDependencies": {}, | ||
"husky": { | ||
@@ -58,2 +57,3 @@ "hooks": { | ||
"dependencies": { | ||
"@content-app/types": "^0.1.0", | ||
"contentful": "^9.3.3", | ||
@@ -60,0 +60,0 @@ "contentful-management": "^10.29.3" |
@@ -38,2 +38,26 @@ <h1 align="center">content-app/core</h1> | ||
# Modules | ||
There are several ways to hook into the system. | ||
For example, you might want to implement a module that installs one or more content types, | ||
or you may want to add more pages, or you may want to add more data. | ||
Even though there will be a page for every page contentype, there could be cases when you want to add your own. | ||
# Modules - Add you own content types | ||
If you want to use this feature you need to install the cli https://github.com/content-app/cli. | ||
- First you need to install the module via npm. For example: `npm install module-content-stage` | ||
- Then you can use the command `content-app load-content-module <contentModule>`. | ||
- This command will look after this file in the current path: `node_modules/@content-app/content-module_${contentModule}/install.js` | ||
- The command will then import the exported function and call it with following arguments: client, space, environment | ||
So your install.js might start like this. | ||
```js | ||
module.exports = async function({ client, space, environment }) { | ||
const myEntry = await environment.createContentTypeWithId({... your configs}, 'MyContentypeId'); | ||
await myEntry.publish(); | ||
}; | ||
``` | ||
import { ContentfulClientApi } from 'contentful'; | ||
import { ContentModule } from '../modules/content/index.d'; | ||
import { ContentModule } from '@content-app/types/types.d'; | ||
import { PageModule } from '../modules/page/index.d'; | ||
export type FetchPageConfig = { | ||
@@ -8,0 +6,0 @@ slug: string; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
219482
63
3
50
3208
+ Added@content-app/types@^0.1.0
+ Added@content-app/types@0.1.0(transitive)