From 29ebbeece627f63b878db08a779f6123872d58a4 Mon Sep 17 00:00:00 2001 From: Donald Date: Tue, 11 Sep 2018 14:27:15 +0800 Subject: [PATCH] Code format & sort npm script params --- package.json | 6 +++--- src/editor/ScratchJr.js | 2 +- src/editor/ui/Scripts.js | 2 +- src/entry/gettingstarted.js | 2 +- src/utils/lib.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index acd140a..d4f02f6 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,9 @@ "description": "ScratchJr", "scripts": { "lint": "eslint src/**", - "watch": "webpack --watch --progress --mode=development --hide-modules", - "dev": "webpack --mode=development --hide-modules", - "build": "webpack --mode=production --hide-modules" + "watch": "webpack --mode=development --progress --hide-modules --watch", + "dev": "webpack --mode=development --progress --hide-modules", + "build": "webpack --mode=production --progress --hide-modules" }, "author": "Massachusetts Institute of Technology", "license": "BSD-3-Clause", diff --git a/src/editor/ScratchJr.js b/src/editor/ScratchJr.js index a87a666..22a0b69 100644 --- a/src/editor/ScratchJr.js +++ b/src/editor/ScratchJr.js @@ -379,7 +379,7 @@ export default class ScratchJr { } } - static saveAndFlip (e){ + static saveAndFlip (e) { onHold = true; ScratchJr.stopStripsFromTop(e); ScratchJr.unfocus(e); diff --git a/src/editor/ui/Scripts.js b/src/editor/ui/Scripts.js index 3cb14af..4ff12a1 100644 --- a/src/editor/ui/Scripts.js +++ b/src/editor/ui/Scripts.js @@ -471,7 +471,7 @@ export default class Scripts { getEncodableBlocks () { var list = []; var sc = this.sc; - for (var i =0; i < sc.childElementCount; i++){ + for (var i = 0; i < sc.childElementCount; i++) { var b = sc.childNodes[i].owner; if (!b || b.type != 'block') { continue; diff --git a/src/entry/gettingstarted.js b/src/entry/gettingstarted.js index b8e6ae6..0d2caea 100644 --- a/src/entry/gettingstarted.js +++ b/src/entry/gettingstarted.js @@ -20,7 +20,7 @@ export function gettingStartedMain () { var urlvars = getUrlVars(); place = urlvars['place']; - document.ontouchmove = function (e){ + document.ontouchmove = function (e) { e.preventDefault(); }; } diff --git a/src/utils/lib.js b/src/utils/lib.js index f9a94d6..d39f585 100755 --- a/src/utils/lib.js +++ b/src/utils/lib.js @@ -66,7 +66,7 @@ export function preprocessAndLoadCss (baseUrl, url) { const head = document.head; let style = document.createElement('style'); style.type = 'text/css'; - if (style.styleSheet){ + if (style.styleSheet) { style.styleSheet.cssText = cssData; } else { style.appendChild(document.createTextNode(cssData));