Merge pull request #387 from alexyak/develop

Added dev parameter
This commit is contained in:
Michael Teeuw 2016-07-30 15:57:39 +02:00 committed by GitHub
commit 8a066a4ec0
3 changed files with 7 additions and 2 deletions

View File

@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Added
- Brazilian Portuguese Translation.
- Option to enable Kios mode.
- Added ability to start the app with Dev Tools.
### Fixed
- Prevent `getModules()` selectors from returning duplicate entries.

View File

@ -43,6 +43,8 @@ curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installer
**Important:** `npm start` does **not** work via SSH, use `DISPLAY=:0 nohup npm start &` instead. This starts the mirror on the remote display.
**Note:** if you want to debug on Raspberry Pi you can use `npm start dev` which will start the MagicMirror app with Dev Tools enabled.
#### Server Only
In some cases, you want to start the application without an actual app window. In this case, execute the following command from the MagicMirror folder: `node serveronly`. This will start the server, after which you can open the application in your browser of choice.

View File

@ -27,8 +27,10 @@ function createWindow() {
//mainWindow.loadURL('file://' + __dirname + '../../index.html');
mainWindow.loadURL("http://localhost:" + config.port);
// Open the DevTools.
//mainWindow.webContents.openDevTools();
// Open the DevTools if run with "npm start dev"
if(process.argv[2] == "dev"){
mainWindow.webContents.openDevTools();
}
// Emitted when the window is closed.
mainWindow.on("closed", function() {