Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit

Permalink
fix(ts): remove @nuxt/typescript-runtime (#721)
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkdo authored Feb 18, 2021
1 parent 0fb619c commit cbd58dc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
7 changes: 0 additions & 7 deletions packages/cna-template/template/nuxt/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module.exports = {
pkg.dependencies['nuxt-edge'] = 'latest'
}

const { scripts } = pkg
const { features, language = [], linter = [] } = generator.answers

// Linter
Expand Down Expand Up @@ -81,19 +80,13 @@ module.exports = {
if (!typescript) {
delete pkg.devDependencies['@nuxt/types']
delete pkg.devDependencies['@nuxt/typescript-build']
delete pkg.dependencies['@nuxt/typescript-runtime']
}
if (!typescript || !eslint) {
delete pkg.devDependencies['@nuxtjs/eslint-config-typescript']
}
if (typescript && eslint) {
delete pkg.devDependencies['@nuxtjs/eslint-config']
}
if (typescript) {
for (const key of Object.keys(scripts)) {
scripts[key] = scripts[key].replace(/^nuxt( |$)/, 'nuxt-ts$1')
}
}
return pkg
}
}
1 change: 0 additions & 1 deletion packages/cna-template/template/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"dependencies": {
"@nuxt/content": "^1.12.0",
"@nuxt/typescript-runtime": "^2.0.1",
"@nuxtjs/axios": "^5.12.5",
"@nuxtjs/pwa": "^3.3.5",
"core-js": "^3.8.3",
Expand Down
9 changes: 4 additions & 5 deletions packages/create-nuxt-app/test/snapshots/index.test.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ Generated by [AVA](https://avajs.dev).
{
dependencies: {
'@nuxt/typescript-runtime': '^2.0.1',
'core-js': '^3.8.3',
nuxt: '^2.14.12',
},
Expand All @@ -213,10 +212,10 @@ Generated by [AVA](https://avajs.dev).
},
private: true,
scripts: {
build: 'nuxt-ts build',
dev: 'nuxt-ts',
generate: 'nuxt-ts generate',
start: 'nuxt-ts start',
build: 'nuxt build',
dev: 'nuxt',
generate: 'nuxt generate',
start: 'nuxt start',
},
}

Expand Down
Binary file modified packages/create-nuxt-app/test/snapshots/index.test.js.snap
Binary file not shown.

0 comments on commit cbd58dc

Please sign in to comment.