Merge pull request #585 from roramirez/extra-spaces

fix tabs, remove extra spaces and lines.
This commit is contained in:
Michael Teeuw 2016-12-31 19:12:24 +01:00 committed by GitHub
commit 23bcac2e55
21 changed files with 82 additions and 83 deletions

View File

@ -4,7 +4,9 @@
"quotes": ["error", "double"], "quotes": ["error", "double"],
"max-len": ["error", 250], "max-len": ["error", 250],
"curly": "error", "curly": "error",
"camelcase": ["error", {"properties": "never"}] "camelcase": ["error", {"properties": "never"}],
"no-trailing-spaces": ["error"],
"no-irregular-whitespace": ["error"]
}, },
"env": { "env": {
"browser": true, "browser": true,

View File

@ -49,19 +49,19 @@ if command_exists node; then
echo -e "\e[0mMinimum Node version: \e[1m$NODE_TESTED\e[0m" echo -e "\e[0mMinimum Node version: \e[1m$NODE_TESTED\e[0m"
echo -e "\e[0mInstalled Node version: \e[1m$NODE_CURRENT\e[0m" echo -e "\e[0mInstalled Node version: \e[1m$NODE_CURRENT\e[0m"
if version_gt $NODE_TESTED $NODE_CURRENT; then if version_gt $NODE_TESTED $NODE_CURRENT; then
echo -e "\e[96mNode should be upgraded.\e[0m" echo -e "\e[96mNode should be upgraded.\e[0m"
NODE_INSTALL=true NODE_INSTALL=true
#Check if a node process is currenlty running. #Check if a node process is currenlty running.
#If so abort installation. #If so abort installation.
if pgrep "node" > /dev/null; then if pgrep "node" > /dev/null; then
echo -e "\e[91mA Node process is currently running. Can't upgrade." echo -e "\e[91mA Node process is currently running. Can't upgrade."
echo "Please quit all Node processes and restart the installer." echo "Please quit all Node processes and restart the installer."
exit; exit;
fi fi
else else
echo -e "\e[92mNo Node.js upgrade nessecery.\e[0m" echo -e "\e[92mNo Node.js upgrade nessecery.\e[0m"
fi fi
else else
@ -116,27 +116,27 @@ fi
# Check if plymouth is installed (default with PIXEL desktop environment), then install custom splashscreen. # Check if plymouth is installed (default with PIXEL desktop environment), then install custom splashscreen.
echo -e "\e[96mCheck plymouth installation ...\e[0m" echo -e "\e[96mCheck plymouth installation ...\e[0m"
if command_exists plymouth; then if command_exists plymouth; then
THEME_DIR="/usr/share/plymouth/themes" THEME_DIR="/usr/share/plymouth/themes"
echo -e "\e[90mSplashscreen: Checking themes directory.\e[0m" echo -e "\e[90mSplashscreen: Checking themes directory.\e[0m"
if [ -d $THEME_DIR ]; then if [ -d $THEME_DIR ]; then
echo -e "\e[90mSplashscreen: Create theme directory if not exists.\e[0m" echo -e "\e[90mSplashscreen: Create theme directory if not exists.\e[0m"
if [ ! -d $THEME_DIR/MagicMirror ]; then if [ ! -d $THEME_DIR/MagicMirror ]; then
sudo mkdir $THEME_DIR/MagicMirror sudo mkdir $THEME_DIR/MagicMirror
fi fi
if sudo cp ~/MagicMirror/splashscreen/splash.png $THEME_DIR/MagicMirror/splash.png && sudo cp ~/MagicMirror/splashscreen/MagicMirror.plymouth $THEME_DIR/MagicMirror/MagicMirror.plymouth && sudo cp ~/MagicMirror/splashscreen/MagicMirror.script $THEME_DIR/MagicMirror/MagicMirror.script; then if sudo cp ~/MagicMirror/splashscreen/splash.png $THEME_DIR/MagicMirror/splash.png && sudo cp ~/MagicMirror/splashscreen/MagicMirror.plymouth $THEME_DIR/MagicMirror/MagicMirror.plymouth && sudo cp ~/MagicMirror/splashscreen/MagicMirror.script $THEME_DIR/MagicMirror/MagicMirror.script; then
echo -e "\e[90mSplashscreen: Theme copied successfully.\e[0m" echo -e "\e[90mSplashscreen: Theme copied successfully.\e[0m"
if sudo plymouth-set-default-theme -R MagicMirror; then if sudo plymouth-set-default-theme -R MagicMirror; then
echo -e "\e[92mSplashscreen: Changed theme to MagicMirror successfully.\e[0m" echo -e "\e[92mSplashscreen: Changed theme to MagicMirror successfully.\e[0m"
else else
echo -e "\e[91mSplashscreen: Couldn't change theme to MagicMirror!\e[0m" echo -e "\e[91mSplashscreen: Couldn't change theme to MagicMirror!\e[0m"
fi fi
else else
echo -e "\e[91mSplashscreen: Copying theme failed!\e[0m" echo -e "\e[91mSplashscreen: Copying theme failed!\e[0m"
fi fi
else else
echo -e "\e[91mSplashscreen: Themes folder doesn't exist!\e[0m" echo -e "\e[91mSplashscreen: Themes folder doesn't exist!\e[0m"
fi fi
else else
echo -e "\e[93mplymouth is not installed.\e[0m"; echo -e "\e[93mplymouth is not installed.\e[0m";
fi fi

View File

@ -117,7 +117,7 @@ The getScripts method is called to request any additional scripts that need to b
getScripts: function() { getScripts: function() {
return [ return [
'script.js', // will try to load it from the vendor folder, otherwise it will load is from the module folder. 'script.js', // will try to load it from the vendor folder, otherwise it will load is from the module folder.
'moment.js', // this file is available in the vendor folder, so it doesn't need to be available in the module folder. 'moment.js', // this file is available in the vendor folder, so it doesn't need to be available in the module folder.
this.file('anotherfile.js'), // this file will be loaded straight from the module folder. this.file('anotherfile.js'), // this file will be loaded straight from the module folder.
'https://code.jquery.com/jquery-2.2.3.min.js', // this file will be loaded from the jquery servers. 'https://code.jquery.com/jquery-2.2.3.min.js', // this file will be loaded from the jquery servers.
] ]

View File

@ -35,7 +35,6 @@ Module.register("alert",{
}, },
show_notification: function(message) { show_notification: function(message) {
if (this.config.effect == "slide") {this.config.effect = this.config.effect + "-" + this.config.position;} if (this.config.effect == "slide") {this.config.effect = this.config.effect + "-" + this.config.position;}
msg = ""; msg = "";
if (message.title) { if (message.title) {
msg += "<span class='thin' style='line-height: 35px; font-size:24px' color='#4A4A4A'>" + message.title + "</span>"; msg += "<span class='thin' style='line-height: 35px; font-size:24px' color='#4A4A4A'>" + message.title + "</span>";

View File

@ -30,4 +30,3 @@ fetcher.onError(function(fetcher, error) {
fetcher.startFetch(); fetcher.startFetch();
console.log("Create fetcher done! "); console.log("Create fetcher done! ");

View File

@ -355,4 +355,3 @@ Module.register("weatherforecast",{
return parseFloat(temperature).toFixed(decimals); return parseFloat(temperature).toFixed(decimals);
} }
}); });