Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
7,711 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,181 @@ | ||
# electron-quick-start | ||
# Desktop Dimmer [![Beta](https://img.shields.io/badge/status-alpha-blue.svg?style=flat)]() [![TravisCI](http://img.shields.io/travis/sidneys/desktop-dimmer.svg?style=flat)](http://travis-ci.org/sidneys/desktop-dimmer) [![AppVeyor](https://ci.appveyor.com/api/projects/status/d69sb6iav7tnrldq?svg=true)](https://ci.appveyor.com/project/sidneys/desktop-dimmer) [![npm](https://img.shields.io/npm/v/desktop-dimmer.svg?style=flat)](https://npmjs.com/package/desktop-dimmer) | ||
|
||
**Clone and run for a quick way to see an Electron in action.** | ||
<p align="center"> | ||
<img height="250px" src="https://raw.githubusercontent.com/sidneys/desktop-dimmer/release/resources/graphics/icon-app.png"/><br><br> | ||
<b>Enable darker-than-dark dimming for internal and external screens.</b><br> | ||
Available for macOS, Windows and Linux (Beta). | ||
</p> | ||
|
||
This is a minimal Electron application based on the [Quick Start Guide](http://electron.atom.io/docs/latest/tutorial/quick-start) within the Electron documentation. | ||
|
||
**Use this app along with the [Electron API Demos](http://electron.atom.io/#get-started) app for API code examples to help you get started.** | ||
------ | ||
|
||
A basic Electron application needs just these files: | ||
![macOS](https://raw.githubusercontent.com/sidneys/desktop-dimmer/release/resources/screenshots/screenshot-macos.png) | ||
![Windows 10](https://raw.githubusercontent.com/sidneys/desktop-dimmer/release/resources/screenshots/screenshot-win32.png) | ||
|
||
- `package.json` - Points to the app's main file and lists its details and dependencies. | ||
- `main.js` - Starts the app and creates a browser window to render HTML. This is the app's **main process**. | ||
- `index.html` - A web page to render. This is the app's **renderer process**. | ||
------ | ||
|
||
You can learn more about each of these components within the [Quick Start Guide](http://electron.atom.io/docs/latest/tutorial/quick-start). | ||
> **Cross-Platform** | ||
## To Use | ||
Tested on macOS Sierra, Windows 10 Anniversary. Beta support for Ubuntu 16.10. | ||
|
||
To clone and run this repository you'll need [Git](https://git-scm.com) and [Node.js](https://nodejs.org/en/download/) (which comes with [npm](http://npmjs.com)) installed on your computer. From your command line: | ||
> **Lean** | ||
Small resource footprint, minimal User Interface. | ||
|
||
> **Unobstrusive** | ||
Settings are persisted and restored per-Display without any configuration. | ||
|
||
> **Smart** | ||
Heading out? Disconnecting and reconnecting external displays are handled seamlessly. | ||
|
||
> **Open Source** | ||
GitHub-based workflow, MIT licensed. | ||
|
||
|
||
## Contents | ||
|
||
1. [Installation](#installation) | ||
2. [Developers](#development) | ||
3. [Continuous Integration](#continuous-integration) | ||
4. [Up Next](#up-next) | ||
5. [Contact](#contact) | ||
6. [Author](#author) | ||
|
||
|
||
## <a name="installation"/></a> Installation | ||
|
||
### Standard Installation | ||
|
||
Download the latest version of Desktop Dimmer on the [Releases](https://github.com/sidneys/desktop-dimmer/releases) page. | ||
|
||
### Installation as Commandline Tool | ||
|
||
```bash | ||
# Clone this repository | ||
git clone https://github.com/electron/electron-quick-start | ||
# Go into the repository | ||
cd electron-quick-start | ||
# Install dependencies | ||
npm install --global desktop-dimmer # Installs the node CLI module | ||
desktop-dimmer # Runs it | ||
``` | ||
|
||
|
||
## <a name="developers"/></a> Developers | ||
|
||
### Sources | ||
|
||
Clone the repo and install dependencies. | ||
|
||
```shell | ||
git clone https://github.com/sidneys/desktop-dimmer.git desktop-dimmer | ||
cd desktop-dimmer | ||
npm install | ||
# Run the app | ||
npm start | ||
``` | ||
|
||
Learn more about Electron and its API in the [documentation](http://electron.atom.io/docs/latest). | ||
### Scripts | ||
|
||
#### npm run **start** | ||
|
||
Run the app with integrated Electron. | ||
|
||
```bash | ||
npm run start | ||
npm run start:dev # with Debugging Tools | ||
npm run start:livereload # with Debugging Tools and Livereload | ||
``` | ||
|
||
#### npm run **localsetup** | ||
|
||
Install the app in the System app folder and start it. | ||
|
||
```bash | ||
npm run localsetup | ||
npm run localsetup:rebuild # Build before installation | ||
npm run localsetup:rebuild:dev # Build before installation, use Developer Tools | ||
``` | ||
|
||
#### npm run **build** | ||
|
||
Build the app and create installers (see [requirements](#build-requirements)). | ||
|
||
```bash | ||
npm run build # build all available platforms | ||
npm run build macos windows # build specific platforms (macos/linux/windows) | ||
``` | ||
|
||
### Build Requirements | ||
|
||
* Building for Windows requires [`wine`](https://winehq.org) and [`mono`](https://nsis.sourceforge.net/Docs/Chapter3.htm) (on macOS, Linux) | ||
* Building for Linux requires [`fakeroot`](https://wiki.debian.org/FakeRoot) and [`dpkg `](https://wiki.ubuntuusers.de/dpkg/) (on macOS, Windows) | ||
* Only macOS can build for other platforms. | ||
|
||
#### macOS Build Setup | ||
|
||
Install [Homebrew](https://brew.sh), then run: | ||
|
||
```bash | ||
brew install wine mono fakeroot dpkg | ||
``` | ||
|
||
#### Linux Build Setup | ||
|
||
```bash | ||
sudo apt-get install wine mono fakeroot dpkg | ||
``` | ||
|
||
|
||
## <a name="continuous-integration"/></a> Continuous Integration | ||
|
||
> Turnkey **build-in-the-cloud** for Windows 10, macOS and Linux. | ||
The process is managed by a custom layer of node scripts and Electron-optimized configuration templates. | ||
Completed Installation packages are deployed to [GitHub Releases](https://github.com/sidneys/desktop-dimmer/releases). Builds for all platforms and architectures take about 5 minutes. | ||
Backed by the open-source-friendly guys at [Travis](http://travis-ci.org/) and AppVeyor](https://ci.appveyor.com/) and running [electron-packager](https://github.com/electron-userland/electron-packager) under the hood. | ||
|
||
### Setup | ||
|
||
1. [Fork](https://github.com/sidneys/desktop-dimmer/fork) the repo | ||
2. Generate your GitHub [Personal Access Token](https://github.com/settings/tokens) using "repo" as scope. Copy it to the clipboard. | ||
3. **macOS + Linux** | ||
1. Sign in to [Travis](http://travis-ci.org/) using GitHub. | ||
2. Open your [Travis Profile](https://travis-ci.org/profile), click "Sync Account" and wait for the process to complete. | ||
3. Find this repository in the list, enable it and click "⚙" to open its settings. | ||
4. Create a new Environment Variable named **GITHUB_TOKEN**. Paste your Token from step 2 as *value*. | ||
4. **Windows** | ||
1. Sign in to [AppVeyor](https://ci.appveyor.com/) using GitHub. | ||
2. Click on ["New Project"](https://ci.appveyor.com/projects/new), select "GitHub", look up this repo in the list and click "Add". | ||
3. After import navigate to the *Settings* > *Environment* subsection | ||
4. Select "Add Variable", insert **GITHUB_TOKEN** for *name*, paste your Token as *value*. Save. | ||
|
||
### Triggering Builds | ||
|
||
1. Add a new Tag to start the build process: | ||
|
||
```shell | ||
git tag -a v1.0.1 | ||
git push --tags | ||
``` | ||
The builds are started in parallel and added to the "Releases" page of the GitHub repo (in draft mode). | ||
|
||
2. Use the editing feature to publish the new app version. | ||
|
||
3. There is no step 3 | ||
|
||
|
||
## <a name="up-next"/></a> Up Next ![img](https://img.shields.io/badge/proposals-welcome-green.svg?style=flat) | ||
|
||
- [ ] <span style="color: cyan;">Colored Shades</span> | ||
- [ ] In-App Updates (Squirrel) | ||
- [ ] Signed binaries | ||
- [ ] E2E Testing ([Spectron](https://github.com/electron/spectron)) | ||
|
||
|
||
## <a name="contribute"/></a> Contact ![Contributions Wanted](https://img.shields.io/badge/contributions-wanted-red.svg?style=flat) | ||
|
||
* [Gitter](http://gitter.im/sidneys/desktop-dimmer) Developer Chat | ||
* [Issues](http;//github.com/sidneys/desktop-dimmer/issues) File, track and discuss features and issues | ||
* [Wiki](http;//github.com/sidneys/desktop-dimmer/wiki) Read or contribute to the project Wiki | ||
|
||
## Other Example Apps | ||
|
||
For more example apps, see the | ||
[list of boilerplates](http://electron.atom.io/community/#boilerplates) | ||
created by the awesome electron community. | ||
## <a name="author"/></a> Author | ||
|
||
#### License [CC0 1.0 (Public Domain)](LICENSE.md) | ||
[sidneys](http://sidneys.github.io) 2016 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.