This repository was archived by the owner on Mar 4, 2025. It is now read-only.
File tree 19 files changed +500
-251
lines changed
19 files changed +500
-251
lines changed Original file line number Diff line number Diff line change 30
30
"validate-npm-package-name" : " ^3.0.0"
31
31
},
32
32
"devDependencies" : {
33
- "@nuxtjs/eslint-config" : " ^0 .0.1" ,
33
+ "@nuxtjs/eslint-config" : " ^1 .0.1" ,
34
34
"ava" : " ^1.2.1" ,
35
35
"eslint" : " ^5.13.0" ,
36
- "eslint-config-standard" : " ^12.0.0" ,
37
- "eslint-plugin-import" : " ^2.16.0" ,
38
- "eslint-plugin-jest" : " ^22.2.2" ,
39
- "eslint-plugin-node" : " ^8.0.1" ,
40
- "eslint-plugin-promise" : " ^4.0.1" ,
41
- "eslint-plugin-standard" : " ^4.0.0" ,
42
- "eslint-plugin-vue" : " ^5.1.0" ,
43
36
"standard-version" : " ^5.0.1"
44
37
},
45
38
"authors" : [
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ module.exports = {
116
116
default : 'universal'
117
117
}
118
118
] ,
119
- templateData ( ) {
119
+ templateData ( ) {
120
120
const pwa = this . answers . features . includes ( 'pwa' )
121
121
const eslint = this . answers . linter . includes ( 'eslint' )
122
122
const prettier = this . answers . linter . includes ( 'prettier' )
@@ -139,7 +139,7 @@ module.exports = {
139
139
pmRun
140
140
}
141
141
} ,
142
- actions ( ) {
142
+ actions ( ) {
143
143
const validation = validate ( this . answers . name )
144
144
validation . warnings && validation . warnings . forEach ( ( warn ) => {
145
145
console . warn ( 'Warning:' , warn )
@@ -217,7 +217,7 @@ module.exports = {
217
217
218
218
return actions
219
219
} ,
220
- async completed ( ) {
220
+ async completed ( ) {
221
221
this . gitInit ( )
222
222
223
223
await this . npmInstall ( { npmClient : this . answers . pm } )
Original file line number Diff line number Diff line change 109
109
"stylus-loader" : " ^3.0.2" ,
110
110
<%_ } _%>
111
111
<%_ if (eslint) { _%>
112
- "@nuxtjs/eslint-config" : " ^0 .0.1" ,
113
- "@nuxtjs/eslint-module" : " ^0.0 .1" ,
112
+ "@nuxtjs/eslint-config" : " ^1 .0.1" ,
113
+ "@nuxtjs/eslint-module" : " ^0.2 .1" ,
114
114
"babel-eslint" : " ^10.0.1" ,
115
115
"eslint" : " ^5.15.1" ,
116
- "eslint-config-standard" : " >=12.0.0" ,
117
- "eslint-plugin-import" : " >=2.16.0" ,
118
- "eslint-plugin-jest" : " >=22.3.0" ,
119
- "eslint-plugin-node" : " >=8.0.1" ,
120
116
"eslint-plugin-nuxt" : " >=0.4.2" ,
121
- "eslint-plugin-promise" : " >=4.0.1" ,
122
- "eslint-plugin-standard" : " >=4.0.0" ,
123
- "eslint-plugin-vue" : " ^5.2.2" ,
124
117
<%_ } _%>
125
118
<%_ if (prettier) { _%>
126
119
"eslint-config-prettier" : " ^4.1.0" ,
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class NuxtBuild extends Command {
10
10
*
11
11
* @return {String }
12
12
*/
13
- static get signature ( ) {
13
+ static get signature ( ) {
14
14
return 'nuxtbuild'
15
15
}
16
16
@@ -20,7 +20,7 @@ class NuxtBuild extends Command {
20
20
*
21
21
* @return {String }
22
22
*/
23
- static get description ( ) {
23
+ static get description ( ) {
24
24
return 'Build for production the nuxt.js application.'
25
25
}
26
26
@@ -31,7 +31,7 @@ class NuxtBuild extends Command {
31
31
* @param {Object } args [description]
32
32
* @param {Object } options [description]
33
33
*/
34
- async handle ( args , options ) {
34
+ async handle ( args , options ) {
35
35
const nuxt = use ( 'Service/Nuxt' )
36
36
this . info ( 'Building nuxt.js application...' )
37
37
await new Builder ( nuxt ) . build ( )
Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
3
class NuxtController {
4
- constructor ( ) {
4
+ constructor ( ) {
5
5
this . nuxt = use ( 'Service/Nuxt' )
6
6
}
7
7
8
- async render ( { request : { request : req } , response : { response : res } } ) {
8
+ async render ( { request : { request : req } , response : { response : res } } ) {
9
9
await new Promise ( ( resolve , reject ) => {
10
10
this . nuxt . render ( req , res , ( promise ) => {
11
11
promise . then ( resolve ) . catch ( reject )
Original file line number Diff line number Diff line change 3
3
const Model = use ( 'Model' )
4
4
5
5
class User extends Model {
6
- static boot ( ) {
6
+ static boot ( ) {
7
7
super . boot ( )
8
8
9
9
/**
@@ -26,7 +26,7 @@ class User extends Model {
26
26
*
27
27
* @return {Object }
28
28
*/
29
- tokens ( ) {
29
+ tokens ( ) {
30
30
return this . hasMany ( 'App/Models/Token' )
31
31
}
32
32
}
Original file line number Diff line number Diff line change @@ -2,14 +2,14 @@ const { ServiceProvider } = require('@adonisjs/fold')
2
2
const { Nuxt, Builder } = require ( 'nuxt<%= edge %>' )
3
3
4
4
class NuxtProvider extends ServiceProvider {
5
- register ( ) {
5
+ register ( ) {
6
6
this . app . singleton ( 'Service/Nuxt' , ( ) => {
7
7
const config = this . app . use ( 'Config' ) . get ( 'nuxt' )
8
8
return new Nuxt ( config )
9
9
} )
10
10
}
11
11
12
- async boot ( ) {
12
+ async boot ( ) {
13
13
const Helpers = this . app . use ( 'Helpers' )
14
14
if ( ! Helpers . isAceCommand ( ) ) {
15
15
const nuxt = this . app . use ( 'Service/Nuxt' )
Original file line number Diff line number Diff line change 54
54
55
55
<script >
56
56
export default {
57
- data () {
57
+ data () {
58
58
return {
59
59
items: [
60
60
{
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const app = express()
7
7
const config = require ( '../nuxt.config.js' )
8
8
config . dev = process . env . NODE_ENV !== 'production'
9
9
10
- async function start ( ) {
10
+ async function start ( ) {
11
11
// Init Nuxt.js
12
12
const nuxt = new Nuxt ( config )
13
13
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const fastify = require('fastify')({
7
7
const config = require ( '../nuxt.config.js' )
8
8
config . dev = process . env . NODE_ENV !== 'production'
9
9
10
- async function start ( ) {
10
+ async function start ( ) {
11
11
// Instantiate nuxt.js
12
12
const nuxt = new Nuxt ( config )
13
13
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const express = require('@feathersjs/express')
6
6
7
7
process . env . NODE_CONFIG_DIR = path . join ( __dirname , 'config/' )
8
8
9
- async function start ( ) {
9
+ async function start ( ) {
10
10
const app = express ( feathers ( ) )
11
11
12
12
const { Nuxt, Builder } = require ( 'nuxt<%= edge %>' )
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ const consola = require('consola')
2
2
const Hapi = require ( '@hapi/hapi' )
3
3
const HapiNuxt = require ( '@nuxtjs/hapi' )
4
4
5
- async function start ( ) {
5
+ async function start ( ) {
6
6
const server = new Hapi . Server ( {
7
7
host : process . env . HOST || '127.0.0.1' ,
8
8
port : process . env . PORT || 3000
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ const app = new Koa()
8
8
const config = require ( '../nuxt.config.js' )
9
9
config . dev = app . env !== 'production'
10
10
11
- async function start ( ) {
11
+ async function start ( ) {
12
12
// Instantiate nuxt.js
13
13
const nuxt = new Nuxt ( config )
14
14
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ const consola = require('consola')
3
3
const dispatch = require ( 'micro-route/dispatch' )
4
4
const { Nuxt, Builder } = require ( 'nuxt<%= edge %>' )
5
5
6
- async function start ( ) {
6
+ async function start ( ) {
7
7
// Require nuxt config
8
8
const config = require ( '../nuxt.config.js' )
9
9
Original file line number Diff line number Diff line change 90
90
91
91
<script >
92
92
export default {
93
- data () {
93
+ data () {
94
94
return {
95
95
clipped: false ,
96
96
drawer: false ,
Original file line number Diff line number Diff line change @@ -21,14 +21,14 @@ export default {
21
21
default: null
22
22
}
23
23
},
24
- head () {
24
+ head () {
25
25
const title =
26
26
this .error .statusCode === 404 ? this .pageNotFound : this .otherError
27
27
return {
28
28
title
29
29
}
30
30
},
31
- data () {
31
+ data () {
32
32
return {
33
33
pageNotFound: ' 404 Not Found' ,
34
34
otherError: ' An error occurred'
Original file line number Diff line number Diff line change @@ -342,18 +342,11 @@ Generated by [AVA](https://ava.li).
342
342
nuxt: '^2.0.0',
343
343
},
344
344
devDependencies: {
345
- '@nuxtjs/eslint-config': '^0 .0.1',
346
- '@nuxtjs/eslint-module': '^0.0 .1',
345
+ '@nuxtjs/eslint-config': '^1 .0.1',
346
+ '@nuxtjs/eslint-module': '^0.2 .1',
347
347
'babel-eslint': '^10.0.1',
348
348
eslint: '^5.15.1',
349
- 'eslint-config-standard': '>=12.0.0',
350
- 'eslint-plugin-import': '>=2.16.0',
351
- 'eslint-plugin-jest': '>=22.3.0',
352
- 'eslint-plugin-node': '>=8.0.1',
353
349
'eslint-plugin-nuxt': '>=0.4.2',
354
- 'eslint-plugin-promise': '>=4.0.1',
355
- 'eslint-plugin-standard': '>=4.0.0',
356
- 'eslint-plugin-vue': '^5.2.2',
357
350
nodemon: '^1.18.9',
358
351
},
359
352
private: true,
You can’t perform that action at this time.
0 commit comments