mirror of
https://github.com/edward-shen/MMM-pages.git
synced 2024-11-21 17:54:29 -08:00
Enforced AirBnB style, updated syntax.
This commit is contained in:
parent
e06acc7b09
commit
a900b39f4c
6 changed files with 571 additions and 76 deletions
8
.eslintrc.json
Normal file
8
.eslintrc.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"extends": "airbnb-base",
|
||||||
|
"globals": {
|
||||||
|
"Module": true,
|
||||||
|
"Log": true,
|
||||||
|
"MM": true
|
||||||
|
}
|
||||||
|
}
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
191
MMM-pages.js
191
MMM-pages.js
|
@ -1,89 +1,130 @@
|
||||||
Module.register("MMM-pages", {
|
Module.register('MMM-pages', {
|
||||||
defaults: {
|
|
||||||
modules: [],
|
|
||||||
excludes: ["MMM-page-indicator"],
|
|
||||||
animationTime: 1000,
|
|
||||||
rotationTime: 0,
|
|
||||||
rotationDelay: 10000
|
|
||||||
},
|
|
||||||
|
|
||||||
getStyles: function () {
|
/**
|
||||||
return ["pages.css"];
|
* By default, we have don't psuedo-paginate any modules. We also exclude
|
||||||
},
|
* the page indicator by default, in case people actually want to use the
|
||||||
|
* sister module. We also don't rotate out modules by default.
|
||||||
|
*/
|
||||||
|
defaults: {
|
||||||
|
modules: [],
|
||||||
|
excludes: ['MMM-page-indicator'],
|
||||||
|
animationTime: 1000,
|
||||||
|
rotationTime: 0,
|
||||||
|
rotationDelay: 10000,
|
||||||
|
},
|
||||||
|
|
||||||
start: function () {
|
getStyles() {
|
||||||
this.curPage = 0;
|
return ['pages.css'];
|
||||||
|
},
|
||||||
|
|
||||||
// Disable rotation if an invalid input is given
|
/**
|
||||||
this.config.rotationTime = Math.max(this.config.rotationTime, 0);
|
* Pseudo-constructor for our module. Makes sure that values aren't negative,
|
||||||
this.config.rotationDelay = Math.max(this.config.rotationDelay, 0);
|
* and sets the default current page to 0.
|
||||||
|
*/
|
||||||
|
start() {
|
||||||
|
this.curPage = 0;
|
||||||
|
|
||||||
Log.log(this.config.rotationTime + "|" + this.config.rotationDelay);
|
// Disable rotation if an invalid input is given
|
||||||
},
|
this.config.rotationTime = Math.max(this.config.rotationTime, 0);
|
||||||
|
this.config.rotationDelay = Math.max(this.config.rotationDelay, 0);
|
||||||
|
},
|
||||||
|
|
||||||
notificationReceived: function (notification, payload, sender) {
|
/**
|
||||||
if (notification === "PAGE_CHANGED") {
|
* Handles incoming notifications. Repsonds to the following:
|
||||||
Log.log(this.name + " recieved a notification to change to page " + payload);
|
* 'PAGE_CHANGED' - Set the page to the specified payload page.
|
||||||
this.curPage = payload;
|
* 'PAGE_INCREMENT' - Move to the next page.
|
||||||
this.updatePages(true);
|
* 'PAGE_DECREMENT' - Move to the previous page.
|
||||||
} else if (notification === "PAGE_INCREMENT") {
|
* 'DOM_OBJECTS_CREATED' - Starts the module.
|
||||||
Log.log(this.name + " recieved a notification to increment pages!");
|
* @param {string} notification the notification ID
|
||||||
if (this.curPage === this.config.modules.length - 1) {
|
* @param {number} payload the page to change to
|
||||||
this.curPage = 0;
|
*/
|
||||||
} else { this.curPage++ }
|
notificationReceived(notification, payload) {
|
||||||
this.updatePages(true);
|
switch (notification) {
|
||||||
} else if (notification === "PAGE_DECREMENT") {
|
case 'PAGE_CHANGED':
|
||||||
Log.log(this.name + " recieved a notification to decrement pages!");
|
Log.log(`${this.name} recieved a notification`
|
||||||
if (this.curPage === 0) {
|
+ `to change to page ${payload}`);
|
||||||
this.curPage = this.config.modules.length - 1;
|
if (typeof curPage === 'number') {
|
||||||
} else { this.curPage-- }
|
this.curPage = payload;
|
||||||
this.updatePages(true);
|
} else {
|
||||||
} else if (notification === "DOM_OBJECTS_CREATED") {
|
Log.error('Was asked to change to a nonnumber!');
|
||||||
Log.log(this.name + " recieved that all objects are created; will now hide things!");
|
|
||||||
this.updatePages(true);
|
|
||||||
|
|
||||||
this.sendNotification("MAX_PAGES_CHANGED", this.config.modules.length);
|
|
||||||
}
|
}
|
||||||
},
|
this.updatePages(true);
|
||||||
|
break;
|
||||||
|
case 'PAGE_INCREMENT':
|
||||||
|
Log.log(`${this.name} recieved a notification to increment pages!`);
|
||||||
|
this.curPage = (this.curPage === this.config.modules.length - 1)
|
||||||
|
? 0 : this.curPage + 1;
|
||||||
|
this.updatePages(true);
|
||||||
|
break;
|
||||||
|
case 'PAGE_DECREMENT':
|
||||||
|
Log.log(`${this.name} recieved a notification to decrement pages!`);
|
||||||
|
this.curPage = (this.curPage === 0)
|
||||||
|
? this.config.modules.length - 1 : this.curPage - 1;
|
||||||
|
this.updatePages(true);
|
||||||
|
break;
|
||||||
|
case 'DOM_OBJECTS_CREATED':
|
||||||
|
Log.log(`${this.name} recieved that all objects are created;`
|
||||||
|
+ 'will now hide things!');
|
||||||
|
this.updatePages(true);
|
||||||
|
this.sendNotification(
|
||||||
|
'MAX_PAGES_CHANGED',
|
||||||
|
this.config.modules.length,
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// TODO: Add slide-left/right animation
|
||||||
|
/**
|
||||||
|
* Handles hiding the current page's elements and unhinding the next page's
|
||||||
|
* elements.
|
||||||
|
* @param {boolean} manuallyCalled whether or not to add in an extended delay.
|
||||||
|
*/
|
||||||
|
updatePages(manuallyCalled) {
|
||||||
|
if (this.config.modules.length !== 0) {
|
||||||
|
Log.log(`updatePages was ${manuallyCalled ? '' : 'not'} manually called`);
|
||||||
|
const self = this;
|
||||||
|
|
||||||
// TODO: Add slide-left/right animation
|
// Hides the current page's elements.
|
||||||
updatePages: function (manuallyCalled) {
|
MM.getModules()
|
||||||
if (this.config.modules.length !== 0) {
|
.exceptWithClass(this.config.excludes)
|
||||||
Log.log("updatePages was called with manuallyCalled = " + manuallyCalled);
|
.exceptWithClass(this.config.modules[this.curPage])
|
||||||
const self = this;
|
.enumerate((module) => {
|
||||||
MM.getModules()
|
module.hide(
|
||||||
.exceptWithClass(this.config.excludes)
|
this.config.animationTime / 2,
|
||||||
.exceptWithClass(this.config.modules[this.curPage])
|
{ lockString: this.identifier },
|
||||||
.enumerate(module => { module.hide(this.config.animationTime / 2, { lockString: this.identifier }) });
|
);
|
||||||
|
});
|
||||||
|
|
||||||
setTimeout(function () {
|
// Shows the next page's elements
|
||||||
MM.getModules()
|
setTimeout(() => {
|
||||||
.withClass(self.config.modules[self.curPage])
|
MM.getModules()
|
||||||
.enumerate(module => {
|
.withClass(self.config.modules[self.curPage])
|
||||||
module.show(self.config.animationTime / 2,
|
.enumerate((module) => {
|
||||||
{ lockString: self.identifier });
|
module.show(
|
||||||
});
|
self.config.animationTime / 2,
|
||||||
}, this.config.animationTime / 2);
|
{ lockString: self.identifier },
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}, this.config.animationTime / 2);
|
||||||
|
|
||||||
if (manuallyCalled && this.config.rotationTime > 0) {
|
if (manuallyCalled) {
|
||||||
Log.log("manually updated page! setting delay before resume timer!");
|
Log.log('Manually updated page! setting delay before resuming timer!');
|
||||||
|
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
self.timer = setInterval(() => {
|
self.timer = setInterval(() => {
|
||||||
// Incrementing page
|
// Incrementing page
|
||||||
if (self.curPage === self.config.modules.length - 1) {
|
self.curPage = (self.curPage === self.config.modules.length - 1)
|
||||||
self.curPage = 0;
|
? 0 : self.curPage + 1;
|
||||||
} else { self.curPage++ }
|
self.sendNotification('PAGE_INCREMENT');
|
||||||
self.sendNotification("PAGE_INCREMENT");
|
self.updatePages(false);
|
||||||
self.updatePages(false);
|
}, self.config.rotationTime, false);
|
||||||
}, self.config.rotationTime, false);
|
}, this.config.rotationDelay);
|
||||||
}, this.config.rotationDelay);
|
}
|
||||||
}
|
} else { Log.error("Pages aren't properly defined!"); }
|
||||||
} else { Log.error("Pages aren't properly defined!") }
|
},
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
432
package-lock.json
generated
Normal file
432
package-lock.json
generated
Normal file
|
@ -0,0 +1,432 @@
|
||||||
|
{
|
||||||
|
"name": "MMM-pages",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"balanced-match": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"brace-expansion": {
|
||||||
|
"version": "1.1.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
|
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"balanced-match": "1.0.0",
|
||||||
|
"concat-map": "0.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"builtin-modules": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"concat-map": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
|
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"contains-path": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz",
|
||||||
|
"integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"debug": {
|
||||||
|
"version": "2.6.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||||
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ms": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"doctrine": {
|
||||||
|
"version": "1.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
|
||||||
|
"integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"esutils": "2.0.2",
|
||||||
|
"isarray": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"error-ex": {
|
||||||
|
"version": "1.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
|
||||||
|
"integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-arrayish": "0.2.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"eslint-config-airbnb-base": {
|
||||||
|
"version": "12.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-12.1.0.tgz",
|
||||||
|
"integrity": "sha512-/vjm0Px5ZCpmJqnjIzcFb9TKZrKWz0gnuG/7Gfkt0Db1ELJR51xkZth+t14rYdqWgX836XbuxtArbIHlVhbLBA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"eslint-restricted-globals": "0.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"eslint-import-resolver-node": {
|
||||||
|
"version": "0.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz",
|
||||||
|
"integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"resolve": "1.7.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"eslint-module-utils": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz",
|
||||||
|
"integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"pkg-dir": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"eslint-plugin-import": {
|
||||||
|
"version": "2.11.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.11.0.tgz",
|
||||||
|
"integrity": "sha1-Fa7qN6Z0mdhI6OmBgG1GJ7VQOBY=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"contains-path": "0.1.0",
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"doctrine": "1.5.0",
|
||||||
|
"eslint-import-resolver-node": "0.3.2",
|
||||||
|
"eslint-module-utils": "2.2.0",
|
||||||
|
"has": "1.0.1",
|
||||||
|
"lodash": "4.17.10",
|
||||||
|
"minimatch": "3.0.4",
|
||||||
|
"read-pkg-up": "2.0.0",
|
||||||
|
"resolve": "1.7.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"eslint-restricted-globals": {
|
||||||
|
"version": "0.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz",
|
||||||
|
"integrity": "sha1-NfDVy8ZMLj7WLpO0saevBbp+1Nc=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"esutils": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
||||||
|
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"find-up": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"path-exists": "2.1.0",
|
||||||
|
"pinkie-promise": "2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"function-bind": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"graceful-fs": {
|
||||||
|
"version": "4.1.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
||||||
|
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"has": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"function-bind": "1.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hosted-git-info": {
|
||||||
|
"version": "2.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz",
|
||||||
|
"integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"is-arrayish": {
|
||||||
|
"version": "0.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
||||||
|
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"is-builtin-module": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"builtin-modules": "1.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"isarray": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"load-json-file": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "4.1.11",
|
||||||
|
"parse-json": "2.2.0",
|
||||||
|
"pify": "2.3.0",
|
||||||
|
"strip-bom": "3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"locate-path": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"p-locate": "2.0.0",
|
||||||
|
"path-exists": "3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"path-exists": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lodash": {
|
||||||
|
"version": "4.17.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
|
||||||
|
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"minimatch": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"brace-expansion": "1.1.11"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ms": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"normalize-package-data": {
|
||||||
|
"version": "2.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
|
||||||
|
"integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"hosted-git-info": "2.6.0",
|
||||||
|
"is-builtin-module": "1.0.0",
|
||||||
|
"semver": "5.5.0",
|
||||||
|
"validate-npm-package-license": "3.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"p-limit": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"p-try": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"p-locate": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"p-limit": "1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"p-try": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"parse-json": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
|
||||||
|
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"error-ex": "1.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"path-exists": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
|
||||||
|
"integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"pinkie-promise": "2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"path-parse": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
|
||||||
|
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"path-type": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"pify": "2.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pify": {
|
||||||
|
"version": "2.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||||
|
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"pinkie": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
|
||||||
|
"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"pinkie-promise": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
|
||||||
|
"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"pinkie": "2.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pkg-dir": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"find-up": "1.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"read-pkg": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"load-json-file": "2.0.0",
|
||||||
|
"normalize-package-data": "2.4.0",
|
||||||
|
"path-type": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"read-pkg-up": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"find-up": "2.1.0",
|
||||||
|
"read-pkg": "2.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"find-up": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
|
||||||
|
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"locate-path": "2.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resolve": {
|
||||||
|
"version": "1.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz",
|
||||||
|
"integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"path-parse": "1.0.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"semver": {
|
||||||
|
"version": "5.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
|
||||||
|
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"spdx-correct": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"spdx-expression-parse": "3.0.0",
|
||||||
|
"spdx-license-ids": "3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"spdx-exceptions": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"spdx-expression-parse": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"spdx-exceptions": "2.1.0",
|
||||||
|
"spdx-license-ids": "3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"spdx-license-ids": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"strip-bom": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"validate-npm-package-license": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"spdx-correct": "3.0.0",
|
||||||
|
"spdx-expression-parse": "3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
13
package.json
Normal file
13
package.json
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"name": "MMM-pages",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Add pages to your MagicMirror²!",
|
||||||
|
"main": "MMM-pages.js",
|
||||||
|
"repository": "git@github.com:edward-shen/MMM-pages.git",
|
||||||
|
"author": "Edward Shen <6173958+edward-shen@users.noreply.github.com>",
|
||||||
|
"license": "MIT",
|
||||||
|
"devDependencies": {
|
||||||
|
"eslint-config-airbnb-base": "^12.1.0",
|
||||||
|
"eslint-plugin-import": "^2.11.0"
|
||||||
|
}
|
||||||
|
}
|
|
@ -1 +1 @@
|
||||||
|
/* This css page is reserved for future use. */
|
Loading…
Reference in a new issue