MichMich's MagicMirror2 module template for convenient development with ES6 language and React library.
Module installation requires node v14.16.1 and some of registered libs may not be compatible with most recent node versions.
for modern language facilities
(16.6 as now)
with flow runtime
(.scss files)
handled by Webpack: npm run build
or npm run build-prod
thanks to npm-check module: npm run upgrade-interactive
provides ESLint, Stylelint checks: npm run lint
with jest runtime: npm test
, track source changes npm run jest:watch
at pre-commit and pre-push stages (can be ignored with --no-verify
switch, but will threaten dozens of kittens...)
- Clone repository into
/modules/
inside your MagicMirror folder, with proper module name as directory (git clone to directory MMM-YOUR-MODULE) - Run
npm install
inside/modules/MMM-YOUR-MODULE/
folder - Run
npm run init:mmm MMM-YOUR-MODULE
, it will automatically set up package.json for you - Update
MODULE_NAME
value insrc/client/module.js
file to use MMM-YOUR-MODULE - Run
npm run build
- Check that
MMM-YOUR-MODULE.js
,styles.css
andnode_helper.js
files have been created into current folder - Add the module to the MagicMirror config.