Skip to content

Instantly share code, notes, and snippets.

@desktopgame
desktopgame / launch.json
Created June 4, 2020 11:47
typescript-electron
{
"configurations": [
{
"name": "Debug",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/dist/main.js",
"preLaunchTask": "npm: build",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
@desktopgame
desktopgame / MANIFEST.in
Created May 16, 2020 03:25
pythonのsetuptools用の設定
include requirements.txt
@desktopgame
desktopgame / setup.py
Last active July 30, 2020 12:11
基本的な setup.py
# 【Techの道も一歩から】第21回「setup.pyを書いてpipでインストール可能にしよう」
# https://buildersbox.corp-sansan.com/entry/2019/07/11/110000
from glob import glob
from os.path import basename
from os.path import splitext
from setuptools import setup
from setuptools import find_packages
@desktopgame
desktopgame / gulpfile.js
Created April 27, 2020 04:33
gulp-hello
var gulp = require('gulp');
gulp.task('hello', async () => {
console.log('hello, world');
});
@desktopgame
desktopgame / preload.ts
Created April 26, 2020 23:33
typescript-electron-preload
//
// https://github.com/electron/electron-quick-start-typescript
//
// All of the Node.js APIs are available in the preload process.
// It has the same sandbox as a Chrome extension.
window.addEventListener("DOMContentLoaded", () => {
const replaceText = (selector: string, text: string) => {
const element = document.getElementById(selector);
if (element) {
element.innerText = text;
@desktopgame
desktopgame / main.ts
Created April 26, 2020 13:35
typescript-electron-main
//
// https://github.com/electron/electron-quick-start-typescript
//
import { app, BrowserWindow } from "electron";
import * as path from "path";
let mainWindow: Electron.BrowserWindow;
function createWindow() {
// Create the browser window.