Getting Started With Nuxt.js (Manual)
There are two ways that you can install and get started with Nuxt.js. The first way is to install it manually with an NPM command. Installing it manually will also require you to create config files and directories yourself in order to take full advantage of Nuxt.
First, let’s create a project directory called, project-name
. Inside of your new project-name
directory, create a package.json
file in the root directory and paste the following code in it. This tells your new project how to run Nuxt.
$
mkdir project-name
package.json
{
"name"
:
"project-name"
,
"scripts"
:
{
"dev"
:
"nuxt"
}
}
Next, run the following command to install the Nuxt package.
$
npm install nuxt --save# or
$
yarn add nuxt
Once that is done, create another directory called “pages”. This directory is required and will generate a route for every Vue Component that lives here. You should also create...