diff --git a/packages/cna-template/template/nuxt/package.json b/packages/cna-template/template/nuxt/package.json index cec8abe1f..7279e6897 100644 --- a/packages/cna-template/template/nuxt/package.json +++ b/packages/cna-template/template/nuxt/package.json @@ -4,6 +4,8 @@ "build": "nuxt build", "start": "nuxt start", "generate": "nuxt generate", + "update:check": "npx npm-check-updates@latest --packageFile package.json", + "update:major": "<%= pmRun %> update:check <%= pm === 'yarn' ? '' : '-- ' %>-u && <%= pm === 'yarn' ? 'yarn' : 'npm install' %> && npx browserslist@latest --update-db", "lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .", "lint:style": "stylelint \"**/*.{vue,css}\" --ignore-path .gitignore", "prepare": "husky install" diff --git a/packages/create-nuxt-app/test/snapshots/index.test.js.md b/packages/create-nuxt-app/test/snapshots/index.test.js.md index d5bafa79e..b804c7b1a 100644 --- a/packages/create-nuxt-app/test/snapshots/index.test.js.md +++ b/packages/create-nuxt-app/test/snapshots/index.test.js.md @@ -35,6 +35,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -114,6 +116,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -197,6 +201,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -278,6 +284,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -357,6 +365,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'npm run update:check -- -u && npm install && npx browserslist@latest --update-db', }, } @@ -436,6 +446,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -517,6 +529,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -600,6 +614,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -683,6 +699,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -769,6 +787,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -853,6 +873,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -938,6 +960,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -1029,6 +1053,8 @@ Generated by [AVA](https://avajs.dev). generate: 'nuxt generate', prepublish: 'yarn build:framevuerk', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -1117,6 +1143,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -1199,6 +1227,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -1282,6 +1312,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -1365,6 +1397,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -1447,6 +1481,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -1530,6 +1566,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -1621,6 +1659,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -1729,6 +1769,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -1828,6 +1870,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -1917,6 +1961,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -2004,6 +2050,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -2121,6 +2169,8 @@ Generated by [AVA](https://avajs.dev). 'lint:style': 'stylelint "**/*.{vue,css}" --ignore-path .gitignore', prepare: 'husky install', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -2214,6 +2264,8 @@ Generated by [AVA](https://avajs.dev). lint: 'yarn lint:js', 'lint:js': 'eslint --ext ".js,.vue" --ignore-path .gitignore .', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -2299,6 +2351,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -2378,6 +2432,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -2464,6 +2520,8 @@ Generated by [AVA](https://avajs.dev). lint: 'yarn lint:style', 'lint:style': 'stylelint "**/*.{vue,css}" --ignore-path .gitignore', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -2554,6 +2612,8 @@ Generated by [AVA](https://avajs.dev). generate: 'nuxt generate', prepare: 'husky install', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -2633,6 +2693,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -2722,6 +2784,8 @@ Generated by [AVA](https://avajs.dev). generate: 'nuxt generate', start: 'nuxt start', test: 'jest', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -2820,6 +2884,8 @@ Generated by [AVA](https://avajs.dev). test: 'yarn test:unit && yarn test:e2e', 'test:e2e': 'cross-env TEST=e2e ava ./test/e2e/**/*', 'test:unit': 'cross-env TEST=unit ava ./test/specs/**/*', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -2911,6 +2977,8 @@ Generated by [AVA](https://avajs.dev). generate: 'nuxt generate', start: 'nuxt start', 'test:e2e': 'wdio wdio.conf.js', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -2998,6 +3066,8 @@ Generated by [AVA](https://avajs.dev). generate: 'nuxt generate', start: 'nuxt start', 'test:e2e': 'nightwatch', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -3077,6 +3147,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -3156,6 +3228,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -3238,6 +3312,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -3317,6 +3393,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -3402,6 +3480,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -3482,6 +3562,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -3562,6 +3644,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -3642,6 +3726,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -3721,6 +3807,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -3800,6 +3888,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -3879,6 +3969,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -3958,6 +4050,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -4037,6 +4131,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } @@ -4116,6 +4212,8 @@ Generated by [AVA](https://avajs.dev). dev: 'nuxt', generate: 'nuxt generate', start: 'nuxt start', + 'update:check': 'npx npm-check-updates@latest --packageFile package.json', + 'update:major': 'yarn update:check -u && yarn && npx browserslist@latest --update-db', }, } diff --git a/packages/create-nuxt-app/test/snapshots/index.test.js.snap b/packages/create-nuxt-app/test/snapshots/index.test.js.snap index e56978f40..6ae9c4f90 100644 Binary files a/packages/create-nuxt-app/test/snapshots/index.test.js.snap and b/packages/create-nuxt-app/test/snapshots/index.test.js.snap differ