forked from umijs/dumi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "refactor: improve vue tech stack support (umijs#2036)"
This reverts commit 19ebd41.
- Loading branch information
Showing
28 changed files
with
179 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/dist | ||
/compiled | ||
/theme-default | ||
/runtime | ||
/suites/*/compiled | ||
/suites/preset-vue/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import type * as BabelCore from '@umijs/bundler-utils/compiled/@babel/core'; | ||
export { BabelCore }; | ||
export const babelCore: () => typeof import('@umijs/bundler-utils/compiled/@babel/core'); | ||
export const babelPresetTypeScript: () => BabelCore.PluginItem; | ||
export const babelPresetEnv: () => BabelCore.PluginItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
babelCore: () => require('@umijs/bundler-utils/compiled/babel/core'), | ||
babelPresetTypeScript: () => | ||
require('@umijs/bundler-utils/compiled/babel/preset-typescript'), | ||
babelPresetEnv: () => | ||
require('@umijs/bundler-utils/compiled/babel/preset-env'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export declare const FakeParser: () => import('../../../dist').BaseAtomAssetsParser< | ||
import('../../../dist').LanguageMetaParser | ||
>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { AtomAssetsParserResult, createApiParser } from '../../../dist'; | ||
|
||
export const FakeParser = createApiParser({ | ||
filename: __filename, | ||
worker: class { | ||
patch() {} | ||
parse() { | ||
return new Promise<AtomAssetsParserResult>((resolve) => { | ||
setTimeout(() => { | ||
resolve({ | ||
components: {}, | ||
functions: {}, | ||
}); | ||
}, 1000); | ||
}); | ||
} | ||
async destroy() {} | ||
}, | ||
// If the worker class has no parameters | ||
// entryFile and resolveDir must be passed in manually. | ||
parseOptions: { | ||
entryFile: __filename, | ||
resolveDir: __dirname, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { exec } from 'node:child_process'; | ||
import { promisify } from 'node:util'; | ||
import path from 'path'; | ||
|
||
const execPromise = promisify(exec); | ||
|
||
export default async function () { | ||
const tsconfigPath = path.join(__dirname, 'tsconfig.test.json'); | ||
const files = path.resolve(__dirname, './FakeParser.{js,d.ts}'); | ||
await execPromise(`tsc --project ${tsconfigPath}`); | ||
await execPromise(`prettier ${files} --write`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"compilerOptions": { | ||
"strict": true, | ||
"target": "ESNext", | ||
"module": "CommonJS", | ||
"moduleResolution": "Node", | ||
"declaration": true, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"baseUrl": "./", | ||
"types": ["vitest/globals"] | ||
}, | ||
"include": ["FakeParser.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.