Skip to content
Nuxt.js + Egg FrameWork
Branch: master
Clone or download
liyanlong Merge pull request #8 from binsee/fix-hot-reload
fix: webpack hot reload in dev mode
Latest commit 3c130f1 Jun 29, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
config resolve bug Feb 26, 2017
lib Release 0.1.5 Feb 26, 2017
test Test: bug resolved Feb 25, 2017
.eslintignore first commit Feb 18, 2017
.eslintrc first commit Feb 18, 2017
.gitignore
.travis.yml remove cache Feb 25, 2017
LICENSE Create LICENSE Feb 24, 2017
README.md Docs: update README.md Feb 27, 2017
agent.js Release 0.1.6 Feb 26, 2017
app.js fix: webpack hot reload in dev mode Jun 26, 2017
index.js
package.json Release 0.1.6 Feb 26, 2017

README.md

Egg-Nuxt

Egg + Nuxt.js = 🔥

NPM version build status Test coverage David deps npm download lincense image

Requirement

  • node >= 6.0.0

Quick Usage

$ npm install -g vue-cli
$ vue init nuxt-egg/starter my_project
or 
$ npm install -g egg-init
$ egg-init --package=egg-boilerplate-nuxt my_project

$ cd my_prject
$ npm install
$ npm run dev

Direct Structure

Look at egg-framework

nuxt-egg-project
├── .nuxt
├── resources
|   ├── pages
│   ├── assets
│   |   └── css
│   |   └── img
│   ├── static
│   ├── layouts
│   ├── middleware
│   ├── plugins
│   ├── components
├── package.json
├── app.js (option)
├── agent.js (option)
├── app
|   ├── router.js
│   ├── controller
│   |   └── home.js
│   ├── service (option)
│   |   └── user.js
│   ├── middleware (option)
│   |   └── response_time.js
│   ├── schedule (option)
│   |   └── my_task.js
│   ├── public (option)
│   |   └── reset.css
│   ├── view (option)
│   |   └── home.tpl
│   └── extend (option)
│       ├── helper.js (option)
│       ├── request.js (option)
│       ├── response.js (option)
│       ├── context.js (option)
│       ├── application.js (option)
│       └── agent.js (option)
├── config
|   ├── plugin.js
|   ├── config.default.js
│   ├── config.prod.js
|   ├── config.test.js (option)
|   ├── config.local.js (option)
|   └── config.unittest.js (option)
└── test
    ├── middleware
    |   └── response_time.test.js
    └── controller
        └── home.test.js

Nuxt.js Changes

  • The Nuxt config file is now in config.[dev].js, dev allow set default, unittest, local, prod
  • The Nuxt project directory is resources (default)

config.default.js

const path = require('path');
exports.nuxt = {
  srcDir: path.join(__dirname, '../resources'),
  rootDir: path.dirname(__dirname),
}

Or you can also do this

// config/config.default.js
exports.nuxt = require('./config.nuxt.js');

// config/config.nuxt.js
module.exports = {
  srcDir: ''
  rootDir: ''
}

Live Demo

Documentation

Licenses

Note

  • egg-init doesn't support download image now, so the logo.png will not be open normal.
You can’t perform that action at this time.