PHPackages                             weprovide/aviate-wordpress - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. weprovide/aviate-wordpress

AbandonedArchivedWordpress-muplugin

weprovide/aviate-wordpress
==========================

Aviate implementation for WordPress

0.1.1(8y ago)0546MITPHP

Since Sep 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/timneutkens/aviate-wordpress)[ Packagist](https://packagist.org/packages/weprovide/aviate-wordpress)[ RSS](/packages/weprovide-aviate-wordpress/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (5)Used By (0)

Aviate WordPress
================

[](#aviate-wordpress)

[Aviate](https://github.com/timneutkens/aviate) implementation for WordPress.

Installation
------------

[](#installation)

```
composer require weprovide/aviate-wordpress

```

Usage
-----

[](#usage)

```
const path = require('path')
const env = process.env.NODE_ENV || 'development'
const isDev = env === 'development'

module.exports = {
    distLocations: [
        path.join(__dirname, 'web/app/themes/yourtheme/dist')
    ],
    decorateConfig(config) {
        config.output.publicPath = isDev ? host : './'

        config.entry = Object.assign({}, config.entry, {
            'styles': [
                path.join(__dirname, 'web/app/themes/yourtheme/assets/styles/main.scss')
            ],
            'javascript': [
                path.join(__dirname, 'web/app/themes/yourtheme/assets/javascript/main.js')
            ]
        })

        return config
    }
}
```

Adding custom files
-------------------

[](#adding-custom-files)

`aviate.config.js`:

```
const path = require('path')
const env = process.env.NODE_ENV || 'development'
const isDev = env === 'development'

module.exports = {
    distLocations: [
        path.join(__dirname, 'web/app/themes/yourtheme/dist')
    ],
    decorateConfig(config) {
        config.output.publicPath = isDev ? host : './'

        config.entry = Object.assign({}, config.entry, {
            'styles': [
                path.join(__dirname, 'web/app/themes/yourtheme/assets/styles/main.scss')
            ],
            'javascript': [
                path.join(__dirname, 'web/app/themes/yourtheme/assets/javascript/main.js')
            ],
            'your-file': [
                path.join(__dirname, 'web/app/themes/yourtheme/assets/javascript/example.js')
            ]
        })

        return config
    }
}
```

`functions.php`:

```
