{"id":20827262,"url":"https://github.com/ccnokes/electron-did-fail-load","last_synced_at":"2025-08-09T05:19:11.460Z","repository":{"id":88144056,"uuid":"56788601","full_name":"ccnokes/electron-did-fail-load","owner":"ccnokes","description":"Sample app demonstrating did-fail-load ","archived":false,"fork":false,"pushed_at":"2016-04-21T16:19:54.000Z","size":673,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-18T17:55:25.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ccnokes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-21T16:17:28.000Z","updated_at":"2016-04-21T16:19:57.000Z","dependencies_parsed_at":"2023-07-23T19:46:27.703Z","dependency_job_id":null,"html_url":"https://github.com/ccnokes/electron-did-fail-load","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnokes%2Felectron-did-fail-load","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnokes%2Felectron-did-fail-load/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnokes%2Felectron-did-fail-load/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnokes%2Felectron-did-fail-load/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ccnokes","download_url":"https://codeload.github.com/ccnokes/electron-did-fail-load/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243174902,"owners_count":20248363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T23:11:36.561Z","updated_at":"2025-03-12T07:25:46.333Z","avatar_url":"https://github.com/ccnokes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"electron-boilerplate\n==============\nComprehensive boilerplate application for [Electron runtime](http://electron.atom.io).  \n\nScope of this project:\n\n- Provide basic structure of the application so you can much easier grasp what should go where.\n- Give you cross-platform development environment, which works the same way on OSX, Windows and Linux.\n- Generate ready for distribution installers of your app for all three operating systems.\n\nNot in the scope:\n\n- Imposing on you any framework (e.g. Angular, React). You can integrate the one which makes most sense for you.\n\n# Quick start\nThe only development dependency of this project is [Node.js](https://nodejs.org). So just make sure you have it installed.\nThen type few commands known to every Node developer...\n```\ngit clone https://github.com/szwacz/electron-boilerplate.git\ncd electron-boilerplate\nnpm install\nnpm start\n```\n... and boom! You have running desktop application on your screen.\n\n# Structure of the project\n\nThere are **two** `package.json` files:  \n\n#### 1. For development\nSits on path: `electron-boilerplate/package.json`. Here you declare dependencies for your development environment and build scripts. **This file is not distributed with real application!**\n\nAlso here you declare the version of Electron runtime you want to use:\n```json\n\"devDependencies\": {\n  \"electron-prebuilt\": \"^0.34.0\"\n}\n```\n\n#### 2. For your application\nSits on path: `electron-boilerplate/app/package.json`. This is **real** manifest of your application. Declare your app dependencies here.\n\n#### OMG, but seriously why there are two `package.json`?\n1. Native npm modules (those written in C, not JavaScript) need to be compiled, and here we have two different compilation targets for them. Those used in application need to be compiled against electron runtime, and all `devDependencies` need to be compiled against your locally installed node.js. Thanks to having two files this is trivial.\n2. When you package the app for distribution there is no need to add up to size of the app with your `devDependencies`. Here those are always not included (because reside outside the `app` directory).\n\n### Project's folders\n\n- `app` - code of your application goes here.\n- `config` - place where you can declare environment specific stuff for your app.\n- `build` - in this folder lands built, runnable application.\n- `releases` - ready for distribution installers will land here.\n- `resources` - resources needed for particular operating system.\n- `tasks` - build and development environment scripts.\n\n\n# Development\n\n#### Installation\n\n```\nnpm install\n```\nIt will also download Electron runtime, and install dependencies for second `package.json` file inside `app` folder.\n\n#### Starting the app\n\n```\nnpm start\n```\n\n#### Adding npm modules to your app\n\nRemember to add your dependency to `app/package.json` file, so do:\n```\ncd app\nnpm install name_of_npm_module --save\n```\n\n#### Native npm modules\n\nWant to use [native modules](https://github.com/atom/electron/blob/master/docs/tutorial/using-native-node-modules.md)? This objective needs some extra work (rebuilding module for Electron). In this boilerplate it's fully automated, just use special command instead of standard `npm install something` when want to install native module.\n```\nnpm run install-native -- name_of_native_module\n```\nThis script when run first time will add [electron-rebuild](https://github.com/electronjs/electron-rebuild) to your project. After that everything is wired and no further maintenance is necessary.\n\n#### Working with modules\n\nHow about being future proof and using ES6 modules all the time in your app? Thanks to [rollup](https://github.com/rollup/rollup) you can do that. It will transpile the imports to proper `require()` statements, so even though ES6 modules aren't natively supported yet you can start using them today.\n\nYou can use it on those kinds of modules:\n```js\n// Modules authored by you\nimport { myStuff } from './my_lib/my_stuff';\n// Node.js native\nimport fs from 'fs';\n// Electron native\nimport { app } from 'electron';\n// Loaded from npm\nimport moment from 'moment';\n```\n\n#### Including files to your project\n\nThe build script copies files from `app` to `build` directory and the application is started from `build`. Therefore if you want to use any special file/folder in your app make sure it will be copied via some of glob patterns in `tasks/build.js`:\n\n```js\nvar paths = {\n    copyFromAppDir: [\n        './node_modules/**',\n        './vendor/**',\n        './**/*.html',\n        './**/*.+(jpg|png|svg)'\n    ],\n}\n```\n\n#### Unit tests\n\nelectron-boilerplate has preconfigured [jasmine](http://jasmine.github.io/2.0/introduction.html) test runner. To run the tests go with standard:\n```\nnpm test\n```\nYou don't have to declare paths to spec files in any particular place. The runner will search through the project for all `*.spec.js` files and include them automatically.\n\n\n# Making a release\n\n**Note:** There are various icon and bitmap files in `resources` directory. Those are used in installers and are intended to be replaced by your own graphics.\n\nTo make ready for distribution installer use command:\n```\nnpm run release\n```\nIt will start the packaging process for operating system you are running this command on. Ready for distribution file will be outputted to `releases` directory.\n\nYou can create Windows installer only when running on Windows, the same is true for Linux and OSX. So to generate all three installers you need all three operating systems.\n\n## Mac only\n\n#### App signing\n\nThe Mac release supports [code signing](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html). To sign the `.app` in the release image, include the certificate ID in the command as so,\n```\nnpm run release -- --sign A123456789\n```\n\n## Windows only\n\n#### Installer\n\nThe installer is built using [NSIS](http://nsis.sourceforge.net). You have to install NSIS version 3.0, and add its folder to PATH in Environment Variables, so it is reachable to scripts in this project. For example, `C:\\Program Files (x86)\\NSIS`.\n\n#### 32-bit build on 64-bit Windows\n\nThere are still a lot of 32-bit Windows installations in use. If you want to support those systems and have 64-bit OS make sure you've installed 32-bit (instead of 64-bit) Node version. There are [versions managers](https://github.com/coreybutler/nvm-windows) if you feel the need for both architectures on the same machine.\n\n# License\n\nThe MIT License (MIT)\n\nCopyright (c) 2015-2016 Jakub Szwacz\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccnokes%2Felectron-did-fail-load","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccnokes%2Felectron-did-fail-load","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccnokes%2Felectron-did-fail-load/lists"}