open-index/open-npm huggingface dataset:
npm package: @motorjs/plugin-copy
Description: motor plugin copy
Latest version: 3.3.3

# Motor plugin-copy

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

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

## Usage

```js
const motor = require('@motorjs/engine')
const Copy = require('@motorjs/plugin-copy')

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

  plugins: [
    new Copy()
    // other plugins
  ]
}

motor(motorConfig)
```

by default Copy will copy evrything from  ```path.join(templatesDir, template, 'assets')``` to ```path.join(outputDir, `${lang}-${country}/${filename}/assets`)```
npm package: @motorjs/plugin-html
Description: motor plugin html
Latest version: 3.3.3

# Motor plugin-html

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

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

## Usage

```js
const motor = require('@motorjs/engine')
const Html = require('@motorjs/plugin-html')

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

  plugins: [
    new Html()
    // other plugins
  ]
}

motor(motorConfig)
```

by default Html will save the html file to ```path.join(outputDir, `${lang}-${country}/${filename}/index.html`)```
npm package: @motorjs/plugin-i18n
Description: motor plugin i18n
Latest version: 3.3.3

# Motor plugin-html

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

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

## Usage

```js
const motor = require('@motorjs/engine')
const I18n = require('@motorjs/plugin-i18n')

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

  plugins: [
    new I18n({
      translations: {
        en: require('./i18n/en.json'),
        de: require('./i18n/de.json')
      }
    }),
    // other plugins
  ]
}

motor(motorConfig)
```

this plugin will add `__` and `__l` to the context of the page

* `__` is an alias of `malal`
* `__l` is used to change the link path according to the current page language and country

```js
// lang >> en
// country >> gb
__l('/de-de/shop')  // >> /en-gb/shop
```
npm package: @motorjs/plugin-pug
Description: motor pug render
Latest version: 3.3.3

# Motor plugin-pug
pug template based renderer for motor


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

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

## Usage

```js
const motor = require('@motorjs/engine')
const Pug = require('@motorjs/plugin-pug')

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

  plugins: [
    new Pug()
    // other plugins
  ]
}

motor(motorConfig)
```
npm package: @motorjs/plugin-s3
Description: motor plugin copy
Latest version: 3.3.3

# Motor plugin-s3
push static site to S3 after rendering

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

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

## Usage

```js
const motor = require('@motorjs/engine')
const S3 = require('@motorjs/plugin-s3')

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

  plugins: [
    new S3({
      s3Options: {
        accessKeyId: process.env.AWS_ACCESS,
        secretAccessKey: process.env.AWS_SECRET,
        region: '<aws-region>',
      },
      bucket: '<bucjet-name>',
      prefix: '<optional-prefix>',
    })
  ]
}

motor(motorConfig)
```
npm package: @motorjs/plugin-server
Description: motor plugin server
Latest version: 3.3.3

# Motor plugin-server
On demand rendering server based on hapi.js


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

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

## Usage

```js
const motor = require('@motorjs/engine')
const Server = require('@motorjs/plugin-server')

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

  plugins: [
     new Server({
      webhook: '/webhook', // in case you want the webhook to update the structure
    })
  ]
}

motor(motorConfig)
```