Skip to content

Commit 0bc3a09

Browse files
committed
1.0.2
1 parent c446751 commit 0bc3a09

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

bin/itlfy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/node
1+
#!node
22
import cli from '../src/cli.js';
33

44
process.exit(await cli(process.argv, process.cwd(),),);

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@idrinth/typescript-language-from-yaml",
3-
"version": "1.0.0",
4-
"description": "",
3+
"version": "1.0.2",
4+
"description": "Translates yaml files to ts for translation autocompletion, autocorrection and better developer support",
55
"bin": {
66
"itlfy": "bin/itlfy.js"
77
},
@@ -14,6 +14,10 @@
1414
"clear": "node tools/clear-js-files-from-src.js",
1515
"postpublish": "npm run clear"
1616
},
17+
"repository": {
18+
"type": "git",
19+
"url": "https:://github.com/idrinth/typescript-language-from-yaml"
20+
},
1721
"keywords": [
1822
"transslation",
1923
"typescript",

src/generate.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ import {
1515
import Logger from './logger.js';
1616
import toTypescriptObject from './to-typescript-object.js';
1717
import loadKeys from './loadKeys.js';
18+
import {unlinkSync} from "node:fs";
1819

1920
export default (logger: Logger, cwd: string, shouldSplit = false, isVerbatimModuleSyntax = false) => {
21+
for (const file in readdirSync(`${ cwd }/${ TARGET_DIR }`,)) {
22+
unlinkSync(`${cwd}/${ TARGET_DIR }/${ file }`,);
23+
}
2024
const yamlFiles = readdirSync(`${ cwd }/${ ORIGIN_DIRECTORY }`,)
2125
.filter((file,) => file.endsWith('.yml',),);
2226

0 commit comments

Comments
 (0)