GithubHelp home page GithubHelp logo

sindresorhus / electron-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
1.6K 34.0 174.0 763 KB

Boilerplate to kickstart creating an app with Electron

License: MIT License

CSS 10.15% HTML 5.87% JavaScript 83.98%
electron-boilerplate electron boilerplate app template-repository template

electron-boilerplate's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

electron-boilerplate's Issues

Menu Items to open function from other script/file

It seems like bad practice to have other functions within the menu.js file. A menu item should be set up to run a function from main.js or a different functions.js file.

Been banging my head on this one. What should be simple either isn't documented or isn't straight forward.

outdated deps

Some dependencies are out-of-date.

$ npm outdated --depth=0
Package                Current   Wanted  Latest  Location
electron                5.0.10   5.0.10   6.0.7  app-name
electron-builder       20.44.4  20.44.4  21.2.0  app-name
electron-context-menu   0.12.1   0.12.1  0.15.0  app-name
electron-store           3.3.0    3.3.0   4.0.0  app-name
electron-unhandled       2.2.0    2.2.0   3.0.0  app-name

Major Upgrades

  • electron@6
  • electron-builder@21
  • electron-store@4
  • electron-unhandled@3

Minor Upgrades

Questions

  1. What are the known backward compatibility issues that may arise to upgrade all dependencies?
  2. How should electron-boilerplate needs to be tested after a dependency upgrade?

Testing environment

Hi,
thanks for putting this together, I found it quite helpful.
Any chance of adding a very minimal test-environment for the generated app? I know, it requires some opinionated choice, but I believe it'd be good to have a working testing environment to start with (e.g. Grunt/Glue/Npm test task, example tests for both the renderer and the main process, etc..).

Thanks.

Got stuck in Pushing Tags

I got stuck loading in Pushing Tags. I has been wait for around 15minutes but it's never ends.

alt text

Here is my package.json

{
	"name": "com.aalfiann.electron_dev",
	"productName": "Electron Dev",
	"version": "1.1.3",
	"description": "This is my personal project to research the feature of electron.js framework ",
	"license": "MIT",
	"repository": {
		"type": "git",
		"url": "git+https://github.com/aalfiann/electron-dev.git"
	},
	"author": {
		"name": "M ABD AZIZ ALFIAN",
		"email": "[email protected]",
		"url": "https://xxx.com"
	},
	"scripts": {
		"postinstall": "electron-builder install-app-deps",
		"lint": "xo",
		"test": "npm run lint",
		"start": "electron .",
		"pack": "electron-builder --dir",
		"dist": "electron-builder --macos --linux --windows",
		"release": "np"
	},
	"dependencies": {
		"electron-context-menu": "^0.12.1",
		"electron-debug": "^3.0.0",
		"electron-store": "^3.3.0",
		"electron-unhandled": "^2.2.0",
		"electron-updater": "^4.0.6",
		"electron-util": "^0.12.0"
	},
	"devDependencies": {
		"electron": "^5.0.4",
		"electron-builder": "^20.43.0",
		"np": "^5.0.3",
		"xo": "^0.24.0"
	},
	"xo": {
		"envs": [
			"node",
			"browser"
		]
	},
	"np": {
		"publish": true,
		"releaseDraft": false
	},
	"build": {
		"appId": "com.aalfiann.electron_dev",
		"mac": {
			"category": "public.app-category.social-networking",
			"darkModeSupport": true
		},
		"dmg": {
			"iconSize": 160,
			"contents": [
				{
					"x": 180,
					"y": 170
				},
				{
					"x": 480,
					"y": 170,
					"type": "link",
					"path": "/Applications"
				}
			]
		},
		"linux": {
			"target": [
				"AppImage",
				"deb"
			],
			"category": "Network;Chat"
		}
	}
}

whitescreen on idle?

I am finding that my [dirt-simple] app will whitescreen after 30 seconds

It doesn't matter if I'm dev or packaged mode

My app just waits for iOT messages and prints them -- it's not really doing anything...

It will print the messages for 30 seconds (which keep arriving whether the app is open or not) and then whitescreens

I've tried using a setInterval script to keep it alive -- no luck

What am I missing?

Error: Cannot find module 'electron-debug'

Hi,

I run your app on Mac OS X 10.11.6 (15G1004) and this error was showed:

App threw an error during load
Error: Cannot find module 'electron-debug'
at Module._resolveFilename (module.js:470:15)
at Function.Module._resolveFilename (/usr/local/lib/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.
(/hello_electron_boilerplate/index.js:7:1)
at Object.
(/hello_electron_boilerplate/index.js:46:3)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)

Kindest regards.

Lint fails on initial commit due to import/extensions

I think this is really harmless but when I first copied the template, it welcomed me with a red x sign because it did not pass the linter. Interestingly, even though it has the same files and configurations, linter does not say anything on this repository. I cannot wrap my head around why the test passes in this repository but not when I fork it or use the template.

Adding a rule to the xo's config easily solves this issue but it might be better if this is solved in the template.

Here is the output of the test where it fails and the link to the build:

> [email protected] lint /Users/runner/work/electron/electron
> xo

Error: /Users/runner/work/electron/electron/menu.js: line 12, col 24, Error - Missing file extension for "./config" (import/extensions)
Error: /Users/runner/work/electron/electron/index.js: line 9, col 24, Error - Missing file extension for "./config" (import/extensions)
Error: /Users/runner/work/electron/electron/index.js: line 10, col 22, Error - Missing file extension for "./menu" (import/extensions)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.