[js-format] Changed jsformatter npm script to jsformat for consistency default tip
authorJavier Armendáriz <javier.armendariz@openbravo.com>
Wed, 12 Jun 2019 11:12:58 +0200
changeset 36133 3197347b9f8a
parent 36132 a3916b3d436d
[js-format] Changed jsformatter npm script to jsformat for consistency
modules/org.openbravo.client.kernel/jsformatter/jsformatter
package.json
--- a/modules/org.openbravo.client.kernel/jsformatter/jsformatter	Wed Jun 12 10:59:13 2019 +0200
+++ b/modules/org.openbravo.client.kernel/jsformatter/jsformatter	Wed Jun 12 11:12:58 2019 +0200
@@ -45,7 +45,7 @@
 # size limit is much lower than the one in bash commands.
 #
 function formatFiles {
-    echo "$@" | xargs --max-args 250 npm run jsformatter -s -- ${FLAGS} || exit 1
+    echo "$@" | xargs --max-args 250 npm run jsformat -s -- ${FLAGS} || exit 1
 }
 
 function getPrettierIgnorePatterns {
@@ -76,7 +76,7 @@
 function runFormatterInCore {
     IG_PATTERNS=$1
     FORMATTER_FLAGS=$2
-    npm run jsformatter -s -- ${FORMATTER_FLAGS} "modules/**/*.js" ${IG_PATTERNS}
+    npm run jsformat -s -- ${FORMATTER_FLAGS} "modules/**/*.js" ${IG_PATTERNS}
 }
 
 function runFormatterInModule {
@@ -87,7 +87,7 @@
         IGNORE_PATH="--ignore-path ${BASE}/.prettierignore"
     fi
     echo "Formatter check for module $(basename ${BASE})"
-    npm run jsformatter -s -- ${FORMATTER_FLAGS} ${IGNORE_PATH} "${BASE}/**/*.js"
+    npm run jsformat -s -- ${FORMATTER_FLAGS} ${IGNORE_PATH} "${BASE}/**/*.js"
 }
 
 #Parse input arguments
--- a/package.json	Wed Jun 12 10:59:13 2019 +0200
+++ b/package.json	Wed Jun 12 11:12:58 2019 +0200
@@ -4,7 +4,7 @@
   "description": "This contains some utilities used to format and lint Javascript code",
   "scripts": {
     "jslint": "eslint --max-warnings 0",
-    "jsformatter": "prettier"
+    "jsformat": "prettier"
   },
   "repository": "http://code.openbravo.com/",
   "author": "Openbravo SLU",