put typescript and svelte back in the mix
This commit is contained in:
parent
1b345af4ca
commit
55f1b585e9
22
index.html
22
index.html
|
@ -4,25 +4,5 @@
|
|||
<meta charset="UTF-8" />
|
||||
<title>Hello World!</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello World!</h1>
|
||||
<!-- All of the Node.js APIs are available in this renderer process. -->
|
||||
We are using Node.js
|
||||
<script>
|
||||
document.write(process.versions.node);
|
||||
</script>
|
||||
, Chromium
|
||||
<script>
|
||||
document.write(process.versions.chrome);
|
||||
</script>
|
||||
, and Electron
|
||||
<script>
|
||||
document.write(process.versions.electron);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
// You can also require other files to run in this process
|
||||
require('./dist/renderer.js');
|
||||
</script>
|
||||
<body id="app"></body>
|
||||
</html>
|
||||
|
|
|
@ -454,15 +454,6 @@
|
|||
"xterm": "^3.13.1"
|
||||
}
|
||||
},
|
||||
"@marshallofsound/webpack-asset-relocator-loader": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@marshallofsound/webpack-asset-relocator-loader/-/webpack-asset-relocator-loader-0.5.0.tgz",
|
||||
"integrity": "sha512-X50R97SiDNTpOckiplghBo63Vo8GxSsr98s3VTwEu3qyVr+TY4I91KRtKelEj2OAfgMnkTymw89+psFVq8aB1g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"sourcemap-codec": "^1.4.4"
|
||||
}
|
||||
},
|
||||
"@types/electron-packager": {
|
||||
"version": "13.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/electron-packager/-/electron-packager-13.0.0.tgz",
|
||||
|
@ -666,6 +657,15 @@
|
|||
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@zeit/webpack-asset-relocator-loader": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@zeit/webpack-asset-relocator-loader/-/webpack-asset-relocator-loader-0.5.1.tgz",
|
||||
"integrity": "sha512-GbFVKSIru5vBF89Z6pSdc5qlCt5uXOsQM3/3ojx+oiqTqWY2mnUsVcJBOq8Xeyq0EPumClfVtdbFLuFCW7Yc9Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"sourcemap-codec": "^1.4.4"
|
||||
}
|
||||
},
|
||||
"abbrev": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
|
@ -916,6 +916,12 @@
|
|||
"integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
|
||||
"dev": true
|
||||
},
|
||||
"ast-types": {
|
||||
"version": "0.9.6",
|
||||
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz",
|
||||
"integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=",
|
||||
"dev": true
|
||||
},
|
||||
"async-each": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
|
||||
|
@ -2442,6 +2448,16 @@
|
|||
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
|
||||
"dev": true
|
||||
},
|
||||
"es6-templates": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/es6-templates/-/es6-templates-0.2.3.tgz",
|
||||
"integrity": "sha1-XLmsn7He1usSOTQrgdeSu7QHjuQ=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"recast": "~0.11.12",
|
||||
"through": "~2.3.6"
|
||||
}
|
||||
},
|
||||
"escape-html": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
||||
|
@ -2803,6 +2819,12 @@
|
|||
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
|
||||
"dev": true
|
||||
},
|
||||
"fastparse": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz",
|
||||
"integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==",
|
||||
"dev": true
|
||||
},
|
||||
"fd-slicer": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
|
||||
|
@ -3899,6 +3921,53 @@
|
|||
"integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=",
|
||||
"dev": true
|
||||
},
|
||||
"html-loader": {
|
||||
"version": "0.5.5",
|
||||
"resolved": "https://registry.npmjs.org/html-loader/-/html-loader-0.5.5.tgz",
|
||||
"integrity": "sha512-7hIW7YinOYUpo//kSYcPB6dCKoceKLmOwjEMmhIobHuWGDVl0Nwe4l68mdG/Ru0wcUxQjVMEoZpkalZ/SE7zog==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"es6-templates": "^0.2.3",
|
||||
"fastparse": "^1.1.1",
|
||||
"html-minifier": "^3.5.8",
|
||||
"loader-utils": "^1.1.0",
|
||||
"object-assign": "^4.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"big.js": {
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
|
||||
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
|
||||
"dev": true
|
||||
},
|
||||
"json5": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
|
||||
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz",
|
||||
"integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^2.0.0",
|
||||
"json5": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"html-minifier": {
|
||||
"version": "3.5.21",
|
||||
"resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz",
|
||||
|
@ -5647,6 +5716,12 @@
|
|||
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
|
||||
"dev": true
|
||||
},
|
||||
"picomatch": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.0.7.tgz",
|
||||
"integrity": "sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==",
|
||||
"dev": true
|
||||
},
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
|
@ -5737,6 +5812,12 @@
|
|||
"parse-ms": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"private": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
|
||||
"integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
|
||||
"dev": true
|
||||
},
|
||||
"process": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz",
|
||||
|
@ -6070,6 +6151,32 @@
|
|||
"readable-stream": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"recast": {
|
||||
"version": "0.11.23",
|
||||
"resolved": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz",
|
||||
"integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ast-types": "0.9.6",
|
||||
"esprima": "~3.1.0",
|
||||
"private": "~0.1.5",
|
||||
"source-map": "~0.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"esprima": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
|
||||
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=",
|
||||
"dev": true
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
|
||||
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"redent": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
|
||||
|
@ -6852,6 +6959,62 @@
|
|||
"has-flag": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"svelte": {
|
||||
"version": "3.4.4",
|
||||
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.4.4.tgz",
|
||||
"integrity": "sha512-O9tzroEWVPOQe1QITW1jP8LAJwXmCfDDGdkOCa9Y6NlJ+gQwn+/rhFbMQ+vu2PWPLZt1gxN8DjTFM4nOBuMLFg==",
|
||||
"dev": true
|
||||
},
|
||||
"svelte-dev-helper": {
|
||||
"version": "1.1.9",
|
||||
"resolved": "https://registry.npmjs.org/svelte-dev-helper/-/svelte-dev-helper-1.1.9.tgz",
|
||||
"integrity": "sha1-fRh9tcbNu9ZNdaMvkbiZi94yc8M=",
|
||||
"dev": true
|
||||
},
|
||||
"svelte-loader": {
|
||||
"version": "2.13.4",
|
||||
"resolved": "https://registry.npmjs.org/svelte-loader/-/svelte-loader-2.13.4.tgz",
|
||||
"integrity": "sha512-seAB2Tn/OkJA8TvTY1fVlWdDCwyribzEagT6qPkTK8RGpG6NugPnjyKJv2jN72Sya4yGIo/fc874c6Je5L7vHA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loader-utils": "^1.1.0",
|
||||
"svelte-dev-helper": "^1.1.9"
|
||||
},
|
||||
"dependencies": {
|
||||
"big.js": {
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
|
||||
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
|
||||
"dev": true
|
||||
},
|
||||
"json5": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
|
||||
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz",
|
||||
"integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^2.0.0",
|
||||
"json5": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"tapable": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz",
|
||||
|
@ -7087,6 +7250,102 @@
|
|||
"utf8-byte-length": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"ts-loader": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-6.0.2.tgz",
|
||||
"integrity": "sha512-kkF3sGf3oBUehlvXI9fkbItbFTnNgGkYAz91vtWnsKAU4m+LAmQjuby7uTZNo3As+/zHLuyB052SkQDY6vLXtg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^2.3.0",
|
||||
"enhanced-resolve": "^4.0.0",
|
||||
"loader-utils": "^1.0.2",
|
||||
"micromatch": "^4.0.0",
|
||||
"semver": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"big.js": {
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
|
||||
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
|
||||
"dev": true
|
||||
},
|
||||
"braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fill-range": "^7.0.1"
|
||||
}
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"is-number": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||
"dev": true
|
||||
},
|
||||
"json5": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
|
||||
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz",
|
||||
"integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^2.0.0",
|
||||
"json5": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"micromatch": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
|
||||
"integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"braces": "^3.0.1",
|
||||
"picomatch": "^2.0.5"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||
"dev": true
|
||||
},
|
||||
"semver": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.1.1.tgz",
|
||||
"integrity": "sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ==",
|
||||
"dev": true
|
||||
},
|
||||
"to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-number": "^7.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
||||
|
|
11
package.json
11
package.json
|
@ -7,19 +7,20 @@
|
|||
"main": "./.webpack/main",
|
||||
"scripts": {
|
||||
"start": "electron-forge start",
|
||||
"build": "tsc",
|
||||
"watch": "tsc -w",
|
||||
"tslint-check": "tslint-config-prettier-check ./tslint.json",
|
||||
"tslint": "tslint -t stylish -c tslint.json -p tsconfig.json",
|
||||
"prettier": "prettier -c **/*.{html,{c,sc,sa,le}ss,yml}"
|
||||
"prettier": "prettier --ignore-path .gitignore -c **/*.{html,json,{c,sc,sa,le}ss,yml}"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@electron-forge/cli": "^6.0.0-beta.39",
|
||||
"@electron-forge/plugin-webpack": "^6.0.0-beta.39",
|
||||
"@marshallofsound/webpack-asset-relocator-loader": "^0.5.0",
|
||||
"@zeit/webpack-asset-relocator-loader": "^0.5.0",
|
||||
"electron": "^2.0.18",
|
||||
"prettier": "^1.18.2",
|
||||
"svelte": "^3.4.4",
|
||||
"svelte-loader": "^2.13.4",
|
||||
"ts-loader": "^6.0.2",
|
||||
"tslint": "^5.17.0",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"tslint-plugin-prettier": "^2.0.1",
|
||||
|
@ -37,7 +38,7 @@
|
|||
"entryPoints": [
|
||||
{
|
||||
"html": "./index.html",
|
||||
"js": "./dist/renderer.js",
|
||||
"js": "./src/renderer.ts",
|
||||
"name": "main_window"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<main>
|
||||
<h1>Hello World</h1>
|
||||
<p>{ text }</p>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
let text = 'tach';
|
||||
</script>
|
||||
|
||||
<style>
|
||||
h1 {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
</style>
|
|
@ -1,5 +1,4 @@
|
|||
import { app, BrowserWindow } from 'electron';
|
||||
import * as path from 'path';
|
||||
|
||||
let mainWindow: Electron.BrowserWindow;
|
||||
|
||||
|
@ -14,7 +13,8 @@ function createWindow() {
|
|||
});
|
||||
|
||||
// and load the index.html of the app.
|
||||
mainWindow.loadFile(path.join(__dirname, '../index.html'));
|
||||
// @ts-ignore
|
||||
mainWindow.loadURL(MAIN_WINDOW_WEBPACK_ENTRY);
|
||||
|
||||
// Open the DevTools.
|
||||
mainWindow.webContents.openDevTools();
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
// This file is required by the index.html file and will
|
||||
// be executed in the renderer process for that window.
|
||||
// All of the Node.js APIs are available in this process.
|
||||
|
||||
// @ts-ignore
|
||||
import App from './app/App.svelte';
|
||||
|
||||
export default new App({
|
||||
target: document.querySelector('#app'),
|
||||
props: {
|
||||
// we'll learn about props later
|
||||
answer: 42,
|
||||
},
|
||||
});
|
||||
|
|
|
@ -5,11 +5,6 @@
|
|||
"noImplicitAny": true,
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "dist",
|
||||
"paths": {
|
||||
"*": ["node_modules/*"]
|
||||
},
|
||||
"allowJs": true
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ module.exports = {
|
|||
* This is the main entry point for your application, it's the first file
|
||||
* that runs in the main process.
|
||||
*/
|
||||
entry: './dist/main.js',
|
||||
entry: './src/main.ts',
|
||||
// Put your normal webpack config below here
|
||||
module: {
|
||||
rules: require('./webpack.rules'),
|
||||
|
|
|
@ -8,26 +8,27 @@ module.exports = [
|
|||
test: /\.(m?js|node)$/,
|
||||
parser: { amd: false },
|
||||
use: {
|
||||
loader: '@marshallofsound/webpack-asset-relocator-loader',
|
||||
loader: '@zeit/webpack-asset-relocator-loader',
|
||||
options: {
|
||||
outputAssetBase: 'native_modules',
|
||||
},
|
||||
},
|
||||
},
|
||||
// Put your webpack loader rules in this array. This is where you would put
|
||||
// your ts-loader configuration for instance:
|
||||
/**
|
||||
* Typescript Example:
|
||||
*
|
||||
* {
|
||||
* test: /\.tsx?$/,
|
||||
* exclude: /(node_modules|.webpack)/,
|
||||
* loaders: [{
|
||||
* loader: 'ts-loader',
|
||||
* options: {
|
||||
* transpileOnly: true
|
||||
* }
|
||||
* }]
|
||||
* }
|
||||
*/
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: /(node_modules|.webpack)/,
|
||||
loaders: [
|
||||
{
|
||||
loader: 'ts-loader',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.svelte$/,
|
||||
loaders: [
|
||||
{
|
||||
loader: 'svelte-loader',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue