- Added renamed files

This commit is contained in:
Ferdi Koomen 2022-01-26 20:16:04 +01:00
parent 4637325b0a
commit 0f11ea84a9
7 changed files with 28 additions and 10 deletions

View 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
View File

@ -0,0 +1,3 @@
import * as api from './index';
(window as any).api = api;

View File

@ -1,3 +0,0 @@
import('./index.js').then(module => {
window.api = module;
});

View File

@ -0,0 +1,8 @@
import { rmSync } from 'fs';
export const cleanup = (dir: string) => {
rmSync(`./test/e2e/generated/${dir}/`, {
force: true,
recursive: true,
});
};

View File

@ -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`);
};

View 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}`);
};

View File

@ -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