@nuxt/theme
[![npm version][npm-v-src]][npm-v-href] [![npm downloads][npm-d-src]][npm-d-href] [![ci][ci-src]][ci-href]
Last updated 2 months ago by atinux .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @nuxt/theme 
SYNC missed versions from official npm registry.

@nuxt/theme

npm version npm downloads ci

Add theme/extends support to Nuxt 2 projects!

Features

  • Forward compatible with Nuxt 3 multi Apps
  • Support nested extends
  • Smartly merge config and hooks
  • Allow theme development to be like a normal nuxt project

Usage

Common Setup

Install @nuxt/theme as a dependency:

# yarn
yarn add @nuxt/theme

# npm
npm i @nuxt/theme

Update nuxt.config file:

import { resolveConfig } from '@nuxt/theme'

export default resolveConfig({
  // Your actual Nuxt configuration
})

Theme Consumer

Use extends key in nuxt.config:

import { resolveConfig } from '@nuxt/theme'

export default resolveConfig({
  extends: '@nuxt/docs-theme',
})

Theme Author

  1. Update nuxt.config and ensure required rootDir and name properties are provided
import { resolveConfig } from '@nuxt/theme'

export default resolveConfig({
  rootDir: __dirname,
  name: 'myTheme',
}

Note: If you are extending another theme, rootDir should be ONLY provided if you want to also extend project.

  1. Instead of using ~/ or @/ aliases, use ~myTheme or @myTheme

License

MIT. Made with ????

Current Tags

  • 0.0.2                                ...           latest (2 months ago)

3 Versions

  • 0.0.2                                ...           2 months ago
  • 0.0.1                                ...           2 months ago
  • 0.0.0                                ...           2 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (3)
Dev Dependencies (13)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |