From 7783ebeed1ca86ff02d24df9c689bdfe47dd0993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 16 Jan 2016 15:37:02 +0100 Subject: [PATCH] Explain reasons for /* jshint */ statements. And consistently name Prepro.js --- README.md | 2 +- build/load.sh | 2 +- src/core/PaperScript.js | 2 +- src/load.js | 8 ++++---- src/options.js | 2 +- src/path/CompoundPath.js | 2 +- src/view/View.js | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 82410d06..1f8d0221 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ And to go back to a built library cd build ./build.sh -Note that your PaperScripts examples do not need to change, they can keep loading `dist/paper-full.js`, which will always do the right thing. Note also that `src/load.js` handles both browsers and Node.js, through the handy PrePro JS preprocessing library . +Note that your PaperScripts examples do not need to change, they can keep loading `dist/paper-full.js`, which will always do the right thing. Note also that `src/load.js` handles both browsers and Node.js, through the handy Prepro.js preprocessing library . ### Branch structure diff --git a/build/load.sh b/build/load.sh index 94123d04..5ad58c37 100755 --- a/build/load.sh +++ b/build/load.sh @@ -12,7 +12,7 @@ # This script simply creates symbolic links to src/load.js from # dist/paper-full.js and dist/paper-node.js, which loads the library from -# separate sources through PrePro both in the browser and in Node.js. +# separate sources through Prepro.js both in the browser and in Node.js. if [ -f ../dist/paper-full.js ] then diff --git a/src/core/PaperScript.js b/src/core/PaperScript.js index b8d4d4ac..8c399984 100644 --- a/src/core/PaperScript.js +++ b/src/core/PaperScript.js @@ -14,7 +14,7 @@ * @name PaperScript * @namespace */ -/* jshint -W082 */ +/* jshint -W082 */// Do not complain about functions inside Prepro.js statements Base.exports.PaperScript = (function() { // Locally turn of exports and define for inlined acorn. // Just declaring the local vars is enough, as they will be undefined. diff --git a/src/load.js b/src/load.js index efd92d57..09048e5c 100644 --- a/src/load.js +++ b/src/load.js @@ -10,11 +10,11 @@ * All rights reserved. */ -// This file uses PrePro to preprocess the paper.js source code on the fly in +// This file uses Prepro.js to preprocess the paper.js source code on the fly in // the browser, avoiding the step of having to manually preprocess it after each // change. This is very useful during development of the library itself. if (typeof window === 'object') { - // Browser based loading through PrePro: + // Browser based loading through Prepro.js: if (!window.include) { var scripts = document.getElementsByTagName('script'); var src = scripts[scripts.length - 1].getAttribute('src'); @@ -22,7 +22,7 @@ if (typeof window === 'object') { // through dist/paper-full.js, or directly through src/load.js, and // match root as all the parts of the path that lead to that folder. var root = src.match(/^(.*\/)\w*\//)[1]; - // First load the PrePro's browser.js file, which provides the include() + // First load the prepro's browser.js file, which provides the include() // function for the browser. document.write(''); @@ -35,7 +35,7 @@ if (typeof window === 'object') { include('paper.js'); } } else { - // Node based loading through PrePro: + // Node based loading through Prepro.js: var prepro = require('prepro/lib/node.js'); // Include deafult browser options. // Step out and back into src in case this is loaded from dist/paper-node.js diff --git a/src/options.js b/src/options.js index 7a407db4..756c0f11 100644 --- a/src/options.js +++ b/src/options.js @@ -12,7 +12,7 @@ // Define __options for code preprocessing when building the library, as well as // browser based compile-time preprocessing when loading the separate source -// files directly through load.js / prepro.js during development. +// files directly through load.js / Prepro.js during development. // The paper.js version. // NOTE: Adjust value here before calling publish.sh, which then updates and diff --git a/src/path/CompoundPath.js b/src/path/CompoundPath.js index 8afd0976..6859cf3c 100644 --- a/src/path/CompoundPath.js +++ b/src/path/CompoundPath.js @@ -178,7 +178,7 @@ var CompoundPath = PathItem.extend(/** @lends CompoundPath# */{ }, setClockwise: function(clockwise) { - /* jshint -W018 */ + /* jshint -W018 */// Don't complain about confusing use of !: if (this.isClockwise() !== !!clockwise) this.reverse(); }, diff --git a/src/view/View.js b/src/view/View.js index c1100f6d..704f6c63 100644 --- a/src/view/View.js +++ b/src/view/View.js @@ -19,7 +19,7 @@ * center, both useful for constructing artwork that should appear centered on * screen. */ -/* jshint -W082 */ +/* jshint -W082 */// Do not complain about functions inside Prepro.js statements var View = Base.extend(Emitter, /** @lends View# */{ _class: 'View',