Skip to content

Instantly share code, notes, and snippets.

@comfortablejohn
comfortablejohn / webpack.config.js
Created August 10, 2017 07:55
Webpack Config for Preact (JSX)
module.exports = {
entry: './src/js/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'app.bundle.js',
},
devtool: 'source-map',
module: {
rules: [{
test: /\.js$/,
@comfortablejohn
comfortablejohn / launch.json
Created August 10, 2017 07:57
Debug config for VSCode Chrome Debugger
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"sourceMaps": true,
"webRoot": "${workspaceRoot}/dist",
class MenuDelegate: NSObject, NSMenuDelegate {
func menuWillOpen(_ menu: NSMenu) {
print("Menu opened!")
// do things
}
}
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
var statusItem: NSStatusItem?