Add basic module integration

This commit is contained in:
Pooya Parsa 2017-05-11 14:34:15 +04:30
parent 252e5cce0a
commit 9db29942e6
2 changed files with 12 additions and 0 deletions

9
lib/module.js Executable file
View File

@ -0,0 +1,9 @@
'use strict'
class Module {
constructor (nuxt) {
this.nuxt = nuxt
}
}
export default Module

View File

@ -6,6 +6,7 @@ import compression from 'compression'
import fs from 'fs-extra'
import pify from 'pify'
import Server from './server'
import Module from './module'
import * as build from './build'
import * as render from './render'
import generate from './generate'
@ -111,6 +112,8 @@ class Nuxt {
this.generate = generate.bind(this)
// Add this.utils (tests purpose)
this.utils = utils
// Add module integration
this.module = new Module(this)
return this
}