UNPKG

516 BPlain TextView Raw
1import loadScript from './snippet/json-ld-load-script';
2import { resolve as resolvePath } from 'path';
3import createFile from 'vamtiger-create-file';
4
5const { cwd } = process;
6const folder = resolvePath(
7 cwd(),
8 'source'
9);
10
11export default async function({ packagePath }: IParams) {
12 const { name } = require(packagePath);
13 const filePath = resolvePath(
14 folder,
15 'load-script.ts'
16 );
17
18 await createFile(filePath, loadScript);
19}
20
21export interface IParams {
22 packagePath: string;
23}
\No newline at end of file