routie dev init since i didn't adhere to any proper guidance up until now

This commit is contained in:
2026-04-29 22:27:29 -06:00
commit e1dabb71e2
15301 changed files with 3562618 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021-present Johnson Chu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+77
View File
@@ -0,0 +1,77 @@
# vue-tsc
<p>
<a href="https://www.npmjs.com/package/vue-tsc"><img src="https://img.shields.io/npm/v/vue-tsc.svg?labelColor=18181B&color=1584FC" alt="NPM version"></a>
<a href="https://github.com/vuejs/language-tools/blob/master/LICENSE"><img src="https://img.shields.io/github/license/vuejs/language-tools.svg?labelColor=18181B&color=1584FC" alt="License"></a>
</p>
A command-line type checking tool for Vue, based on a `tsc` wrapper, enabling the TypeScript compiler to understand `.vue` files.
## Installation
```bash
npm install vue-tsc typescript --save-dev
```
Requires TypeScript 5.0.0 or higher.
## Usage
### Type Checking
```bash
vue-tsc --noEmit
```
### Generate Declaration Files
```bash
vue-tsc --declaration --emitDeclarationOnly
```
### Configuration in package.json
```json
{
"scripts": {
"type-check": "vue-tsc --noEmit",
"build:types": "vue-tsc --declaration --emitDeclarationOnly"
}
}
```
## Supported File Types
`vue-tsc` automatically reads file types to process from `vueCompilerOptions.extensions` in `tsconfig.json`, defaulting to `['.vue']`.
If `vitePressExtensions` or `petiteVueExtensions` are configured, those extensions will also be processed.
## Differences from tsc
`vue-tsc` is a wrapper around `tsc` that:
1. Reads `vueCompilerOptions` from `tsconfig.json`
2. Creates a Vue language plugin to process `.vue` files
3. Transforms `.vue` files into TypeScript virtual code before passing them to `tsc`
All `tsc` command-line arguments can be used directly.
## Programmatic Usage
```typescript
import { run } from 'vue-tsc';
// Use the default tsc path
run();
// Specify a custom tsc path
run('/path/to/typescript/lib/tsc.js');
```
## Related Packages
- [`@vue/language-core`](../language-core) - Core module
## License
[MIT](https://github.com/vuejs/language-tools/blob/master/LICENSE) License
+2
View File
@@ -0,0 +1,2 @@
#!/usr/bin/env node
require('../index.js').run();
+1
View File
@@ -0,0 +1 @@
export declare function run(tscPath?: string): any;
+72
View File
@@ -0,0 +1,72 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.run = run;
const runTsc_1 = require("@volar/typescript/lib/quickstart/runTsc");
const core = __importStar(require("@vue/language-core"));
const windowsPathReg = /\\/g;
function run(tscPath = require.resolve('typescript/lib/tsc')) {
let runExtensions = ['.vue'];
let extensionsChangedException;
const main = () => (0, runTsc_1.runTsc)(tscPath, runExtensions, (ts, options) => {
const { configFilePath } = options.options;
const vueOptions = typeof configFilePath === 'string'
? core.createParsedCommandLine(ts, ts.sys, configFilePath.replace(windowsPathReg, '/')).vueOptions
: core.createParsedCommandLineByJson(ts, ts.sys, (options.host ?? ts.sys).getCurrentDirectory(), {})
.vueOptions;
const allExtensions = core.getAllExtensions(vueOptions);
if (runExtensions.length === allExtensions.length
&& runExtensions.every(ext => allExtensions.includes(ext))) {
const vueLanguagePlugin = core.createVueLanguagePlugin(ts, options.options, vueOptions, id => id);
return { languagePlugins: [vueLanguagePlugin] };
}
else {
runExtensions = allExtensions;
throw extensionsChangedException = new Error('extensions changed');
}
});
try {
return main();
}
catch (err) {
if (err === extensionsChangedException) {
return main();
}
else {
throw err;
}
}
}
//# sourceMappingURL=index.js.map
+30
View File
@@ -0,0 +1,30 @@
{
"name": "vue-tsc",
"version": "3.2.7",
"license": "MIT",
"files": [
"bin",
"**/*.js",
"**/*.d.ts"
],
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/vuejs/language-tools.git",
"directory": "packages/tsc"
},
"bin": {
"vue-tsc": "./bin/vue-tsc.js"
},
"peerDependencies": {
"typescript": ">=5.0.0"
},
"dependencies": {
"@volar/typescript": "2.4.28",
"@vue/language-core": "3.2.7"
},
"devDependencies": {
"@types/node": "^22.10.4"
},
"gitHead": "a7092edf12862f0db8e39bd2afbda3d54aa26506"
}