open-index/open-npm huggingface dataset:
npm package: @motorjs/engine
Description: motor engine
Author: @mouafa
Latest version: 3.3.3

# Motor Engine
> NOTE: if you are using @motorjs/cli you don't need to install this

## Installation
using yarn
```bash
yarn add @motorjs/engine
```

using npm
```bash
npm i -S @motorjs/engine
```

## Usage

```js
const motor = require('@motorjs/engine')

const motorConfig = {
  templatesDir : path.resolve('templates'),
  outputDir : path.resolve('output'),
  viewsDir : path.resolve('views'),

  plugins: [
    new Pug()
    new Html()
  ]
}

motor(motorConfig)
```
npm package: @motorjs/plugin-contentful
Description: motor engine
Author: @mouafa
Latest version: 3.3.3

# Motor plugin-contentful

## Installation
using yarn
```bash
yarn add @motorjs/plugin-contentful
```

using npm
```bash
npm i -S @motorjs/plugin-contentful
```

## Usage

```js
const motor = require('@motorjs/engine')
const Contentful = require('@motorjs/plugin-contentful')

const isDevMode = process.env.NODE_ENV === 'development'

const motorConfig = {
  templatesDir : path.resolve('templates'),
  outputDir : path.resolve('output'),
  viewsDir : path.resolve('views'),

  plugins: [
    new Contentful({
      config: {
        space: process.env.SPACE_ID,
        accessToken: process.env.ACCESS_TOKEN
        host: isDevMode ? 'preview.contentful.com' : 'cdn.contentful.com',
        include: 2 // level of children nodes to be included in contentful json (default is 1)
      },
      mode: isDevMode ? 'filesystem' : 'generator',
      contentType: 'landingPage',
      singleTemplate: 'lorem-ipsum' // template to be used (optional, needed only for single microsites not included in marketing landing pages system)
    })
    // other plugins
  ]
}

motor(motorConfig)
```