Skip to content

Commit 1d690d2

Browse files
authored
replace "npm run" with "node --run" as already done in mm repo (#321)
1 parent 9f03b0f commit 1d690d2

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

configuration/autostart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Add the following lines:
4444

4545
```shell
4646
cd ./MagicMirror
47-
DISPLAY=:0 npm run start
47+
DISPLAY=:0 node --run start
4848
```
4949

5050
Save and close, using the commands `CTRL-O` and `CTRL-X`. Now make sure the

configuration/introduction.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ installation.
4242
2. Modify your required settings using your preferred editor. `nano` is the
4343
easiest.
4444

45-
3. You can check your configuration running `npm run config:check` in
45+
3. You can check your configuration running `node --run config:check` in
4646
`~/MagicMirror`.
4747

4848
The following properties can be configured, place them above the modules item:
@@ -84,31 +84,31 @@ By default, you would use config.js with a bash script (mm.sh):
8484

8585
```bash
8686
cd ~/MagicMirror
87-
npm run start
87+
node --run start
8888
```
8989

9090
To use the 2nd configuration file, use a bash script like this (mm2.sh):
9191

9292
```bash
9393
cd ~/MagicMirror
9494
export MM_CONFIG_FILE=config/config2.js
95-
npm run start
95+
node --run start
9696
```
9797

9898
To change the port:
9999

100100
```bash
101101
cd ~/MagicMirror
102102
export MM_PORT=8081
103-
npm run start
103+
node --run start
104104
```
105105

106-
You can run `npm run config:check` on your 2nd configuration file by typing the
106+
You can run `node --run config:check` on your 2nd configuration file by typing the
107107
export line in first, example:
108108

109109
```bash
110110
export MM_CONFIG_FILE=config/config2.js
111-
npm run config:check
111+
node --run config:check
112112
```
113113

114114
```log
@@ -182,7 +182,7 @@ cd ~/MagicMirror
182182
export MY_ADDRESS=localhost
183183
export MY_PORT=8080
184184
export MY_HTTPS=false
185-
npm run start
185+
node --run start
186186
```
187187

188188
### Using `electronOptions`
@@ -217,15 +217,15 @@ Starting Script 1 (mm.sh):
217217
218218
```bash
219219
cd ~/MagicMirror
220-
npm run start
220+
node --run start
221221
```
222222
223223
Starting Script 2 (mm2.sh):
224224
225225
```bash
226226
cd ~/MagicMirror
227227
export MM_CONFIG_FILE=config/config2.js
228-
npm run start
228+
node --run start
229229
```
230230
231231
Configuration file 1 (config.js):

getting-started/installation.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ installers can be found under:
2424
3. Clone the repository:
2525
`git clone https://github.com/MagicMirrorOrg/MagicMirror`
2626
4. Enter the repository: `cd MagicMirror`
27-
5. Install the application: `npm run install-mm`
27+
5. Install the application: `node --run install-mm`
2828
6. Make a copy of the config sample file:
2929
`cp config/config.js.sample config/config.js`
30-
7. Start the application: `npm run start` \
31-
For **Server Only** use: `npm run server`
30+
7. Start the application: `node --run start` \
31+
For **Server Only** use: `node --run server`
3232

3333
::: warning NOTE
3434

35-
The installation step for `npm run install-mm` will take a very long time, often
35+
The installation step for `node --run install-mm` will take a very long time, often
3636
with little or no terminal response! For the RPi3 this is **~10** minutes and
3737
for the Rpi2 **~25** minutes. Do not interrupt or you risk getting a
3838
:broken_heart: by Raspberry Jam.
@@ -82,10 +82,10 @@ team. Use these scripts and methods at your own risk.
8282

8383
Note the following:
8484

85-
- `npm run start` does **not** work via SSH. But you can use
86-
`DISPLAY=:0 nohup npm run start &` instead. \
85+
- `node --run start` does **not** work via SSH. But you can use
86+
`DISPLAY=:0 nohup node --run start &` instead. \
8787
This starts the mirror on the remote display.
88-
- If you want to debug on your Raspberry Pi you can use `npm run start:dev`
88+
- If you want to debug on your Raspberry Pi you can use `node --run start:dev`
8989
which will start MM with _Dev Tools_ enabled.
9090
- To access the toolbar menu when in mirror mode, hit `ALT` key.
9191
- To toggle the (web) `Developer Tools` from mirror mode, use `CTRL-SHIFT-I` or
@@ -95,7 +95,7 @@ Note the following:
9595

9696
In some cases, you want to start the application without an actual app window.
9797
In this case, you can start MagicMirror² in server only mode by manually running
98-
`npm run server`. This will start the server, after which you can open the
98+
`node --run server`. This will start the server, after which you can open the
9999
application in your browser of choice. Detailed description below.
100100

101101
::: warning IMPORTANT
@@ -127,7 +127,7 @@ port number of the server)
127127

