Skip to content

Commit

Permalink
v1.8.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneys committed Dec 23, 2016
1 parent aa996f2 commit 3a73797
Show file tree
Hide file tree
Showing 69 changed files with 7,711 additions and 489 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Expand Up @@ -60,7 +60,7 @@ deploy:

notifications:
- provider: Webhook
url: https://webhooks.gitter.im/e/f29f98b58ec67b5f0f59
url: https://webhooks.gitter.im/e/4254b68cb8c0df23d61f
method: GET
on_build_success: false
on_build_failure: true
Expand Down
8 changes: 4 additions & 4 deletions .travis.yml
@@ -1,7 +1,7 @@
matrix:
include:
- os: osx
osx_image: xcode8
osx_image: xcode8.2
sudo: required
- os: linux
dist: trusty
Expand All @@ -26,8 +26,8 @@ cache:
before_install:
- curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | NVM_DIR=$HOME/.nvm sh
- source $HOME/.nvm/nvm.sh
- nvm install 6.6.0
- nvm use 6.6.0
- nvm install 7.2.1
- nvm use 7.2.1

install:
- npm install
Expand All @@ -44,7 +44,7 @@ after_success:
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/24d905038aa07dda37df
- https://webhooks.gitter.im/e/a1a9de50af1c703bfe6c
on_success: change
on_failure: always
on_start: never
189 changes: 165 additions & 24 deletions README.md
@@ -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
20 changes: 5 additions & 15 deletions app/es6-init.js
Expand Up @@ -25,22 +25,12 @@ const electronCompile = require('electron-compile');
*/
let npmScript = process.env['npm_lifecycle_event'];

/**
* Set DEBUG Environment Variable
* @global
*/
if (npmScript === 'debug') {
if (!process.env['DEBUG']) { process.env['DEBUG'] = true; }
if (npmScript && npmScript.includes('dev')) {
process.env.NODE_ENV = 'dev';
}

/**
* Set LIVERELOAD Environment Variable
* @global
*/
if (npmScript === 'livereload') {
if (!process.env['DEBUG']) { process.env['DEBUG'] = true; }
process.env['livereload'] = true;
if (npmScript && npmScript.includes('livereload')) {
process.env.NODE_ENV = 'livereload';
}


electronCompile.init(appRootPath, './scripts/components/application');
electronCompile.init(appRootPath, './scripts/components/application');
Binary file added app/fonts/MaterialIcons-Regular.eot
Binary file not shown.

0 comments on commit 3a73797

Please sign in to comment.