Skip to content
This repository was archived by the owner on Oct 13, 2020. It is now read-only.

Commit 5569d43

Browse files
committed
chore: upgrade dependencies
1 parent 7a4cd47 commit 5569d43

21 files changed

+1460
-1469
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
!.*.js

.eslintrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
extends: [
3+
'standard'
4+
]
5+
}

.eslintrc.yml

-2
This file was deleted.

bin/laravel-nuxt-build.js

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
#!/usr/bin/env node
2-
const program = require("commander");
3-
const spawn = require("cross-spawn");
4-
const which = require("npm-which")(__dirname);
5-
const utils = require("../src/utils");
6-
const pkg = require("../package.json");
2+
const program = require('commander')
3+
const spawn = require('cross-spawn')
4+
const which = require('npm-which')(__dirname)
5+
const utils = require('../src/utils')
6+
const pkg = require('../package.json')
77

88
program
9-
.version(pkg.version)
10-
.description("Compiles the application for production deployment")
11-
.option(
12-
"-a, --analyze",
13-
"Launch webpack-bundle-analyzer to optimize your bundles",
14-
)
15-
.parse(process.argv);
9+
.version(pkg.version)
10+
.description('Compiles the application for production deployment')
11+
.option(
12+
'-a, --analyze',
13+
'Launch webpack-bundle-analyzer to optimize your bundles'
14+
)
15+
.parse(process.argv)
1616

17-
utils.validateConfig();
17+
utils.validateConfig()
1818

1919
const build = spawn.sync(
20-
which.sync("nuxt"),
21-
["build", `-c=${utils.configPath}`, "--spa", program.analyze ? "-a" : ""],
22-
{
23-
stdio: "inherit",
24-
},
25-
);
20+
which.sync('nuxt'),
21+
['build', `-c=${utils.configPath}`, '--spa', program.analyze ? '-a' : ''],
22+
{
23+
stdio: 'inherit'
24+
}
25+
)
2626

27-
process.exit(build.status);
27+
process.exit(build.status)

bin/laravel-nuxt-dev.js

+71-71
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,90 @@
11
#!/usr/bin/env node
2-
const { URL } = require("url");
3-
const ON_DEATH = require("death");
4-
const spawn = require("cross-spawn");
5-
const program = require("commander");
6-
const which = require("npm-which")(__dirname);
7-
const utils = require("../src/utils");
8-
const pkg = require("../package.json");
2+
const { URL } = require('url')
3+
const ON_DEATH = require('death')
4+
const spawn = require('cross-spawn')
5+
const program = require('commander')
6+
const which = require('npm-which')(__dirname)
7+
const utils = require('../src/utils')
8+
const pkg = require('../package.json')
99

1010
program
11-
.version(pkg.version)
12-
.description(
13-
"Starts the application in development mode (hot-code reloading, error reporting, etc)",
14-
)
15-
.option(
16-
"-p, --port [port]",
17-
"A port number on which to start the application",
18-
8000,
19-
)
20-
.option(
21-
"-H, --hostname [hostname]",
22-
"Hostname on which to start the application",
23-
"127.0.0.1",
24-
)
25-
.option(
26-
"--render-path [path]",
27-
"URL path used to render the SPA",
28-
"/__laravel_nuxt__",
29-
)
30-
.option("--laravel-path [path]", "Path to laravel directory", process.cwd())
31-
.parse(process.argv);
11+
.version(pkg.version)
12+
.description(
13+
'Starts the application in development mode (hot-code reloading, error reporting, etc)'
14+
)
15+
.option(
16+
'-p, --port [port]',
17+
'A port number on which to start the application',
18+
8000
19+
)
20+
.option(
21+
'-H, --hostname [hostname]',
22+
'Hostname on which to start the application',
23+
'127.0.0.1'
24+
)
25+
.option(
26+
'--render-path [path]',
27+
'URL path used to render the SPA',
28+
'/__laravel_nuxt__'
29+
)
30+
.option('--laravel-path [path]', 'Path to laravel directory', process.cwd())
31+
.parse(process.argv)
3232

33-
const NUXT_PORT = parseInt(program.port);
34-
const LARAVEL_PORT = NUXT_PORT + 1;
33+
const NUXT_PORT = parseInt(program.port)
34+
const LARAVEL_PORT = NUXT_PORT + 1
3535

3636
const renderUrl = new URL(
37-
program.renderPath,
38-
`http://${program.hostname}:${NUXT_PORT}`,
39-
);
37+
program.renderPath,
38+
`http://${program.hostname}:${NUXT_PORT}`
39+
)
4040

41-
utils.validateConfig();
41+
utils.validateConfig()
4242

