mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
- Added renamed files
This commit is contained in:
parent
4637325b0a
commit
0f11ea84a9
10
test/e2e/assets/index.html
Normal file
10
test/e2e/assets/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<script type="module" src="js/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
3
test/e2e/assets/main.ts
Normal file
3
test/e2e/assets/main.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import * as api from './index';
|
||||
|
||||
(window as any).api = api;
|
||||
@ -1,3 +0,0 @@
|
||||
import('./index.js').then(module => {
|
||||
window.api = module;
|
||||
});
|
||||
8
test/e2e/scripts/cleanup.ts
Normal file
8
test/e2e/scripts/cleanup.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { rmSync } from 'fs';
|
||||
|
||||
export const cleanup = (dir: string) => {
|
||||
rmSync(`./test/e2e/generated/${dir}/`, {
|
||||
force: true,
|
||||
recursive: true,
|
||||
});
|
||||
};
|
||||
@ -1,5 +0,0 @@
|
||||
import { copyFileSync } from 'fs';
|
||||
|
||||
export const copy = (dir: string) => {
|
||||
copyFileSync('./test/e2e/assets/script.js', `./test/e2e/generated/${dir}/script.js`);
|
||||
};
|
||||
5
test/e2e/scripts/copyAsset.ts
Normal file
5
test/e2e/scripts/copyAsset.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { copyFileSync } from 'fs';
|
||||
|
||||
export const copyAsset = (fileNameIn: string, fileNameOut: string) => {
|
||||
copyFileSync(`./test/e2e/assets/${fileNameIn}`, `./test/e2e/generated/${fileNameOut}`);
|
||||
};
|
||||
@ -1,9 +1,9 @@
|
||||
import { generate as __generate } from '../../../';
|
||||
|
||||
export const generate = async (
|
||||
export const generateClient = async (
|
||||
dir: string,
|
||||
version: string,
|
||||
client: 'fetch' | 'xhr' | 'node' | 'axios',
|
||||
client: 'fetch' | 'xhr' | 'node' | 'axios' | 'angular',
|
||||
useOptions: boolean = false,
|
||||
useUnionTypes: boolean = false,
|
||||
clientName?: string
|
||||
Loading…
x
Reference in New Issue
Block a user