diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8ce3520..107290c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,7 +16,6 @@ jobs: - uses: actions/setup-node@v4 with: registry-url: "https://registry.npmjs.org" - - run: ls -la - run: npm run release - run: npm install - run: npm run publish diff --git a/scripts/publish.js b/scripts/publish.js index 886cc16..548bbe2 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -2,9 +2,7 @@ "use strict"; -import { readFileSync, writeFileSync } from "fs"; import { spawnSync } from "child_process"; -import { join } from "path"; /** * @return {void} diff --git a/scripts/release.js b/scripts/release.js index 47654d5..90225ec 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -2,6 +2,9 @@ "use strict"; +import { readFileSync, writeFileSync } from "fs"; +import { join } from "path"; + const execute = () => { const packageJson = JSON.parse( diff --git a/scripts/version.js b/scripts/version.js index 260574d..f625cf0 100644 --- a/scripts/version.js +++ b/scripts/version.js @@ -2,7 +2,7 @@ "use strict"; -import * as fs from "fs"; +import { existsSync, readFileSync, writeFileSync } from "fs"; /** * @return {void} @@ -12,11 +12,11 @@ import * as fs from "fs"; const execute = () => { const indexPath = `${process.cwd()}/src/index.ts`; - if (fs.existsSync(indexPath)) { + if (existsSync(indexPath)) { - const src = fs.readFileSync(indexPath, "utf8"); + const src = readFileSync(indexPath, "utf8"); const packageJson = JSON.parse( - fs.readFileSync(`${process.cwd()}/package.json`, { "encoding": "utf8" }) + readFileSync(`${process.cwd()}/package.json`, { "encoding": "utf8" }) ); const texts = src.split("\n"); @@ -30,7 +30,7 @@ const execute = () => const top = texts.slice(0, idx).join("\n"); const lower = texts.slice(idx + 1).join("\n"); - fs.writeFileSync( + writeFileSync( indexPath, `${top} console.log("%c Next2D Framework %c ${packageJson.version} %c https://next2d.app",