Skip to content

Commit 7680437

Browse files
committed
[Fix] Scripts
1 parent 770dea9 commit 7680437

File tree

12 files changed

+212
-14
lines changed

12 files changed

+212
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# v0.2.0 (February 11, 2023)
1+
# v0.2.1 (February 11, 2023)
22

33
- New Options: `viewport`
44
- New Options: `policy`

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<!-- all-shields/header-badges:START -->
66

7-
[![v0.2.0](https://img.shields.io/badge/version-v0.2.0-lightgray.svg?style=flat&logo=)](https://github.com/ptkdev/sveltekit-electron-adapter/blob/main/CHANGELOG.md) [![](https://img.shields.io/npm/v/@ptkdev/sveltekit-electron-adapter?color=CC3534&logo=npm)](https://www.npmjs.com/package/@ptkdev/sveltekit-electron-adapter) [![License: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat&logo=license)](https://github.com/ptkdev/sveltekit-electron-adapter/blob/main/LICENSE.md) [![Language: TypeScript](https://img.shields.io/badge/language-typescript-blue.svg?style=flat&logo=typescript)](https://www.typescriptlang.org/) [![Framework: Grammy](https://img.shields.io/badge/powered%20by-grammy-009dca.svg?style=flat&logo=telegram)](https://grammy.dev/) [![ECMAScript: 2019](https://img.shields.io/badge/ES-9-F7DF1E.svg?style=flat&logo=javascript)](https://github.com/tc39/ecma262) [![Discord Server](https://discordapp.com/api/guilds/383373985666301975/embed.png)](https://discord.ptkdev.io)
7+
[![v0.2.1-nightly.0](https://img.shields.io/badge/version-v0.2.1--nightly.0-lightgray.svg?style=flat&logo=)](https://github.com/ptkdev/sveltekit-electron-adapter/blob/main/CHANGELOG.md) [![](https://img.shields.io/npm/v/@ptkdev/sveltekit-electron-adapter?color=CC3534&logo=npm)](https://www.npmjs.com/package/@ptkdev/sveltekit-electron-adapter) [![License: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat&logo=license)](https://github.com/ptkdev/sveltekit-electron-adapter/blob/main/LICENSE.md) [![Language: TypeScript](https://img.shields.io/badge/language-typescript-blue.svg?style=flat&logo=typescript)](https://www.typescriptlang.org/) [![Framework: Grammy](https://img.shields.io/badge/powered%20by-grammy-009dca.svg?style=flat&logo=telegram)](https://grammy.dev/) [![ECMAScript: 2019](https://img.shields.io/badge/ES-9-F7DF1E.svg?style=flat&logo=javascript)](https://github.com/tc39/ecma262) [![Discord Server](https://discordapp.com/api/guilds/383373985666301975/embed.png)](https://discord.ptkdev.io)
88

99
<!-- all-shields/header-badges:END -->
1010

package-lock.json

Lines changed: 186 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@ptkdev/sveltekit-electron-adapter",
33
"displayName": "SvelteKit Adapter for Desktop Apps with Electron",
44
"description": "Adapter for SvelteKit apps that prerenders your entire site as a collection of static files for use with Electron",
5-
"version": "0.2.0",
5+
"version": "0.2.1-nightly.0",
66
"main": "./index.js",
77
"type": "module",
88
"exports": {
@@ -43,10 +43,10 @@
4343
"git-set-upstream": "git remote add upstream [email protected]:ptkdev/sveltekit-electron-adapter.git && git fetch upstream",
4444
"git-pull-upstream": "git pull upstream main && git pull upstream beta && git pull upstream nightly",
4545
"git-pull": "git pull --recursive",
46-
"git-hash": "ts-node scripts/githash.ts",
46+
"git-hash": "ts-node --esm scripts/githash.ts",
4747
"git-ignore-reset": "git rm -r --cached . && git add . && git commit -m \"[Fix] Removing all files in .gitignore\"",
48-
"github-workflow-next-version": "ts-node scripts/version.ts",
49-
"github-workflow-changelog": "ts-node scripts/changelog_release.ts",
48+
"github-workflow-next-version": "ts-node --esm scripts/version.ts",
49+
"github-workflow-changelog": "ts-node --esm scripts/changelog_release.ts",
5050
"npm-publish-main": "git checkout main && npm publish",
5151
"npm-publish-beta": "git checkout beta && npm publish --tag beta",
5252
"npm-publish-nightly": "git checkout nightly && npm publish --tag nightly",
@@ -63,6 +63,7 @@
6363
},
6464
"devDependencies": {
6565
"@ptkdev/all-shields-cli": "^2.0.2",
66+
"@ptkdev/logger": "^1.8.0",
6667
"@types/jest": "^29.4.0",
6768
"@types/node": "^18.13.0",
6869
"@types/shelljs": "^0.8.11",

scripts/changelog.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
*
1111
*/
1212
import * as fs from "fs";
13+
import { dirname } from "path";
1314

14-
declare const __dirname: string;
15+
const __dirname = dirname;
1516

1617
const changelog = `# v1.0.0 (${new Date().toLocaleString("en-us", {
1718
month: "long",

scripts/configs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
*/
1111
import * as fs from "fs";
1212
import * as shell from "shelljs";
13+
import { dirname } from "path";
1314

14-
declare const __dirname: string;
15+
const __dirname = dirname;
1516

1617
const path = `${__dirname}/../app/configs/config.js`;
1718

scripts/debug.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
import * as fs from "fs";
1212
import * as shell from "shelljs";
1313
import { argv } from "yargs";
14+
import { dirname } from "path";
1415

15-
declare const __dirname: string;
16+
const __dirname = dirname;
1617

1718
const path = `${__dirname}/../app/configs/config.js`;
1819

scripts/githash.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ import Logger from "@ptkdev/logger";
22
import fs from "fs";
33
import path from "path";
44
import { execSync } from "child_process";
5-
import semver from "../package.json";
5+
import semver from "../package.json" assert { type: "json" };
6+
import { dirname } from "path";
67

8+
const __dirname = dirname;
79
const gitdotfile = `${__dirname}/../.git/config`;
810
const logger = new Logger();
911
let branch = "";

0 commit comments

Comments
 (0)