Skip to content

Commit

Permalink
Merge pull request #21 from Next2D/main
Browse files Browse the repository at this point in the history
publish
  • Loading branch information
ienaga authored Nov 12, 2023
2 parents eac6d90 + 48c9310 commit 6cd4632
Show file tree
Hide file tree
Showing 12 changed files with 85 additions and 110 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: cd template && npm install && npx eslint ./src/**/*.ts
- run: |
npm install
npx eslint ./src/**/*.ts
working-directory: ./template
windows-browser-test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: cd template && npm install && npx eslint ./src/**/*.ts
- run: |
npm install
npx eslint ./src/**/*.ts
working-directory: ./template
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@next2d/framework-typescript-template",
"description": "Next2D Framework default TypeScript template.",
"version": "2.0.1",
"version": "2.0.2",
"homepage": "https://next2d.app",
"bugs": "https://github.com/Next2D/framework-typescript-template/issues/new",
"author": "Toshiyuki Ienaga<[email protected]>",
Expand Down
5 changes: 2 additions & 3 deletions template/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
**/node_modules/*
src/Packages.ts
src/config/Config.ts
electron.index.json
src/Packages.*
src/config/Config.*
2 changes: 1 addition & 1 deletion template/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ dist-ssr

src/Packages.*
src/config/Config.*
electron.index.json
electron/resources
48 changes: 0 additions & 48 deletions template/electron.build.json

This file was deleted.

53 changes: 0 additions & 53 deletions template/electron.js

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes
55 changes: 55 additions & 0 deletions template/electron/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = "1";

const { app, screen, BrowserWindow } = require("electron");

app.commandLine.appendSwitch("disable-http-cache");

const createWindow = () =>
{
const primaryDisplay = screen.getPrimaryDisplay();
const { width, height } = primaryDisplay.workAreaSize;

const browserWindow = new BrowserWindow({
"width": width,
"height": height,
"titleBarStyle": "hidden",
"webPreferences": {
"nodeIntegration": false
}
});

/**
* Chrome Developer Tools
*/
// browserWindow.webContents.openDevTools();

browserWindow.loadFile("./resources/index.html");
};

app
.whenReady()
.then(createWindow);

app
.on("window-all-closed", () =>
{
/**
* windowsならアプリを終了、macならdockに滞在
* Exit apps if windows, stay in dock if mac
*/
if (process.platform !== "darwin") {
app.quit();
}
});

app
.on("activate", () =>
{
/**
* アプリで起動している画面がなければアプリを起動
* If there is no screen running on the application, start the application.
*/
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
});
17 changes: 17 additions & 0 deletions template/electron/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "example-product-name",
"version": "0.0.1",
"description": "Your Production Description",
"main": "index.js",
"config": {
"forge": {
"packagerConfig": {
"icon": "./electron/icons/icon.icns",
"asar": true
}
}
},
"devDependencies": {
"electron": "^27.0.4"
}
}
3 changes: 1 addition & 2 deletions template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@
"@next2d/vite-auto-loader-plugin": "^1.0.0",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"electron": "^27.0.4",
"eslint": "^8.53.0",
"jsdom": "^22.1.0",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vitest": "^0.34.6"
}
}
}

0 comments on commit 6cd4632

Please sign in to comment.