Skip to content

Commit

Permalink
feat(app): init app
Browse files Browse the repository at this point in the history
  • Loading branch information
larsdouweschuitema committed Feb 15, 2021
1 parent 8efc953 commit e1fcf84
Show file tree
Hide file tree
Showing 9 changed files with 8,232 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.nuxt
sw.*
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Personal nuxt playground
Copyright (c) 2021 Lars Douwe Schuitema

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
82 changes: 80 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,80 @@
# nuxt-config-boilerplate
A reusable and extendable Nuxt configuration boilerplate
<div align="center">
<h1>Performant and reusable Nuxt barebone boilerplate</h1>
</div>

## Table of contents

- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Commands](#commands)
- [Server deployment](#server-deployment)
- [Technology stack](#technology-stack)
- [Features](#features)
- [Google Lighthouse score](#google-lighthouse-score)
- [Licenses](#licenses)

## Prerequisites

Make sure you have installed all of the following prerequisites on your development machine:

- Node.js - [Download & Install Node.js](https://nodejs.org/en/download/)
- Yarn package manager - [Download & Install Yarn](https://yarnpkg.com/en/docs/install#mac-stable)

## Installation

Clone repository and run project locally:

```bash
$ git clone [email protected]:larsdouweschuitema-nuxt/nuxt-config-boilerplate.git # Clone project using SSH
$ cd funda-clone # Change directory
$ yarn install # Install required dependencies
```

## Commands

Launch development server
```
$ yarn dev
```

Build and optimize your application with webpack for production
```
$ yarn build
```

Start the production server (after running `yarn build`).

```
$ yarn start
```

## Server deployment
Build and start application for Production purposes

```
$ yarn build
$ yarn start
```

## Technology stack
- High level framework `nuxt`
- TypeScript `@nuxt/types`, `@nuxt/typescript-build`

## Features
- Disable unused core minimal Nuxt features
- All client side code living in `client/` directory

## Google Lighthouse score

- Performance - 100
- Accessibility - 100
- Best practices - 100
- SEO - 100

For this boilerplate we are not including the Progressive Web App. You can add this yourself easily by installing
`@nuxtjs/pwa` and creating `static/` directory inside the `client/` directory if you have enabled the service worker, which
is enabled by default.

## Licenses

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
5 changes: 5 additions & 0 deletions client/pages/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<div>
<h1>Hello world!</h1>
</div>
</template>
4 changes: 4 additions & 0 deletions client/types/vue-shim.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module "*.vue" {
import Vue from 'vue'
export default Vue
}
33 changes: 33 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { NuxtConfig } from '@nuxt/types'

const config: NuxtConfig = {
srcDir: 'client/',
buildModules: ['@nuxt/typescript-build'],
components: true,
loading: false,
loadingIndicator: false,
fetch: {
client: false,
server: false
},
features: {
store: false,
middleware: false,
transitions: false,
deprecations: false,
validate: false,
asyncData: false,
fetch: false,
clientOnline: false,
clientPrefetch: false,
clientUseUrl: true,
componentAliases: false,
componentClientOnly: false
},
build: {
indicator: false,
terser: true
}
}

export default config
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@larsdouweschuitema-nuxt/nuxt-config-boilerplate",
"version": "1.0.0",
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"generate": "nuxt generate",
"start": "nuxt start"
},
"dependencies": {
"nuxt": "^2.15.0"
},
"devDependencies": {
"@nuxt/types": "^2.15.0",
"@nuxt/typescript-build": "^2.0.4",
"@nuxtjs/pwa": "^3.3.5"
}
}
33 changes: 33 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"compilerOptions": {
"target": "ES2018",
"module": "ESNext",
"moduleResolution": "Node",
"lib": [
"ESNext",
"ESNext.AsyncIterable",
"DOM"
],
"esModuleInterop": true,
"allowJs": true,
"sourceMap": true,
"strict": true,
"noEmit": true,
"baseUrl": ".",
"paths": {
"~/*": [
"./*"
],
"@/*": [
"./*"
]
},
"types": [
"@types/node",
"@nuxt/types"
]
},
"exclude": [
"node_modules"
]
}
Loading

0 comments on commit e1fcf84

Please sign in to comment.