Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@content-app/core

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@content-app/core - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

4

package.json
{
"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;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc