├── .eslintrc.json ├── .gitignore ├── .stylelintrc ├── .travis.yml ├── CHANGELOG.md ├── Gruntfile.js ├── LICENSE ├── MagicMirror-Module-Template.css ├── MagicMirror-Module-Template.js ├── README.md ├── create_module.sh ├── node_helper.js ├── package.json ├── templates ├── CHANGELOG.md ├── README.md ├── licenses │ ├── ISC │ └── MIT └── package.json └── translations ├── en.json └── es.json /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "indent": ["error", "tab"], 4 | "quotes": ["error", "double"], 5 | "max-len": ["error", 250], 6 | "curly": "error", 7 | "camelcase": ["error", {"properties": "never"}], 8 | "no-trailing-spaces": ["error"], 9 | "no-irregular-whitespace": ["error"] 10 | }, 11 | "env": { 12 | "browser": true, 13 | "node": true, 14 | "es6": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | uploads 3 | npm-debug.log 4 | -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard", 3 | "font-family-name-quotes": "double-where-recommended", 4 | "block-no-empty": false 5 | } 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "12" 4 | - "10" 5 | - "8" 6 | before_script: 7 | - npm install grunt-cli -g 8 | script: 9 | - grunt 10 | cache: 11 | directories: 12 | - node_modules 13 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [1.3.0] - 2019-11-27 2 | - Fix sed command in create_module.sh in macOS 3 | - Include node 8, 10, 12 support 4 | - Add test for ESLint, stylelint, jsonlint, markdownlint and js-yaml 5 | 6 | ## [1.2.0] - 2017-07-21 7 | - Use getStyles for module 8 | - Include node 7 support 9 | - Add test for ESLint, stylelint, jsonlint, markdownlint and js-yaml 10 | - Include create CHANGELOG file 11 | 12 | ## [1.1.1] - 2017-04-02 13 | - Fix missing files in project #4 14 | 15 | ## [1.1.0] - 2017-03-04 16 | - Add example use translations 17 | - Improvement configuration script and remote execution command 18 | - Fix description assignment 19 | - Set version by defaul 1.0.0 in template 20 | - Documentation fix and improvement 21 | 22 | ## [1.0.0] - 2017-02-17 23 | 24 | - First public release 25 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | require("time-grunt")(grunt); 3 | grunt.initConfig({ 4 | pkg: grunt.file.readJSON("package.json"), 5 | eslint: { 6 | options: { 7 | configFile: ".eslintrc.json" 8 | }, 9 | target: ["*.js"] 10 | }, 11 | stylelint: { 12 | simple: { 13 | options: { 14 | configFile: ".stylelintrc" 15 | }, 16 | src: ["*.css"] 17 | } 18 | }, 19 | jsonlint: { 20 | main: { 21 | src: ["package.json", "translations/*.json"], 22 | options: { 23 | reporter: "jshint" 24 | } 25 | } 26 | }, 27 | markdownlint: { 28 | all: { 29 | options: { 30 | config: { 31 | "default": true, 32 | "line-length": false, 33 | "blanks-around-headers": false, 34 | "no-duplicate-header": false, 35 | "no-inline-html": false, 36 | "MD010": false, 37 | "MD001": false, 38 | "MD031": false, 39 | "MD040": false, 40 | "MD002": false, 41 | "MD029": false, 42 | "MD041": false, 43 | "MD032": false, 44 | "MD036": false, 45 | "MD037": false, 46 | "MD009": false, 47 | "MD018": false, 48 | "MD012": false, 49 | "MD026": false, 50 | "MD038": false 51 | } 52 | }, 53 | src: ["README.md", "CHANGELOG.md", "LICENSE.txt"] 54 | } 55 | }, 56 | yamllint: { 57 | all: [".travis.yml"] 58 | } 59 | }); 60 | grunt.loadNpmTasks("grunt-eslint"); 61 | grunt.loadNpmTasks("grunt-stylelint"); 62 | grunt.loadNpmTasks("grunt-jsonlint"); 63 | grunt.loadNpmTasks("grunt-yamllint"); 64 | grunt.loadNpmTasks("grunt-markdownlint"); 65 | grunt.registerTask("default", ["eslint", "stylelint", "jsonlint", "markdownlint", "yamllint"]); 66 | }; 67 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Rodrigo Ramírez Norambuena 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MagicMirror-Module-Template.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * {{MODULE_NAME}} 4 | * 5 | * {{AUTHOR_NAME}} 6 | * {{LICENSE}} Licensed. 7 | * 8 | * Custom here your css module 9 | * 10 | */ 11 | -------------------------------------------------------------------------------- /MagicMirror-Module-Template.js: -------------------------------------------------------------------------------- 1 | /* global Module */ 2 | 3 | /* Magic Mirror 4 | * Module: {{MODULE_NAME}} 5 | * 6 | * By {{AUTHOR_NAME}} 7 | * {{LICENSE}} Licensed. 8 | */ 9 | 10 | Module.register("{{MODULE_NAME}}", { 11 | defaults: { 12 | updateInterval: 60000, 13 | retryDelay: 5000 14 | }, 15 | 16 | requiresVersion: "2.1.0", // Required version of MagicMirror 17 | 18 | start: function() { 19 | var self = this; 20 | var dataRequest = null; 21 | var dataNotification = null; 22 | 23 | //Flag for check if module is loaded 24 | this.loaded = false; 25 | 26 | // Schedule update timer. 27 | this.getData(); 28 | setInterval(function() { 29 | self.updateDom(); 30 | }, this.config.updateInterval); 31 | }, 32 | 33 | /* 34 | * getData 35 | * function example return data and show it in the module wrapper 36 | * get a URL request 37 | * 38 | */ 39 | getData: function() { 40 | var self = this; 41 | 42 | var urlApi = "https://jsonplaceholder.typicode.com/posts/1"; 43 | var retry = true; 44 | 45 | var dataRequest = new XMLHttpRequest(); 46 | dataRequest.open("GET", urlApi, true); 47 | dataRequest.onreadystatechange = function() { 48 | console.log(this.readyState); 49 | if (this.readyState === 4) { 50 | console.log(this.status); 51 | if (this.status === 200) { 52 | self.processData(JSON.parse(this.response)); 53 | } else if (this.status === 401) { 54 | self.updateDom(self.config.animationSpeed); 55 | Log.error(self.name, this.status); 56 | retry = false; 57 | } else { 58 | Log.error(self.name, "Could not load data."); 59 | } 60 | if (retry) { 61 | self.scheduleUpdate((self.loaded) ? -1 : self.config.retryDelay); 62 | } 63 | } 64 | }; 65 | dataRequest.send(); 66 | }, 67 | 68 | 69 | /* scheduleUpdate() 70 | * Schedule next update. 71 | * 72 | * argument delay number - Milliseconds before next update. 73 | * If empty, this.config.updateInterval is used. 74 | */ 75 | scheduleUpdate: function(delay) { 76 | var nextLoad = this.config.updateInterval; 77 | if (typeof delay !== "undefined" && delay >= 0) { 78 | nextLoad = delay; 79 | } 80 | nextLoad = nextLoad ; 81 | var self = this; 82 | setTimeout(function() { 83 | self.getData(); 84 | }, nextLoad); 85 | }, 86 | 87 | getDom: function() { 88 | var self = this; 89 | 90 | // create element wrapper for show into the module 91 | var wrapper = document.createElement("div"); 92 | // If this.dataRequest is not empty 93 | if (this.dataRequest) { 94 | var wrapperDataRequest = document.createElement("div"); 95 | // check format https://jsonplaceholder.typicode.com/posts/1 96 | wrapperDataRequest.innerHTML = this.dataRequest.title; 97 | 98 | var labelDataRequest = document.createElement("label"); 99 | // Use translate function 100 | // this id defined in translations files 101 | labelDataRequest.innerHTML = this.translate("TITLE"); 102 | 103 | 104 | wrapper.appendChild(labelDataRequest); 105 | wrapper.appendChild(wrapperDataRequest); 106 | } 107 | 108 | // Data from helper 109 | if (this.dataNotification) { 110 | var wrapperDataNotification = document.createElement("div"); 111 | // translations + datanotification 112 | wrapperDataNotification.innerHTML = this.translate("UPDATE") + ": " + this.dataNotification.date; 113 | 114 | wrapper.appendChild(wrapperDataNotification); 115 | } 116 | return wrapper; 117 | }, 118 | 119 | getScripts: function() { 120 | return []; 121 | }, 122 | 123 | getStyles: function () { 124 | return [ 125 | "{{MODULE_NAME}}.css", 126 | ]; 127 | }, 128 | 129 | // Load translations files 130 | getTranslations: function() { 131 | //FIXME: This can be load a one file javascript definition 132 | return { 133 | en: "translations/en.json", 134 | es: "translations/es.json" 135 | }; 136 | }, 137 | 138 | processData: function(data) { 139 | var self = this; 140 | this.dataRequest = data; 141 | if (this.loaded === false) { self.updateDom(self.config.animationSpeed) ; } 142 | this.loaded = true; 143 | 144 | // the data if load 145 | // send notification to helper 146 | this.sendSocketNotification("{{MODULE_NAME}}-NOTIFICATION_TEST", data); 147 | }, 148 | 149 | // socketNotificationReceived from helper 150 | socketNotificationReceived: function (notification, payload) { 151 | if(notification === "{{MODULE_NAME}}-NOTIFICATION_TEST") { 152 | // set dataNotification 153 | this.dataNotification = payload; 154 | this.updateDom(); 155 | } 156 | }, 157 | }); 158 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MagicMirror-Module-Template 2 | This is a module to help developers to start building their own modules for the [MagicMirror](https://github.com/MichMich/MagicMirror). 3 | 4 | There samples of code for: 5 | - External request 6 | - Config parameters 7 | - Custom URL path route 8 | - Passing of messages (NOTIFICATIONS) 9 | 10 | Also this module include tasks for checking your code. For that you need install the developer dependencies. 11 | 12 | ``` 13 | cd MI_MODULE_PATH && npm install 14 | ``` 15 | 16 | Run the `test` npm script 17 | ``` 18 | npm test 19 | ``` 20 | 21 | Current Tests: 22 | - [ESLint](http://eslint.org/) for linting the javascript 23 | - [stylelint](https://stylelint.io/) for linting the CSS with [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) as its base 24 | - [jsonlint](https://github.com/zaach/jsonlint) for linting the translation files 25 | - [markdownlint](https://github.com/DavidAnson/markdownlint) for checking the markdown files (`README.md`, `CHANGELOG.md`, `LICENSE.txt`) 26 | - [js-yaml](https://github.com/nodeca/js-yaml) to lint the `.travis.yml` (run through [grunt-yamllint](https://github.com/geedew/grunt-yamllint)) 27 | 28 | 29 | ## Installation 30 | 31 | `bash -c "$(curl -sL https://raw.githubusercontent.com/roramirez/MagicMirror-Module-Template/master/create_module.sh)"` 32 | 33 | This creates a module example to start your development more easy. 34 | 35 | If you have any suggest, please let me know [by an issue](https://github.com/roramirez/MagicMirror-Module-Template/issues/new). 36 | -------------------------------------------------------------------------------- /create_module.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This script creates a module in base MagicMirror-Module template 4 | # You can get a copy from https://github.com/roramirez/MagicMirror-Module-Template 5 | # 6 | # 7 | # Manager Module Template 8 | # 9 | # By Rodrigo Ramìrez Norambuena https://rodrigoramirez.com 10 | # MIT Licensed. 11 | # 12 | 13 | REPOSITORY_URL=https://github.com/roramirez/MagicMirror-Module-Template 14 | YEAR=$(date +"%Y") 15 | 16 | if ! [ -x "$(command -v git)" ]; then 17 | echo "Please install git" 18 | exit 1 19 | fi 20 | 21 | # check if a directory is the MM directory (checks for correct content of package.json) 22 | is_mm_directory() { 23 | TEST_STRING="\"url\": \"git+https://github.com/MichMich/MagicMirror.git\"" 24 | if grep -sq "$TEST_STRING" "$1/package.json"; then 25 | # it is correct 26 | return 0 27 | fi 28 | # wrong one 29 | return 1 30 | } 31 | 32 | MM_HOME="" 33 | # check default directory 34 | if is_mm_directory "$HOME/MagicMirror"; then 35 | MM_HOME="$HOME/MagicMirror" 36 | fi 37 | 38 | # check working directory 39 | if is_mm_directory "."; then 40 | MM_HOME=$(cd "." && pwd) 41 | fi 42 | 43 | # check directory above working directory (i.e. in modules directory) 44 | if is_mm_directory ".."; then 45 | MM_HOME=$(cd ".." && pwd) 46 | fi 47 | 48 | if [ -d "$MM_HOME" ] ; then 49 | echo "MagicMirror installation found in: $MM_HOME" 50 | else 51 | echo "MagicMirror installation not found." 52 | read -p "Please input its path now (or restart script in its directory): " MM_HOME 53 | fi 54 | 55 | read -p "Insert your module name: " MODULE_NAME 56 | if [ "$MODULE_NAME" = "" ]; then 57 | echo "No module name entered." 58 | exit 1 59 | fi 60 | 61 | DIRECTORY_DST="$MM_HOME/modules/$MODULE_NAME" 62 | 63 | read -p "Do you want create in $DIRECTORY_DST (y/N) " choice 64 | if [[ ! "$choice" =~ ^[Yy]$ ]]; then 65 | read -p "Insert destination module path: " DIRECTORY_DST 66 | fi 67 | 68 | if [ -d "$DIRECTORY_DST" ]; then 69 | echo "Warning!. The destination $DIRECTORY_DST exists" 70 | echo "To prevent override please rename destination directory" 71 | echo "or run again with another name module or destination path" 72 | exit 1 73 | fi 74 | 75 | # Author & Licenses 76 | AUTHOR_NAME=$(git config user.name) 77 | if [ -z "$AUTHOR_NAME" ]; then 78 | read -p "Insert your full name: " $AUTHOR_NAME 79 | fi 80 | 81 | read -p "Pickup a license 82 | 1. MIT (Default) 83 | 2. ISC 84 | Choice: " LICENSE 85 | 86 | case $LICENSE in 87 | [1] | [MIT] ) 88 | LICENSE="MIT" 89 | ;; 90 | [2] | [ISC] ) 91 | LICENSE="ISC" 92 | ;; 93 | * ) 94 | LICENSE="MIT" 95 | ;; 96 | esac 97 | 98 | 99 | echo "Type a short description of what your module does (leave empty to insert a Todo)" 100 | read -p ": " $DESCRIPTION 101 | 102 | if [ "$DESCRIPTION" = "" ]; then 103 | DESCRIPTION="Todo: Insert description here!" 104 | fi 105 | 106 | 107 | # Create temporal directory 108 | TMPDIR=$(mktemp -d) 109 | # Clone repository here 110 | git clone $REPOSITORY_URL $TMPDIR 111 | 112 | 113 | # Here add templates stuff 114 | mkdir -p $DIRECTORY_DST 115 | 116 | # copy the needed stuff 117 | cp -a $TMPDIR/* $DIRECTORY_DST 118 | # Copy dot files issue #4 119 | cp -a $TMPDIR/.eslintrc.json $DIRECTORY_DST 120 | cp -a $TMPDIR/.stylelintrc $DIRECTORY_DST 121 | 122 | 123 | mv $DIRECTORY_DST/MagicMirror-Module-Template.js $DIRECTORY_DST/$MODULE_NAME.js 124 | mv $DIRECTORY_DST/MagicMirror-Module-Template.css $DIRECTORY_DST/$MODULE_NAME.css 125 | mv $DIRECTORY_DST/templates/licenses/$LICENSE $DIRECTORY_DST/LICENSE.txt 126 | mv $DIRECTORY_DST/templates/CHANGELOG.md $DIRECTORY_DST/ 127 | mv $DIRECTORY_DST/templates/README.md $DIRECTORY_DST/ 128 | mv $DIRECTORY_DST/templates/package.json $DIRECTORY_DST/ 129 | rm -frv $DIRECTORY_DST/templates > /dev/null 130 | 131 | # remove unneeded files 132 | rm $DIRECTORY_DST/LICENSE # Module-Template-License 133 | rm $DIRECTORY_DST/create_module.sh # module creation script 134 | 135 | # Based on https://stackoverflow.com/a/51060063 136 | # Default case for Linux sed, just use "-i" 137 | sedi=(-i) 138 | case "$(uname)" in 139 | # For macOS, use two parameters 140 | Darwin*) sedi=(-i "") 141 | esac 142 | 143 | # Expand the parameters in the actual call to "sed" 144 | sed "${sedi[@]}" -e s/\{\{MODULE_NAME\}\}/$MODULE_NAME/g $DIRECTORY_DST/*.* 145 | sed "${sedi[@]}" -e s/\{\{AUTHOR_NAME\}\}/"$AUTHOR_NAME"/g $DIRECTORY_DST/*.* 146 | sed "${sedi[@]}" -e s/\{\{LICENSE\}\}/$LICENSE/g $DIRECTORY_DST/*.* 147 | sed "${sedi[@]}" -e s/\{\{YEAR\}\}/$YEAR/g $DIRECTORY_DST/*.* 148 | sed "${sedi[@]}" -e s/\{\{DESCRIPTION\}\}/"$DESCRIPTION"/g $DIRECTORY_DST/*.* 149 | 150 | 151 | cd $DIRECTORY_DST 152 | git init 153 | 154 | # Delete temporal directory 155 | rm -frv $TMPDIR 2 > /dev/null 156 | 157 | echo "Happy coding! Have fun you are an awesome developer :)" 158 | echo "here your development directory $DIRECTORY_DST" 159 | cd $DIRECTORY_DST 160 | ls $DIRECTORY_DST -------------------------------------------------------------------------------- /node_helper.js: -------------------------------------------------------------------------------- 1 | /* Magic Mirror 2 | * Node Helper: {{MODULE_NAME}} 3 | * 4 | * By {{AUTHOR_NAME}} 5 | * {{LICENSE}} Licensed. 6 | */ 7 | 8 | var NodeHelper = require("node_helper"); 9 | 10 | module.exports = NodeHelper.create({ 11 | 12 | // Override socketNotificationReceived method. 13 | 14 | /* socketNotificationReceived(notification, payload) 15 | * This method is called when a socket notification arrives. 16 | * 17 | * argument notification string - The identifier of the noitication. 18 | * argument payload mixed - The payload of the notification. 19 | */ 20 | socketNotificationReceived: function(notification, payload) { 21 | if (notification === "{{MODULE_NAME}}-NOTIFICATION_TEST") { 22 | console.log("Working notification system. Notification:", notification, "payload: ", payload); 23 | // Send notification 24 | this.sendNotificationTest(this.anotherFunction()); //Is possible send objects :) 25 | } 26 | }, 27 | 28 | // Example function send notification test 29 | sendNotificationTest: function(payload) { 30 | this.sendSocketNotification("{{MODULE_NAME}}-NOTIFICATION_TEST", payload); 31 | }, 32 | 33 | // this you can create extra routes for your module 34 | extraRoutes: function() { 35 | var self = this; 36 | this.expressApp.get("/{{MODULE_NAME}}/extra_route", function(req, res) { 37 | // call another function 38 | values = self.anotherFunction(); 39 | res.send(values); 40 | }); 41 | }, 42 | 43 | // Test another function 44 | anotherFunction: function() { 45 | return {date: new Date()}; 46 | } 47 | }); 48 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MagicMirror-Module-Template", 3 | "version": "1.2.0", 4 | "description": "Module Base template for create new modules for MagicMirror", 5 | "main": "MagicMirror-Module-Template.js", 6 | "scripts": { 7 | "test": "./node_modules/grunt/bin/grunt" 8 | }, 9 | "author": "Rodrigo Ramírez Norambuena", 10 | "license": "MIT", 11 | "devDependencies": { 12 | "grunt": "latest", 13 | "grunt-eslint": "latest", 14 | "grunt-jsonlint": "latest", 15 | "grunt-markdownlint": "latest", 16 | "grunt-stylelint": "latest", 17 | "grunt-yamllint": "latest", 18 | "stylelint": "latest", 19 | "stylelint-config-standard": "latest", 20 | "time-grunt": "latest" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /templates/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # {{MODULE_NAME}} Change Log 2 | All notable changes to this project will be documented in this file. 3 | This project adheres to [Semantic Versioning](http://semver.org/). 4 | 5 | 6 | ## [1.0.0] - Unreleased 7 | 8 | First public release 9 | -------------------------------------------------------------------------------- /templates/README.md: -------------------------------------------------------------------------------- 1 | # {{MODULE_NAME}} 2 | 3 | This is a module for the [MagicMirror²](https://github.com/MichMich/MagicMirror/). 4 | 5 | {{DESCRIPTION}} 6 | 7 | ## Using the module 8 | 9 | To use this module, add the following configuration block to the modules array in the `config/config.js` file: 10 | ```js 11 | var config = { 12 | modules: [ 13 | { 14 | module: '{{MODULE_NAME}}', 15 | config: { 16 | // See below for configurable options 17 | } 18 | } 19 | ] 20 | } 21 | ``` 22 | 23 | ## Configuration options 24 | 25 | | Option | Description 26 | |----------------- |----------- 27 | | `option1` | *Required* DESCRIPTION HERE 28 | | `option2` | *Optional* DESCRIPTION HERE TOO

**Type:** `int`(milliseconds)
Default 60000 milliseconds (1 minute) 29 | -------------------------------------------------------------------------------- /templates/licenses/ISC: -------------------------------------------------------------------------------- 1 | ISC License (ISC) 2 | 3 | Copyright {{YEAR}} {{AUTHOR_NAME}} 4 | 5 | Permission to use, copy, modify, and/or distribute this software for 6 | any purpose with or without fee is hereby granted, provided that the 7 | above copyright notice and this permission notice appear in all 8 | copies. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 | WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 | WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 | AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 | DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 | PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 | 18 | -------------------------------------------------------------------------------- /templates/licenses/MIT: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) {{YEAR}} {{AUTHOR_NAME}} 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /templates/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{MODULE_NAME}}", 3 | "version": "1.0.0", 4 | "description": "{{DESCRIPTION}}", 5 | "main": "{{MODULE_NAME}}.js", 6 | "author": "{{AUTHOR_NAME}}", 7 | "license": "{{LICENSE}}", 8 | "devDependencies": { 9 | "grunt": "latest", 10 | "grunt-eslint": "latest", 11 | "grunt-jsonlint": "latest", 12 | "grunt-markdownlint": "^1.0.13", 13 | "grunt-stylelint": "latest", 14 | "grunt-yamllint": "latest", 15 | "stylelint-config-standard": "latest", 16 | "time-grunt": "latest" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "TITLE": "Title", 3 | "UPDATE": "Update" 4 | } 5 | -------------------------------------------------------------------------------- /translations/es.json: -------------------------------------------------------------------------------- 1 | { 2 | "TITLE": "Titulo", 3 | "UPDATE": "Actualización" 4 | } 5 | --------------------------------------------------------------------------------