Added dev parameter

This commit is contained in:
Alex Yakhnin 2016-07-30 09:42:31 -04:00
parent c4f9388668
commit b98237fa44
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 ### Added
- Brazilian Portuguese Translation. - Brazilian Portuguese Translation.
- Option to enable Kios mode. - Option to enable Kios mode.
- Added ability to start the app with Dev Tools.
### Fixed ### Fixed
- Prevent `getModules()` selectors from returning duplicate entries. - 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. **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 #### 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. 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('file://' + __dirname + '../../index.html');
mainWindow.loadURL("http://localhost:" + config.port); mainWindow.loadURL("http://localhost:" + config.port);
// Open the DevTools. // Open the DevTools if run with "npm start dev"
//mainWindow.webContents.openDevTools(); if(process.argv[2] == "dev"){
mainWindow.webContents.openDevTools();
}
// Emitted when the window is closed. // Emitted when the window is closed.
mainWindow.on("closed", function() { mainWindow.on("closed", function() {