4343
const nuxt = spawn(
44-
which.sync("nuxt"),
45-
[
46-
"dev",
44+
which.sync('nuxt'),
45+
[
46+
'dev',
4747
`-c=${utils.configPath}`,
48-
"--spa",
48+
'--spa',
4949
`--port=${NUXT_PORT}`,
50-
`--hostname=${program.hostname}`,
51-
],
52-
{
53-
env: {
54-
...process.env,
55-
LARAVEL_URL: `http://${program.hostname}:${LARAVEL_PORT}`,
56-
RENDER_PATH: renderUrl.pathname,
57-
},
58-
detached: true,
50+
`--hostname=${program.hostname}`
51+
],
52+
{
53+
env: {
54+
...process.env,
55+
LARAVEL_URL: `http://${program.hostname}:${LARAVEL_PORT}`,
56+
RENDER_PATH: renderUrl.pathname
5957
},
60-
);
58+
detached: true
59+
}
60+
)
6161

6262
const laravel = spawn(
63-
"php",
64-
[
65-
"artisan",
66-
"serve",
63+
'php',
64+
[
65+
'artisan',
66+
'serve',
6767
`--host=${program.hostname}`,
68-
`--port=${LARAVEL_PORT}`,
69-
],
70-
{
71-
cwd: program.laravelPath,
72-
env: Object.assign({}, process.env, {
73-
NUXT_URL: renderUrl,
74-
APP_URL: `http://${program.hostname}:${NUXT_PORT}`,
75-
}),
76-
detached: true,
77-
},
78-
);
68+
`--port=${LARAVEL_PORT}`
69+
],
70+
{
71+
cwd: program.laravelPath,
72+
env: Object.assign({}, process.env, {
73+
NUXT_URL: renderUrl,
74+
APP_URL: `http://${program.hostname}:${NUXT_PORT}`
75+
}),
76+
detached: true
77+
}
78+
)
7979

80-
utils.pipeStdio(nuxt, "nuxt");
81-
utils.pipeStdio(laravel, "laravel");
80+
utils.pipeStdio(nuxt, 'nuxt')
81+
utils.pipeStdio(laravel, 'laravel')
8282

8383
const cleanUp = () => {
84-
utils.kill(nuxt);
85-
utils.kill(laravel);
86-
};
87-
utils.exitOnClose([nuxt, laravel], cleanUp);
84+
utils.kill(nuxt)
85+
utils.kill(laravel)
86+
}
87+
utils.exitOnClose([nuxt, laravel], cleanUp)
8888
ON_DEATH(() => {
89-
cleanUp();
90-
});
89+
cleanUp()
90+
})

bin/laravel-nuxt.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env node
2-
const program = require("commander");
3-
const pkg = require("../package.json");
2+
const program = require('commander')
3+
const pkg = require('../package.json')
44

55
program
6-
.version(pkg.version)
7-
.command("dev", "Start the development servers", { isDefault: true })
8-
.command("build", "Build for production")
9-
.parse(process.argv);
6+
.version(pkg.version)
7+
.command('dev', 'Start the development servers', { isDefault: true })
8+
.command('build', 'Build for production')
9+
.parse(process.argv)

package.json

+13-9
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
"@nuxtjs/axios": "^5.3.1",
2323
"@nuxtjs/proxy": "^1.2.4",
2424
"chalk": "^2.4.1",
25-
"commander": "^2.15.1",
26-
"cross-spawn": "^6.0.5",
25+
"commander": "^3.0.1",
26+
"cross-spawn": "^7.0.0",
2727
"death": "^1.1.0",
28-
"fs-extra": "^6.0.1",
28+
"fs-extra": "^8.1.0",
2929
"lodash": "^4.17.10",
3030
"npm-which": "^3.0.1",
3131
"nuxt": "^2.9.2"
@@ -47,13 +47,17 @@
4747
},
4848
"homepage": "https://github.com/skyrpex/laravel-nuxt-js#readme",
4949
"devDependencies": {
50-
"ava": "^1.0.0-beta.4",
51-
"eslint": "^4.19.1",
52-
"eslint-config-skyrpex": "^2.5.0",
53-
"eslint-plugin-ava": "^4.5.1",
50+
"ava": "^2.3.0",
51+
"eslint": "^6.3.0",
52+
"eslint-config-standard": "^14.1.0",
53+
"eslint-plugin-ava": "^8.0.0",
54+
"eslint-plugin-import": "^2.18.2",
55+
"eslint-plugin-node": "^10.0.0",
56+
"eslint-plugin-promise": "^4.2.1",
57+
"eslint-plugin-standard": "^4.0.1",
5458
"glob": "^7.1.2",
55-
"standard-version": "^4.4.0",
56-
"tmp": "0.0.33"
59+
"standard-version": "^7.0.0",
60+
"tmp": "0.1.0"
5761
},
5862
"ava": {
5963
"files": [

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = require("./laravel-nuxt");
1+
module.exports = require('./laravel-nuxt')

0 commit comments

Comments
 (0)