Using this template
-
Clone this repo locally
npx degit https://github.com/nuxt-community/module-template.git my-new-project cd my-new-project yarn # or npm install
-
Search and replace all templated names:
npm_package
=> the name of your chosen npm package - e.g.@nuxtjs/http
myModule
=> a camel-cased version of your npm package for namespacing your module options - e.g.http
github_repo
=> your GitHub repo - e.g.nuxt-community/http-module
-
Remove this section of the
README.md
and dive in!
npm_package
Setup
- Add
npm_package
dependency to your project
yarn add npm_package # or npm install npm_package
- Add
npm_package
to themodules
section ofnuxt.config.js
{
modules: [
'npm_package',
],
myModule: {
// module options
}
}
Development
- Clone this repository
- Install dependencies using
yarn install
- Start development server using
yarn dev