128128
### Wayland
129129

130-
If you use Wayland. Run `npm run start:wayland` instead of `npm run start` to
130+
If you use Wayland. Run `node --run start:wayland` instead of `node --run start` to
131131
start.
132132

133133
### Windows
@@ -139,5 +139,5 @@ you can also run it on Windows. Some third-party modules may not work on Windows
139139

140140
:::
141141

142-
In Windows you must use `npm run start:windows` instead of
143-
`npm run start`.
142+
In Windows you must use `node --run start:windows` instead of
143+
`node --run start`.

modules/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ see [configuration](/configuration/introduction.md) for more information.
77
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
88
| `module` | The name of the module. This can also contain the subfolder. Valid examples include `clock`, `default/calendar` and `custommodules/mymodule`. |
99
| `position` | The location of the module in which the module will be loaded. The built in values are `top_bar`, `top_left`, `top_center`, `top_right`, `upper_third`, `middle_center`, `lower_third`, `bottom_left`, `bottom_center`, `bottom_right`, `bottom_bar`, `fullscreen_above`, and `fullscreen_below`. This field is optional but most modules require this field to set. (if not set, the module will not be shown, but will run the same) Check the documentation of the module for more information. Multiple modules with the same position will be ordered based on the order in the configuration file, top down. |
10-
| | Note: <br><br>if your implementation of MagicMirror wishes to use custom position values, they need to be used in **index.html** , and in the format <br><br>class="region newpos-a newpos-b"<br> <br>MagicMirror will join the last two terms with an underscore to make a position value like <br><br>newpos-a_newpos-b<br><br>example: class="region top3 left" <br>the position will be "top3_left"<br><br>newpos_b is optional<br>class="region top3" would be valid and produce a position of "top3"<br><br>the new position values will be checked during MagicMirror startup and also in the configuration checker <br> npm run config:check <br><br> AND you have to have the appropriate css settings in custom.css for these new region values (top3 and left as used in the example above) |
10+
| | Note: <br><br>if your implementation of MagicMirror wishes to use custom position values, they need to be used in **index.html** , and in the format <br><br>class="region newpos-a newpos-b"<br> <br>MagicMirror will join the last two terms with an underscore to make a position value like <br><br>newpos-a_newpos-b<br><br>example: class="region top3 left" <br>the position will be "top3_left"<br><br>newpos_b is optional<br>class="region top3" would be valid and produce a position of "top3"<br><br>the new position values will be checked during MagicMirror startup and also in the configuration checker <br> node --run config:check <br><br> AND you have to have the appropriate css settings in custom.css for these new region values (top3 and left as used in the example above) |
1111
| `classes` | One or more additional CSS classes which will be set on the module, as a string of space-separated values. This field is optional. |
1212
| `header` | To display a header text above the module, add the header property. This field is optional. |
1313
| `hiddenOnStartup` | Set module as being hidden on startup. This field is optional. |

modules/updatenotification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ modules: [
5454
// array of module update commands
5555
{
5656
// update of MMM-Test with embed npm script
57-
"MMM-Test": "npm run update",
57+
"MMM-Test": "node --run update",
5858
},
5959
{
6060
// update of MMM-OtherSample with "complex" process command

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
"vuepress": "^2.0.0-rc.21"
1515
},
1616
"scripts": {
17-
"start": "npm run docs:dev",
17+
"start": "node --run docs:dev",
1818
"docs:dev": "vuepress dev .",
1919
"docs:build": "vuepress build .",
2020
"lint": "prettier . --write",
21-
"test": "npm run test:format && npm run test:spelling",
21+
"test": "node --run test:format && node --run test:spelling",
2222
"test:format": "prettier . --check",
2323
"test:spelling": "cspell . --gitignore"
2424
}

0 commit comments

Comments
 (0)