mirror of https://github.com/vuejs/core.git
chore: use consistent ts-check comments in scripts
This commit is contained in:
parent
7694ab9f67
commit
a871fd0cc0
|
@ -1,3 +1,5 @@
|
||||||
|
// @ts-check
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Produces production builds and stitches together d.ts files.
|
Produces production builds and stitches together d.ts files.
|
||||||
|
|
||||||
|
@ -14,11 +16,9 @@ nr build core --formats cjs
|
||||||
```
|
```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @ts-check
|
|
||||||
import fs from 'node:fs/promises'
|
import fs from 'node:fs/promises'
|
||||||
import { existsSync, readFileSync } from 'node:fs'
|
import { existsSync, readFileSync } from 'node:fs'
|
||||||
import path from 'node:path'
|
import path from 'node:path'
|
||||||
import { fileURLToPath } from 'node:url'
|
|
||||||
import minimist from 'minimist'
|
import minimist from 'minimist'
|
||||||
import { gzipSync } from 'node:zlib'
|
import { gzipSync } from 'node:zlib'
|
||||||
import { compress } from 'brotli'
|
import { compress } from 'brotli'
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
|
// @ts-check
|
||||||
|
|
||||||
// Using esbuild for faster dev builds.
|
// Using esbuild for faster dev builds.
|
||||||
// We are still using Rollup for production builds because it generates
|
// We are still using Rollup for production builds because it generates
|
||||||
// smaller files w/ better tree-shaking.
|
// smaller files w/ better tree-shaking.
|
||||||
|
|
||||||
// @ts-check
|
|
||||||
import esbuild from 'esbuild'
|
import esbuild from 'esbuild'
|
||||||
import { resolve, relative, dirname } from 'node:path'
|
import { resolve, relative, dirname } from 'node:path'
|
||||||
import { fileURLToPath } from 'node:url'
|
import { fileURLToPath } from 'node:url'
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
// @ts-check
|
||||||
import fs from 'node:fs'
|
import fs from 'node:fs'
|
||||||
|
|
||||||
const packagesToCheck = [
|
const packagesToCheck = [
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
// @ts-check
|
||||||
if (!/pnpm/.test(process.env.npm_execpath || '')) {
|
if (!/pnpm/.test(process.env.npm_execpath || '')) {
|
||||||
console.warn(
|
console.warn(
|
||||||
`\u001b[33mThis repository requires using pnpm as the package manager ` +
|
`\u001b[33mThis repository requires using pnpm as the package manager ` +
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
// @ts-check
|
||||||
import fs from 'node:fs'
|
import fs from 'node:fs'
|
||||||
import chalk from 'chalk'
|
import chalk from 'chalk'
|
||||||
import { createRequire } from 'node:module'
|
import { createRequire } from 'node:module'
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
|
// @ts-check
|
||||||
import chalk from 'chalk'
|
import chalk from 'chalk'
|
||||||
import { readFileSync } from 'fs'
|
import { readFileSync } from 'fs'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
import { fileURLToPath } from 'url'
|
|
||||||
|
|
||||||
const dirname = path.dirname(fileURLToPath(import.meta.url), '..')
|
const msgPath = path.resolve('.git/COMMIT_EDITMSG')
|
||||||
const msgPath = path.resolve(dirname, '../.git/COMMIT_EDITMSG')
|
|
||||||
const msg = readFileSync(msgPath, 'utf-8').trim()
|
const msg = readFileSync(msgPath, 'utf-8').trim()
|
||||||
|
|
||||||
const commitRE =
|
const commitRE =
|
||||||
|
|
Loading…
Reference in New Issue