Procházet zdrojové kódy

Docs: Remove `Testing with npm` guide. (#25807)

Michael Herzog před 2 roky
rodič
revize
a00d44b9d9

+ 5 - 42
docs/list.json

@@ -24,10 +24,6 @@
 				"Matrix transformations": "manual/en/introduction/Matrix-transformations",
 				"Animation system": "manual/en/introduction/Animation-system",
 				"Color management": "manual/en/introduction/Color-management"
-			},
-
-			"Build Tools": {
-				"Testing with NPM": "manual/en/buildTools/Testing-with-NPM"
 			}
 
 		},
@@ -462,10 +458,6 @@
 				"كيفية استخدام المعالجة اللاحقة (post-processing)": "manual/ar/introduction/How-to-use-post-processing",
 				"تحولات المصفوفة (Matrix transformations)": "manual/ar/introduction/Matrix-transformations",
 				"نظام الحركات": "manual/ar/introduction/Animation-system"
-			},
-
-			"أدوات البناء": {
-				"الاختبار مع NPM": "manual/ar/buildTools/Testing-with-NPM"
 			}
 
 		},
@@ -532,10 +524,6 @@
 				"如何使用后期处理": "manual/zh/introduction/How-to-use-post-processing",
 				"矩阵变换": "manual/zh/introduction/Matrix-transformations",
 				"动画系统": "manual/zh/introduction/Animation-system"
-			},
-
-			"构建工具": {
-				"使用NPM进行测试": "manual/zh/buildTools/Testing-with-NPM"
 			}
 
 		},
@@ -922,11 +910,6 @@
 				"후처리 사용 방법": "manual/ko/introduction/How-to-use-post-processing",
 				"행렬 변환": "manual/ko/introduction/Matrix-transformations",
 				"애니메이션 시스템": "manual/ko/introduction/Animation-system"
-			},
-
-			"빌드 도구": {
-				"NPM 테스트": "manual/ko/buildTools/Testing-with-NPM"
-
 			}
 
 		},
@@ -1096,10 +1079,6 @@
 				"post-processingの使い方": "manual/ja/introduction/How-to-use-post-processing",
 				"行列の変換": "manual/ja/introduction/Matrix-transformations",
 				"アニメーションシステム": "manual/ja/introduction/Animation-system"
-			},
-
-			"ビルドツール": {
-				"NPMでテストを実行する": "manual/ja/buildTools/Testing-with-NPM"
 			}
 
 		}
@@ -1130,10 +1109,6 @@
 				"Trasformazioni di matrici": "manual/it/introduction/Matrix-transformations",
 				"Sistema di animazione": "manual/it/introduction/Animation-system",
 				"Gestione del colore": "manual/it/introduction/Color-management"
-			},
-
-			"Strumenti di build": {
-				"Testare con NPM": "manual/it/buildTools/Testing-with-NPM"
 			}
 
 		},
@@ -1455,10 +1430,6 @@
 				"Transformações de matriz": "manual/pt-br/introduction/Matrix-transformations",
 				"Sistema de animação": "manual/pt-br/introduction/Animation-system",
 				"Gerenciamento de cor": "manual/pt-br/introduction/Color-management"
-			},
-
-			"Ferramentas de Build": {
-				"Testando com NPM": "manual/pt-br/buildTools/Testing-with-NPM"
 			}
 
 		},
@@ -1540,17 +1511,8 @@
 				"Matrices de transformation": "manual/fr/introduction/Matrix-transformations",
 				"Système d'animation": "manual/fr/introduction/Animation-system",
 				"Gestion des couleurs": "manual/fr/introduction/Color-management"
-			},
-
-			"Outils de build": {
-				"Tests avec NPM": "manual/fr/buildTools/Testing-with-NPM"
-			},
-			"Noyau": {
-				"BufferAttribute": "api/fr/core/BufferAttribute",
-				"BufferGeometry": "api/fr/core/BufferGeometry"
 			}
 
-
 		},
 
 		"Référence": {
@@ -1642,6 +1604,11 @@
 				"ShaderMaterial": "api/fr/materials/ShaderMaterial",
 				"ShadowMaterial": "api/fr/materials/ShadowMaterial",
 				"SpriteMaterial": "api/fr/materials/SpriteMaterial"
+			},
+
+			"Noyau": {
+				"BufferAttribute": "api/fr/core/BufferAttribute",
+				"BufferGeometry": "api/fr/core/BufferGeometry"
 			}
 
 		}
@@ -1672,10 +1639,6 @@
 				"Matrix transformations": "manual/en/introduction/Matrix-transformations",
 				"Animation system": "manual/en/introduction/Animation-system",
 				"Color management": "manual/en/introduction/Color-management"
-			},
-
-			"Build Tools": {
-				"Testing with NPM": "manual/en/buildTools/Testing-with-NPM"
 			}
 
 		},

+ 0 - 240
docs/manual/ar/buildTools/Testing-with-NPM.html

@@ -1,240 +0,0 @@
-<!DOCTYPE html>
-<html lang="ar">
-	<head>
-		<meta charset="utf-8">
-		<base href="../../../" />
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body class="rtl">
-		<h1>الاختبار مع NPM</h1>
-
-		<p class="desc">
-			يوضح هذه المقال كيفية الحصول على three.js في بيئة [link:https://nodejs.org/en/ node.js] حتى تتمكن من تنفيذ الاختبارات الآلية. يمكن إجراء الاختبارات على سطر الأوامر ، أو بواسطة أدوات CI الآلية مثل [link:https://travis-ci.org/ Travis].
-		</p>
-
-		<h2>النسخة القصيرة</h2>
-
-		<p>
-			إذا كنت مرتاحًا مع node و npm ،
-			<code>
-				$ npm install three --save-dev
-			</code>
-			و من ثم قم بإضافة
-		<code>
-			const THREE = require('three');
-		</code>
-			للاختبار الخاص بك.
-		</p>
-
-		<h2>إنشاء مشروع قابلة للاختبار من الصفر</h2>
-		<p>
-			إذا لم تكن معتادًا على هذه الأدوات ، فإليك دليلًا سريعًا (بالنسبة لنظام التشغيل Linux ، ستكون عملية التثبيت مختلفة قليلاً باستخدام windows ، لكن أوامر NPM متطابقة).
-		</p>
-
-		<h3>الإعدادات الأساسية</h3>
-		<div>
-			<ol>
-				<li>
-					قم بتثبيت [link:https://www.npmjs.org/ npm] و nodejs. عادةً ما يبدو أقصر طريق كالأتي
-					<code>
-$ sudo apt-get install -y npm nodejs-legacy
-# fix any problems with SSL in the default registry URL
-$ npm config set registry http://registry.npmjs.org/
-					</code>
-				</li>
-
-				<li>
-					أنشئ دليل مشروع جديد
-					<code>
-						 $ mkdir test-example; cd test-example
-					</code>
-				</li>
-
-				<li>
-					اطلب من npm إنشاء ملف مشروع جديد لك:
-					<code>
-					 $ npm init
-					</code>
-					 واقبل جميع الإعدادات الافتراضية عن طريق الضغط على Enter في جميع المطالبات ، سيؤدي هذا إلى إنشاء package.json.
-				</li><br />
-
-				<li>
-					جرب وابدأ اختبار الميزة بـ
-					<code>
-$ npm test
-					</code>
-					هذا سيفشل ، وهو أمر متوقع. إذا نظرت في package.json ، فإن تعريف البرنامج النصي للاختبار هو
-					<code>
-						"test": "echo \"Error: no test specified\" && exit 1"
-					</code>
-				</li>
-
-			</ol>
-		</div>
-
-		<h2>إضافة mocha</h2>
-		<div>
-			سنقوم بإستخدام [link:https://mochajs.org/ mocha].
-
-			<ol>
-				<li>
-					تثبيت mocha من خلال
-					<code>
-$ npm install mocha --save-dev
-					</code>
-					لاحظ أنه تم إنشاء node_modules/ وتظهر تبعياتك هناك. لاحظ أيضًا أنه تم تحديث package.json: تمت إضافة خاصية devDependencies وتحديثها باستخدام --save-dev.
-				</li><br />
-
-				<li>
-					قم بتحرير package.json لاستخدام mocha للاختبار. عندما يتم استدعاء الاختبار ، نريد فقط تشغيل المخاوي وتحديد مراسل مطول. بشكل افتراضي ، سيؤدي هذا إلى تشغيل أي شيء في test (لا يمكن تشغيل الدليل test في npm ERR! ، قم بإنشائه عبر اختبار mkdir)
-					<code>
-						"test": "mocha --reporter list"
-					</code>
-				</li>
-
-				<li>
-					أعد الاختبار باستخدام
-					<code>
-						$ npm test
-					</code>
-
-					يجب أن ينجح هذا الآن ، حيث يتم الإبلاغ عن 0 تمرير (1 جزء من الثانية) أو ما شابه.
-				</li>
-
-			</ol>
-		</div>
-
-		<h2>أضف three.js</h2>
-		<div>
-			<ol>
-				<li>
-					دعنا نسحب تبعية three.js لدينا مع
-					<code>
-$ npm install three --save-dev
-					</code>
-					<ul>
-						<li>
-							إذا كنت بحاجة إلى إصدار مختلف ، فاستخدم
-							<code>
-								$ npm show three versions
-							</code>
-							لمعرفة ما هو متاح. لإخبار npm بالقيمة الصحيحة ، استخدم
-							<code>
- $ npm install [email protected] --save
-							</code>
-							(0.84.0 في هذا المثال). - حفظ يجعل هذا تبعية لهذا المشروع ، بدلاً من dev تبعية. انظر المستندات [link:https://docs.npmjs.com/cli/v8/configuring-npm/package-json هنا] لمزيد من المعلومات.
-						</li>
-					</ul>
-				</li>
-
-				<li>
-					سيبحث Mocha عن الاختبارات في test/ ، لذلك دعونا
-					<code>
-					$ mkdir test
-					</code>
-				</li>
-
-				<li>
-					أخيرًا ، نحتاج بالفعل إلى اختبار JS للتشغيل. دعنا نضيف اختبارًا بسيطًا للتحقق من أن الكائن three.js متاح ويعمل. أنشئ test/verify-three.js تحتوي على:
-<code>
-const THREE = require('three');
-const assert = require("assert");
-
-describe('The THREE object', function() {
-  it('should have a defined BasicShadowMap constant', function() {
-    assert.notEqual('undefined', THREE.BasicShadowMap);
-  }),
-
-  it('should be able to construct a Vector3 with default of x=0', function() {
-    const vec3 = new THREE.Vector3();
-    assert.equal(0, vec3.x);
-  })
-})
-</code>
-				</li>
-
-				<li>
-				أخيرًا ، دعنا نختبر مرة أخرى باستخدام $ npm اختبار. يجب أن يؤدي هذا إلى إجراء الاختبارات أعلاه وأن ينجح ، ويظهر شيئًا مثل:
-				<code>
-The THREE object should have a defined BasicShadowMap constant: 0ms
-The THREE object should be able to construct a Vector3 with default of x=0: 0ms
-2 passing (8ms)
-				</code>
-				</li>
-			</ol>
-		</div>
-
-		<h2>أضف الرمز الخاص بك</h2>
-		<div>
-			<p>عليك القيام بثلاثة أشياء:</p>
-
-			<ol>
-				<li>
-					اكتب اختبارًا للسلوك المتوقع لشفرتك ، وضعه تحت test/.
-					هنا مثال من مشروع حقيقي
-					[link:https://github.com/air/encounter/blob/master/test/Physics-test.js هنا].
-				</li>
-
-				<li>
-					قم بتصدير الكود الوظيفي الخاص بك بطريقة يمكن للعقدة js رؤيتها ، لاستخدامها مع طلب.
-					شاهده [link:https://github.com/air/encounter/blob/master/js/Physics.js هنا].
-				</li>
-
-				<li>
-					اطلب الكود الخاص بك في ملف الاختبار ، بنفس الطريقة التي فعلنا بها require('three')  في المثال أعلاه.
-				</li>
-			</ol>
-
-			<p>
-				سيختلف البندان 2 و 3 بناءً على كيفية إدارتك للرمز. في مثال Physics.js الموضح أعلاه ، يكون جزء التصدير في النهاية. نقوم بتعيين كائن إلى module.exports:
-			</p>
-			<code>
-//=============================================================================
-// make available in nodejs
-//=============================================================================
-if (typeof exports !== 'undefined')
-{
-  module.exports = Physics;
-}
-			</code>
-		</div>
-
-		<h2>التعامل مع التبعيات (dependencies)</h2>
-		<div>
-			<p>
-				إذا كنت تستخدم بالفعل شيئًا ذكيًا مثل request.js أو browserify فتخط هذا الجزء.
-			</p>
-			<p>
-				عادةً ما يتم تشغيل مشروع three.js في المتصفح. يتم تحميل الوحدة النمطية عن طريق المتصفح الذي يقوم بتنفيذ مجموعة من علامات البرنامج النصي. فبالنسبة لملفاتك الفردية فلا داعي للقلق بشأن التبعيات. ومع ذلك ، في سياق nodejs ، لا يوجد index.html يربط كل شيء معًا ، لذلك يجب أن تكون واضحًا.
-			</p>
-			<p>
-				إذا كنت تقوم بتصدير وحدة تعتمد على ملفات أخرى ، فسيتعين عليك إخبار العقدة بتحميلها.
-				إليك طريقة واحدة:
-			</p>
-			<ol>
-				<li>
-					في بداية الوحدة النمطية الخاصة بك ، تحقق لمعرفة ما إذا كنت في بيئة nodejs.
-				</li>
-				<li>
-					إذا كان هذا هو الحال، فيتوجب عليك أن تعلن عن التبعيات الخاصة بك.
-				</li>
-				<li>
-					إذا لم يكن الأمر كذلك ، فمن المحتمل أنك في متصفح لذلك لا تحتاج إلى القيام بأي شيء آخر.
-				</li>
-			</ol>
-			مثال لإستعمال Physics.js:
-			<code>
-//=============================================================================
-// setup for server-side testing
-//=============================================================================
-if (typeof require === 'function') // test for nodejs environment
-{
-  const THREE = require('three');
-  const MY3 = require('./MY3.js');
-}
-			</code>
-		</div>
-
-	</body>
-</html>

+ 0 - 257
docs/manual/en/buildTools/Testing-with-NPM.html

@@ -1,257 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8">
-		<base href="../../../" />
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		<h1>[name]</h1>
-
-		<p class="desc">
-			This article shows how to get three.js into a [link:https://nodejs.org/en/ node.js] environment so that you
-			can execute automated tests. Tests can be run on the command line, or by automated
-			CI tools like [link:https://travis-ci.org/ Travis].
-		</p>
-
-		<h2>The short version</h2>
-
-		<p>
-			If you're comfortable with node and npm,
-			<code>
-				$ npm install three --save-dev
-			</code>
-			and add
-		<code>
-			const THREE = require('three');
-		</code>
-			to your test.
-		</p>
-
-		<h2>Create a testable project from scratch</h2>
-		<p>
-			If you're not familiar with these tools, here's a quick guide (for linux, the installation process
-			will be slightly different using windows, but the NPM commands are identical).
-		</p>
-
-		<h3>Basic setup</h3>
-		<div>
-			<ol>
-				<li>
-					Install [link:https://www.npmjs.org/ npm] and nodejs. The shortest path typically looks something like
-					<code>
-$ sudo apt-get install -y npm nodejs-legacy
-# fix any problems with SSL in the default registry URL
-$ npm config set registry http://registry.npmjs.org/
-					</code>
-				</li>
-
-				<li>
-					Make a new project directory
-					<code>
-						 $ mkdir test-example; cd test-example
-					</code>
-				</li>
-
-				<li>
-					Ask npm to create a new project file for you:
-					<code>
-					 $ npm init
-					</code>
-					 and accept all defaults by hitting Enter on all the prompts.
-					 This will create package.json.
-				</li><br />
-
-				<li>
-					Try and start the test feature with
-					<code>
-$ npm test
-					</code>
-					This will fail, which is expected.
-					If you look in the package.json, the definition of the test script is
-					<code>
-						"test": "echo \"Error: no test specified\" && exit 1"
-					</code>
-				</li>
-
-			</ol>
-		</div>
-
-		<h2>Add mocha</h2>
-		<div>
-			We're going to use [link:https://mochajs.org/ mocha].
-
-			<ol>
-				<li>
-					Install mocha with
-					<code>
-$ npm install mocha --save-dev
-					</code>
-					Notice that node_modules/ is created and your dependencies appear in there.
-				  Also notice that your package.json has been updated: the property devDependencies
-					is added and updated by the use of --save-dev.
-				</li><br />
-
-				<li>
-					Edit package.json to use mocha for testing. When test is invoked, we just want to run
-					mocha and specify a verbose reporter. By default this will run anything in test/
-					(not having directory test/ can run into npm ERR!, create it by mkdir test)
-					<code>
-						"test": "mocha --reporter list"
-					</code>
-				</li>
-
-				<li>
-					Rerun the test with
-					<code>
-						$ npm test
-					</code>
-
-					This should now succeed, reporting 0 passing (1ms)
-				 	or similar.
-				</li>
-
-			</ol>
-		</div>
-
-		<h2>Add three.js</h2>
-		<div>
-			<ol>
-				<li>
-					Let's pull in our three.js dependency with
-					<code>
-$ npm install three --save-dev
-					</code>
-					<ul>
-						<li>
-							If you need a different three version, use
-							<code>
-								$ npm show three versions
-							</code>
-						  to see
-							what's available. To tell npm the right one, use
-							<code>
- $ npm install [email protected] --save
-							</code>
-							(0.84.0 in this example). --save makes this a dependency of this project, rather than
-							dev dependency. See the docs [link:https://docs.npmjs.com/cli/v8/configuring-npm/package-json here] for more info.
-						</li>
-					</ul>
-				</li>
-
-				<li>
-					Mocha will look for tests in test/, so let's
-					<code>
-					$ mkdir test
-					</code>
-				</li>
-
-				<li>
-					Finally we actually need a JS test to run. Let's add a simple test that will verify that
-					the three.js object is available and working. Create test/verify-three.js containing:
-<code>
-const THREE = require('three');
-const assert = require('assert');
-
-describe('The THREE object', function() {
-  it('should have a defined BasicShadowMap constant', function() {
-    assert.notEqual('undefined', THREE.BasicShadowMap);
-  }),
-
-  it('should be able to construct a Vector3 with default of x=0', function() {
-    const vec3 = new THREE.Vector3();
-    assert.equal(0, vec3.x);
-  })
-})
-</code>
-				</li>
-
-				<li>
-				Finally let's test again with $ npm test. This should run the tests above and succeed,
-				showing something like:
-				<code>
-The THREE object should have a defined BasicShadowMap constant: 0ms
-The THREE object should be able to construct a Vector3 with default of x=0: 0ms
-2 passing (8ms)
-				</code>
-				</li>
-			</ol>
-		</div>
-
-		<h2>Add your own code</h2>
-		<div>
-			You need to do three things:
-
-			<ol>
-				<li>
-					Write a test for the expected behaviour of your code, and place it under test/.
-					[link:https://github.com/air/encounter/blob/master/test/Physics-test.js Here] is an example from a real project.
-				</li>
-
-				<li>
-					Export your functional code in such a way that nodejs can see it, for use in conjunction with require.
-					See it [link:https://github.com/air/encounter/blob/master/js/Physics.js here].
-				</li>
-
-				<li>
-					Require your code into the test file, in the same way we did a require('three') in the example above.
-				</li>
-			</ol>
-
-			<p>
-				Items 2 and 3 will vary depending on how you manage your code. In the example of Physics.js
-		  	given above, the export part is right at the end. We assign an object to module.exports:
-			</p>
-			<code>
-//=============================================================================
-// make available in nodejs
-//=============================================================================
-if (typeof exports !== 'undefined')
-{
-  module.exports = Physics;
-}
-			</code>
-		</div>
-
-		<h2>Dealing with dependencies</h2>
-		<div>
-			<p>
-				If you're already using something clever like require.js or browserify, skip this part.
-			</p>
-			<p>
-				Typically a three.js project is going to run in the browser. Module loading is hence done by
-				the browser executing a bunch of script tags. Your individual files don't have to worry
-				about dependencies. In a nodejs context however, there is no index.html binding everything
-				together, so you have to be explicit.
-			</p>
-			<p>
-				If you're exporting a module that depends on other files, you're going to have to tell node to load them.
-				Here is one approach:
-			</p>
-			<ol>
-				<li>
-					At the start of your module, check to see if you're in a nodejs environment.
-				</li>
-				<li>
-					If so, explicitly declare your dependencies.
-				</li>
-				<li>
-					If not, you're probably in a browser so you don't need to do anything else.
-				</li>
-			</ol>
-			Example code from Physics.js:
-			<code>
-//=============================================================================
-// setup for server-side testing
-//=============================================================================
-if (typeof require === 'function') // test for nodejs environment
-{
-  const THREE = require('three');
-  const MY3 = require('./MY3.js');
-}
-			</code>
-		</div>
-
-	</body>
-</html>

+ 0 - 257
docs/manual/fr/buildTools/Testing-with-NPM.html

@@ -1,257 +0,0 @@
-<!DOCTYPE html>
-<html lang="fr">
-	<head>
-		<meta charset="utf-8">
-		<base href="../../../" />
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		<h1>Tests avec NPM ([name])</h1>
-
-		<p class="desc">
-			Ici vous sera expliqué comment obtenir three.js dans un environnement [link:https://nodejs.org/en/ node.js] pour que
-			vous puissez exécuter des tests automatisés. Les tests peuvent êtres lancés en lignes de commande, ou grâce à des
-			outils de CI automatisés comme [link:https://travis-ci.org/ Travis].
-		</p>
-
-		<h2>La version courte</h2>
-
-		<p>
-			Si vous êtes à l'aise avec node et npm,
-			<code>
-				$ npm install three --save-dev
-			</code>
-			et ajoutez
-		<code>
-			const THREE = require('three');
-		</code>
-			à votre test.
-		</p>
-
-		<h2>Créer un projet testable de zéro</h2>
-		<p>
-			Si vous n'êtes pas familier avec ces outils, vous trouverez ici un guide rapide (pour linux, le processus d'installation
-			sera légèrement différent de celui pour Windows, mais les commandes NPM sont identiques).
-		</p>
-
-		<h3>Setup basique</h3>
-		<div>
-			<ol>
-				<li>
-					Installez [link:https://www.npmjs.org/ npm] et nodejs. La méthode la plus rapide ressemble généralement à
-					<code>
-$ sudo apt-get install -y npm nodejs-legacy
-# fix any problems with SSL in the default registry URL
-$ npm config set registry http://registry.npmjs.org/
-					</code>
-				</li>
-
-				<li>
-					Créez un nouveau répertoire de projet
-					<code>
-						 $ mkdir test-example; cd test-example
-					</code>
-				</li>
-
-				<li>
-					Demandez à npm de créer un nouveau fichier de projet pour vous:
-					<code>
-					 $ npm init
-					</code>
-					 et acceptez tous les paramètres par défaut en appuyant sur Entrée à chaque prompt.
-					 Cela créera package.json.
-				</li><br />
-
-				<li>
-					Essayez la fonctionnalité de test avec
-					<code>
-$ npm test
-					</code>
-					Cela va échouer, comme prévu.
-					Si vous jetez un coup d'oeil à votre package.json, la définition du test de script sera
-					<code>
-						"test": "echo \"Error: no test specified\" && exit 1"
-					</code>
-				</li>
-
-			</ol>
-		</div>
-
-		<h2>Ajouter mocha</h2>
-		<div>
-			Nous allons utiliser [link:https://mochajs.org/ mocha].
-
-			<ol>
-				<li>
-					Installez mocha avec
-					<code>
-$ npm install mocha --save-dev
-					</code>
-					Remarquez que node_modules/ est créé et que vos dépendances y apparaissent.
-				  	Notez également que votre package.json a été mis à jour: la propriété devDependencies
-					est ajoutée et mis à jour par l'utilisation de --save-dev.
-				</li><br />
-
-				<li>
-					Modifiez votre package.json pour qu'il utilise mocha pour effectuer les tests. Lorsqu'un test est invoqué, nous voulons simplement lancer
-					mocha et spécifier un verbose reporter. Par défaut cela lancera le contenu de test/
-					(ne pas avoir de répertoire test/ peut causer une npm ERR!, créez le en utilisant mkdir test)
-					<code>
-						"test": "mocha --reporter list"
-					</code>
-				</li>
-
-				<li>
-					Relancez les tests avec
-					<code>
-						$ npm test
-					</code>
-
-					Cela doit maintenant réussir, signalant 0 passages (1ms)
-				 	ou similaire.
-				</li>
-
-			</ol>
-		</div>
-
-		<h2>Ajouter three.js</h2>
-		<div>
-			<ol>
-				<li>
-					Ajoutons notre dépendance de three.js avec
-					<code>
-$ npm install three --save-dev
-					</code>
-					<ul>
-						<li>
-							Si vous avez besoin d'une version de three différente, utilisez
-							<code>
-								$ npm show three versions
-							</code>
-						  	pour voir
-							ce qui est disponible. Pour indiquer à npm la bonne, utilisez
-							<code>
- $ npm install [email protected] --save
-							</code>
-							(0.84.0 dans cet exemple). --save qui en fait une dépendance de ce projet, au lieu
-							d'une dépendance dev. Voir la documentation [link:https://docs.npmjs.com/cli/v8/configuring-npm/package-json ici] pour plus d'informations.
-						</li>
-					</ul>
-				</li>
-
-				<li>
-					Mocha cherche des tests dans test/, exécutons donc la commande
-					<code>
-					$ mkdir test
-					</code>
-				</li>
-
-				<li>
-					Finalement, nous avons besoin d'un test JS à lancer. Ajoutons un test simple qui va vérifier que
-					l'objet three.js est disponible et fonctionnel. Créez test/verify-three.js contenant:
-<code>
-const THREE = require('three');
-const assert = require('assert');
-
-describe('The THREE object', function() {
-  it('should have a defined BasicShadowMap constant', function() {
-    assert.notEqual('undefined', THREE.BasicShadowMap);
-  }),
-
-  it('should be able to construct a Vector3 with default of x=0', function() {
-    const vec3 = new THREE.Vector3();
-    assert.equal(0, vec3.x);
-  })
-})
-</code>
-				</li>
-
-				<li>
-				Finalement testons à nouveau avec $ npm test. Cela doit lancer le test ci-dessous et réussir,
-				affichant quelque chose du genre:
-				<code>
-The THREE object should have a defined BasicShadowMap constant: 0ms
-The THREE object should be able to construct a Vector3 with default of x=0: 0ms
-2 passing (8ms)
-				</code>
-				</li>
-			</ol>
-		</div>
-
-		<h2>Ajoutez votre propre code</h2>
-		<div>
-			Vous devez faire trois choses:
-
-			<ol>
-				<li>
-					Écrivez un test pour un comportement attendu de votre code, et placez-le sous test/.
-					[link:https://github.com/air/encounter/blob/master/test/Physics-test.js Ici] vous trouverez un exemple issu d'un vrai projet.
-				</li>
-
-				<li>
-					Exportez votre code de manière à ce que nodejs puisse le voir et l'utiliser quand la conjoncture le requiert.
-					Voir [link:https://github.com/air/encounter/blob/master/js/Physics.js ici].
-				</li>
-
-				<li>
-					Puis il faut require votre code dans le fichier de test, de la même manière que nous avons require('three') dans l'exemple au-dessus.
-				</li>
-			</ol>
-
-			<p>
-			Les items 2 et 3 varient selon la façon dont vous organisez votre code. Dans l'exemple de Physics.js
-		  	montré plus-haut, la partie concernant l'export est à la toute fin. Nous assignons un objet à module.exports:
-			</p>
-			<code>
-//=============================================================================
-// make available in nodejs
-//=============================================================================
-if (typeof exports !== 'undefined')
-{
-  module.exports = Physics;
-}
-			</code>
-		</div>
-
-		<h2>Gérer les dépendances</h2>
-		<div>
-			<p>
-				Si vous utlisez déjà quelque chose d'astucieux comme require.js ou browserify, sautez cette partie.
-			</p>
-			<p>
-				Généralement un projet three.js s'exécute dans le navigateur. Le module de chargement est par conséquent réalisé par
-				le navigateur qui exécute un ensemble de scripts. Vos fichiers individuels n'ont pas à gérer les
-				dépendances. Dans un contexte nodejs, il n'y a pas d'index.html reliant tout
-				ensemble, vous devez donc être explicites.
-			</p>
-			<p>
-				Si vous exportez un module qui dépend d'autres fichiers, vous devrez dire à node de les charger.
-				Voici une approche:
-			</p>
-			<ol>
-				<li>
-					Au début de votre module, vérifiez si vous êtes dans un environnement nodejs.
-				</li>
-				<li>
-					Si c'est le cas, déclarez explicitement vos dépendances.
-				</li>
-				<li>
-					Si ce n'est pas le cas, vous êtes probablement dans un navigateur vous n'avez donc rien d'autre à faire.
-				</li>
-			</ol>
-			Code d'exemple issu de Physics.js:
-			<code>
-//=============================================================================
-// setup for server-side testing
-//=============================================================================
-if (typeof require === 'function') // test for nodejs environment
-{
-  const THREE = require('three');
-  const MY3 = require('./MY3.js');
-}
-			</code>
-		</div>
-
-	</body>
-</html>

+ 0 - 239
docs/manual/it/buildTools/Testing-with-NPM.html

@@ -1,239 +0,0 @@
-<!DOCTYPE html>
-<html lang="it">
-	<head>
-		<meta charset="utf-8" />
-		<base href="../../../" />
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		<h1>Testare con NPM ([name])</h1>
-
-		<p class="desc">
-			Questo articolo mostra come inserire three.js in un ambiente
-			[link:https://nodejs.org/en/ node.js] così che tu possa eseguire test
-			automatici. I test possono essere eseguiti da linea di comando o da
-			strumenti CI automatici come [link:https://travis-ci.org/ Travis].
-		</p>
-
-		<h2>Versione breve</h2>
-
-		<p>
-			Se sei a tuo agio con node e npm, installa npm
-			<code> $ npm install three --save-dev </code>
-			e aggiungi
-			<code> const THREE = require('three'); </code>
-			al tuo test.
-		</p>
-
-		<h2>Creare un progetto testabile da zero</h2>
-		<p>
-			Se non sei familiare con questi strumenti, ecco una guida rapida per
-			linux (il processo di installazione sarà leggermente diverso usando
-			Windows, ma i comandi NPM saranno uguali).
-		</p>
-
-		<h3>Configurazione di base</h3>
-		<div>
-			<ol>
-				<li>
-					Installa [link:https://www.npmjs.org/ npm] e nodejs. Il percorso più
-					breve in genere assomiglia a qualcosa del simile:
-					<code>
-$ sudo apt-get install -y npm nodejs-legacy
-# fix any problems with SSL in the default registry URL
-$ npm config set registry http://registry.npmjs.org/
-					</code>
-				</li>
-
-				<li>
-					Crea una nuova cartella per il progetto
-					<code> $ mkdir test-example; cd test-example </code>
-				</li>
-
-				<li>
-					Crea un nuovo file di progetto tramite npm:
-					<code> $ npm init </code>
-					e accetta tutti i valori suggeriti premendo Enter per ogni richiesta.
-					Con queste richieste si creerà il file package.json.
-				</li>
-				<br />
-
-				<li>
-					Prova ad avviare la funzione di test con:
-					<code> $ npm test </code>
-					fallirà, come ci aspettiamo. Se controlli nel file package.json la
-					definizione dello script di test è:
-					<code> "test": "echo \"Error: no test specified\" && exit 1" </code>
-				</li>
-			</ol>
-		</div>
-
-		<h2>Aggiungere mocha</h2>
-		<div>
-			Utilizzeremo [link:https://mochajs.org/ mocha].
-
-			<ol>
-				<li>
-					Installare mocha con:
-					<code> $ npm install mocha --save-dev </code>
-					Si noti che è stata creata la cartella node_modules/ e le tue
-					dipendenze sono state installate al suo interno. Inoltre, si noti che
-					il file package.json è stato aggiornato: è stata aggiunta la proprietà
-					devDependencies, aggiornata dal comando --save-dev.
-				</li>
-				<br />
-
-				<li>
-					Modificare il file package.json per usare mocha per i test. Quando
-					viene invocato il test, vogliamo eseguire mocha e specificare un
-					reporter dettagliato. Per impostazione predefinita questo eseguirà
-					qualsiasi cosa nella cartella test/ (non avendo una cartella test/ si può
-					incorrere in un npm ERR!, bisogna crearla con il comando mkdir test)
-					<code> "test": "mocha --reporter list" </code>
-				</li>
-
-				<li>
-					Rilanciare il test con:
-					<code> $ npm test </code>
-
-					Adesso il test dovrebbe essere eseguito con successo, riportando "0 passing (1ms) or
-					similar".
-				</li>
-			</ol>
-		</div>
-
-		<h2>Aggiungere three.js</h2>
-		<div>
-			<ol>
-				<li>
-					Inseriamo la nostra dipendenza three.js con il comando:
-					<code> $ npm install three --save-dev </code>
-					<ul>
-						<li>
-							Se hai bisogno di una versione di three.js diversa, usa
-							<code> $ npm show three versions </code>
-							per vedere quali sono le versioni disponibili. Per dire ad npm la versione
-							scelta, usa
-							<code> $ npm install [email protected] --save </code>
-							(0.84.0 nell'esempio). --save fa sì che sia una dipendenza del
-							progetto piuttosto che una devDependecy. Per maggiori informazioni
-							consulta il documento
-							[link:https://docs.npmjs.com/cli/v8/configuring-npm/package-json qui].
-						</li>
-					</ul>
-				</li>
-
-				<li>
-					Mocha cercherà i test nella cartella test/, quindi creiamola
-					<code> $ mkdir test </code>
-				</li>
-
-				<li>
-					Infine abbiamo effettivamente bisogno di un test JS per l'esecuzione.
-					Aggiungiamo un semplice test il quale verificherà che l'oggetto
-					three.js sia disponibile e funzionante. Crea il file
-					test/verify-three.js contenente:
-					<code>
-const THREE = require('three');
-const assert = require('assert');
-
-describe('The THREE object', function() {
-  it('should have a defined BasicShadowMap constant', function() {
-    assert.notEqual('undefined', THREE.BasicShadowMap);
-  }),
-
-  it('should be able to construct a Vector3 with default of x=0', function() {
-    const vec3 = new THREE.Vector3();
-    assert.equal(0, vec3.x);
-  })
-})
-					</code>
-				</li>
-
-				<li>
-          Adesso rieseguiamo il test con il comando $ npm test. Questo dovrebbe
-          eseguire i test sopra definiti e terminare con successo, mostrando qualcosa del tipo:
-					<code>
-The THREE object should have a defined BasicShadowMap constant: 0ms
-The THREE object should be able to construct a Vector3 with default of x=0: 0ms
-2 passing (8ms)
-					</code>
-				</li>
-			</ol>
-		</div>
-
-		<h2>Aggiungere il tuo codice</h2>
-		<div>
-      Hai bisogno di fare tre cose:
-
-			<ol>
-				<li>
-          Scrivere un test per il comportamento che di aspetti dal tuo codice, e 
-          metterlo all'interno della cartella test/.
-					[link:https://github.com/air/encounter/blob/master/test/Physics-test.js Qui] un esempio di un progetto reale.
-				</li>
-
-				<li>
-          Esportare il tuo codice funzionale in modo tale che nodejs possa vederlo
-          per usarlo insieme a require. Controlla
-					[link:https://github.com/air/encounter/blob/master/js/Physics.js qui].
-				</li>
-
-				<li>
-          Richiamare il tuo codice nel file di test, allo stesso modo in cui
-          abbiamo fatto per richiamare three nell'esempio sopra `require('three')`
-				</li>
-			</ol>
-
-			<p>
-        Il punto 2 e 3 saranno molto dipendenti da come hai gestito il tuo codice.
-        Nell'esempio di Physics.js fornito sopra, la parte di esportazione si trova giustamente
-        alla fine. Assegniamo un oggetto a module.exports:
-			</p>
-			<code>
-//=============================================================================
-// make available in nodejs
-//=============================================================================
-if (typeof exports !== 'undefined') { module.exports = Physics; }
-			</code>
-		</div>
-
-		<h2>Affrontare le dipendenze</h2>
-		<div>
-			<p>
-        Se stai già utilizzando qualcosa di smart come require.js o browserify,
-        salta questa parte.
-			</p>
-			<p>
-        Tipicamente un progetto three.js verrà eseguito nel browser. Il caricamento
-        del modulo viene quindi eseguito dal browser che esegue una serie di tag 
-        di script. I tuo singoli file non si devono preoccupare per le dipendenze.
-        Tuttavia, in un contesto nodejs non è presente il file index.html che lega tutto
-        insieme, quindi devi essere esplicito.
-			</p>
-			<p>
-        Se stai esportando un modulo che dipende da altri file, dovrai dire a node 
-        di caricarli. Di seguito un approccio:
-			</p>
-			<ol>
-				<li>
-          All'inizio del tuo  modulo, controlla se ti trovi in un ambiente nodejs.
-				</li>
-				<li>Se è così, dichiara esplicitamente le tue dipendenze.</li>
-				<li>
-          In caso contrario, probabilmente sei in un browser e quindi non devi fare
-          nient'altro.
-				</li>
-			</ol>
-			Esempio di codice da Physics.js:
-			<code>
-//=============================================================================
-// setup for server-side testing
-//=============================================================================
-if (typeof require === 'function') // test for nodejs environment {
-  const THREE = require('three'); const MY3 = require('./MY3.js'); }
-			</code>
-		</div>
-	</body>
-</html>

+ 0 - 232
docs/manual/ja/buildTools/Testing-with-NPM.html

@@ -1,232 +0,0 @@
-<!DOCTYPE html>
-<html lang="ja">
-
-<head>
-    <meta charset="utf-8">
-    <base href="../../../" />
-    <script src="page.js"></script>
-    <link type="text/css" rel="stylesheet" href="page.css" />
-</head>
-
-<body>
-    <h1>[name]</h1>
-
-    <p class="desc">
-        この記事ではhtree.jsを[link:https://nodejs.org/en/ node.js]環境で実行する方法について説明します。 node環境で実行すると、自動テストを実行できるようになります。 テストはコマンドラインから実行可能で、[link:https://travis-ci.org/ Travis]のような自動のCIツールからも実行できます。
-    </p>
-
-    <h2>The short version(概略)</h2>
-
-    <p>
-        npmとnodeについて詳しい方は以下のコマンドを実行し
-        <code>
-				$ npm install three --save-dev
-			</code> それから以下のコードをテストに追加してください
-        <code>
-			const THREE = require('three');
-		</code>
-    </p>
-
-    <h2>一からテスト可能なプロジェクトを作成する</h2>
-    <p>
-        If you're not familiar with these tools, here's a quick guide (for linux, the installation process will be slightly different using windows, but the NPM commands are identical). もしツールについて詳しくないようであれば、簡単な説明があります(linuxでは、windowsとインストールのやり方が大きく異なります。しかしNPMコマンドはそれとは関係ありません)。
-    </p>
-
-    <h3>Basic setup(基本的な設定)</h3>
-    <div>
-        <ol>
-            <li>
-                [link:https://www.npmjs.org/ npm]とnodejsをインストールします。 もっとも早い方法は、一般的に以下のように行うことです。
-                <code>
-$ sudo apt-get install -y npm nodejs-legacy
-# fix any problems with SSL in the default registry URL
-$ npm config set registry http://registry.npmjs.org/
-					</code>
-            </li>
-
-            <li>
-                新しいプロジェクトのディレクトリを作成します。
-                <code>
-						 $ mkdir test-example; cd test-example
-					</code>
-            </li>
-
-            <li>
-                npmに新しいプロジェクトfileを作成させます。
-                <code>
-					 $ npm init
-					</code> すべてのプロンプトでEnterを押すと全てデフォルトの設定になります。 こうすることでpackage.jsonが作成されます。
-            </li><br />
-
-            <li>
-                以下のようにしてテスト機能を起動してみてください
-                <code>
-$ npm test
-					</code> おそらくですが、これは失敗します。 package.jsonの中の、テスト用のスクリプトの定義はこのようになっています。
-                <code>
-						"test": "echo \"Error: no test specified\" && exit 1"
-					</code>
-            </li>
-
-        </ol>
-    </div>
-
-    <h2>Add mocha(mochaの追加)</h2>
-    <div>
-        [link:https://mochajs.org/ mocha]を使用していきます。
-
-        <ol>
-            <li>
-                以下のようにしてmochaをインストールします。
-                <code>
-$ npm install mocha --save-dev
-					</code> node_modulesディレクトリが作られていて、依存関係がそこに示されていることが分かるかと思います。 また、package.jsonが更新されていることも分かるでしょう。 devDependencies プロパティは、--save-dev の使用により追加・更新されます。
-            </li><br />
-
-            <li>
-                テストでmochaを使うためにpackage.jsonを編集してください。 これはtestが呼ばれた時に、mochaを実行して詳細をどこに報告するかを決めるためです。 デフォルトでは、testディレクトリにあるものはなんでも実行されます。(もしtestディレクトリがない場合npm ERRが発生する可能性があります。その場合はmkdir testを実行し、ディレクトリを作成してください)
-                <code>
-						"test": "mocha --reporter list"
-					</code>
-            </li>
-
-            <li>
-                以下のコマンドでテストをもう一度実行してみてください
-                <code>
-						$ npm test
-					</code> 今度はうまくいくはずです。0 passing (1ms)などと報告されるでしょう。
-            </li>
-
-        </ol>
-    </div>
-
-    <h2>three.jsを追加する</h2>
-    <div>
-        <ol>
-            <li>
-                three.jsを依存ファイルに加えましょう。
-                <code>
-$ npm install three --save-dev
-					</code>
-                <ul>
-                    <li>
-                        もし違うバージョンのthreeが必要な場合は次のコマンドを使ってください。
-                        <code>
-								$ npm show three versions
-							</code> こうすると使用可能なバージョンが分かります。npmに使用したいバージョンを伝えましょう。
-                        <code>
- $ npm install [email protected] --save
-							</code> (この例では0.84.0をインストールしています)。--saveは、これをdevの依存関係ではなく、このプロジェクトの依存関係にします。詳しくは、ドキュメント([link:https://docs.npmjs.com/cli/v8/configuring-npm/package-json here])をご覧ください。
-                    </li>
-                </ul>
-            </li>
-
-            <li>
-                Mochaはtestディレクトリの中でテストを探します。それではtestディレクトリを作成しましょう。
-                <code>
-					$ mkdir test
-					</code>
-            </li>
-
-            <li>
-                最終的には、実際に実行するJSのテストが必要です。 three.jsのオブジェクトが利用可能で動いていることを確かめるための簡単なテストを追加してみましょう。 以下のコードが書かれたtest/verify-three.jsを作成します。
-
-
-                <code>
-const THREE = require('three');
-const assert = require('assert');
-
-describe('The THREE object', function() {
-  it('should have a defined BasicShadowMap constant', function() {
-    assert.notEqual('undefined', THREE.BasicShadowMap);
-  }),
-
-  it('should be able to construct a Vector3 with default of x=0', function() {
-    const vec3 = new THREE.Vector3();
-    assert.equal(0, vec3.x);
-  })
-})
-</code>
-            </li>
-
-            <li>
-                最後に$npm testでもう一度testを行いましょう。上のテストが実行されて成功するはずで、結果は以下のようになるでしょう。
-                <code>
-The THREE object should have a defined BasicShadowMap constant: 0ms
-The THREE object should be able to construct a Vector3 with default of x=0: 0ms
-2 passing (8ms)
-				</code>
-            </li>
-        </ol>
-    </div>
-
-    <h2>自分のコードを追加する</h2>
-    <div>
-        3つのことをやる必要があります。
-
-        <ol>
-            <li>
-                自分のコードに期待される動作についてテストを書き、それをtest/の下に置いてください。 ここ([link:https://github.com/air/encounter/blob/master/test/Physics-test.js Here])に実際のプロジェクトの例を置いておきます。
-            </li>
-
-            <li>
-                nodejsが機能的なコードを見られるようにエクスポートして、requireと組み合わせて使用します。こちら([link:https://github.com/air/encounter/blob/master/js/Physics.js here])をご覧ください。
-            </li>
-
-            <li>
-                上記のサンプルコードでrequire('three')を行なったのと同じ方法で、 テストコードに、あなたが作成したコードをインポートする必要があります。
-            </li>
-        </ol>
-
-        <p>
-            2と3の項目は、コードの管理方法によって異なります。上記のPhysics.jsの例では、exportの部分は最後の方にあります。 module.exportsにオブジェクトを割り当てています。
-        </p>
-        <code>
-//=============================================================================
-// make available in nodejs
-//=============================================================================
-if (typeof exports !== 'undefined')
-{
-  module.exports = Physics;
-}
-			</code>
-    </div>
-
-    <h2>Dealing with dependencies(依存関係に対処する)</h2>
-    <div>
-        <p>
-            もしすでに、require.jsやborwserifyといった賢いツールを使っているようなら、この章は飛ばしてください。
-        </p>
-        <p>
-            three.jsのプロジェクトはブラウザで実行するのが一般的です。そのため、モジュールのロードはブラウザによって行われ、たくさんのscriptタグが実行されます。一つのファイルであれば依存関係の心配をする必要はありません。 しかしながら、nodejsでは他の全てのものと結びつけられているindex.htmlがないので、 明示的にそうする必要があります。
-        </p>
-        <p>
-            他のファイルに依存するモジュールをexportする場合、nodeにそのファイルをロードするように伝えなくてはなりません。 以下に1つのアプローチを示します。
-        </p>
-        <ol>
-            <li>
-                モジュールを始める時に、nodejs環境であるかを確かめます。
-            </li>
-            <li>
-                もしそうであれば、依存関係を明示的に宣言します。
-            </li>
-            <li>
-                もしnodejs環境でないならおそらくブラウザ環境ですので、特に他のことはしなくても良いです。
-            </li>
-        </ol>
-        Physics.jsからのサンプルコードを示しておきます。
-        <code>
-//=============================================================================
-// setup for server-side testing
-//=============================================================================
-if (typeof require === 'function') // test for nodejs environment
-{
-  const THREE = require('three');
-  const MY3 = require('./MY3.js');
-}
-			</code>
-    </div>
-
-</body>
-
-</html>

+ 0 - 250
docs/manual/ko/buildTools/Testing-with-NPM.html

@@ -1,250 +0,0 @@
-<!DOCTYPE html>
-<html lang="ko">
-	<head>
-		<meta charset="utf-8">
-		<base href="../../../" />
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		<h1>NPM 테스트([name])</h1>
-
-		<p class="desc">
-            이 문서에서는 [link:https://nodejs.org/en/ node.js] 환경에서 three.js를 사용해 자동 테스트를 진행해보는 방법을 알려드립니다.
-            테스트는 커맨드 라인으로 실행이 가능하며 [link:https://travis-ci.org/ Travis]같은 CI 툴을 통해 자동으로 실행이 가능합니다.
-		</p>
-
-		<h2>간단한 버전</h2>
-
-		<p>
-			node와 npm이 친숙하다면,
-			<code>
-				$ npm install three --save-dev
-			</code>
-			그리고 여기에
-		<code>
-			const THREE = require('three');
-		</code>
-			를 추가합니다.
-		</p>
-
-		<h2>scratch에서 테스트 가능한 예제 만들기</h2>
-		<p>
-			이 툴들에 익숙치 않다면, 아래의 간단한 가이드(리눅스 기반으로, 윈도우에서의 설치 절차와는 조금 다릅니다. 하지만 NPM 커맨드는 같습니다)를 따라주세요.
-		</p>
-
-		<h3>기본 설치</h3>
-		<div>
-			<ol>
-				<li>
-					[link:https://www.npmjs.org/ npm] 과 nodejs를 설치합니다. 가장 짧은 설치 명령어는 다음과 같습니다.
-					<code>
-$ sudo apt-get install -y npm nodejs-legacy
-# 기본 레지스트리 URL에서 SSL 문제가 생기면 수정해주세요
-$ npm config set registry http://registry.npmjs.org/
-					</code>
-				</li>
-
-				<li>
-					새 프로젝트 폴더를 만듭니다.
-					<code>
-						 $ mkdir test-example; cd test-example
-					</code>
-				</li>
-
-				<li>
-					npm에게 새 프로젝트 파일을 만들게 합니다:
-					<code>
-					 $ npm init
-                    </code>
-                    엔터를 계속 쳐서 기본 설정으로 동의 후 진행하세요.
-                    이 절차가 끝나면 package.json 파일이 생길 것입니다.
-				</li><br />
-
-				<li>
-					다음 코드로 테스트를 시작해 보세요
-					<code>
-$ npm test
-					</code>
-					아마 실패가 뜰 것입니다.
-					package.json 파일을 보면, test 스크립트의 경로가 다음과 같이 되어 있을 것입니다.
-					<code>
-						"test": "echo \"Error: no test specified\" && exit 1"
-					</code>
-				</li>
-
-			</ol>
-		</div>
-
-		<h2>mocha 추가하기</h2>
-		<div>
-			[link:https://mochajs.org/ mocha]를 사용할 것입니다.
-
-			<ol>
-				<li>
-					mocha는 아래 명령어로 설치합니다.
-					<code>
-$ npm install mocha --save-dev
-					</code>
-                    node_modules/이 생성되어 있고 파일들이 있어야 합니다.
-                    그리고 package.json의 내용이 업데이트 되었는지도 확인해봐야 합니다.
-                    --save-dev를 통해 devDependencies 속성에 업데이트가 되어있어야 합니다.
-				</li><br />
-
-				<li>
-                    mocha가 동작하는지 확인하기 위해 package.json을 수정합니다. 우리가 하고자 하는 것은 test를 치면 mocha를 동작하고 여러 리포터를 확인하는 것입니다.
-                    기본적으로 이 명령어는 test/ 의 모든 것을 실행할 것입니다.
-					(test/ 폴더가 없다면 npm ERR!가 나올 것입니다, mkdir test로 만들어주세요)
-					<code>
-						"test": "mocha --reporter list"
-					</code>
-				</li>
-
-				<li>
-					test를 다시 실행시킵니다.
-					<code>
-						$ npm test
-					</code>
-
-					아마 성공 메세지가 뜨고 0 passing (1ms)와 비슷한 문구가 뜰 것입니다.
-				</li>
-
-			</ol>
-		</div>
-
-		<h2>three.js 추가</h2>
-		<div>
-			<ol>
-				<li>
-					three.js를 다음과 같이 추가합니다.
-					<code>
-$ npm install three --save-dev
-					</code>
-					<ul>
-						<li>
-							다른 three 버전을 사용하려면, 아래 명령어를 입력하고
-							<code>
-								$ npm show three versions
-							</code>
-						  사용 가능한 버전을 확인해, npm에게 특정 버전을 사용하라고 합니다.
-							<code>
- $ npm install [email protected] --save
-							</code>
-                            (이 예제에서는 0.84.0 버전을 사용했습니다.). --save 는 dev 설정이 아닌 이 프로젝트의 의존성으로 추가하는 명령어입니다.
-                            여기([link:https://docs.npmjs.com/cli/v8/configuring-npm/package-json link])에서 더 많은 내용을 확인하세요.
-						</li>
-					</ul>
-				</li>
-
-				<li>
-					Mocha 는 test/에서 test를 찾을 것이기 때문에, 아래 명령어를 입력합니다.
-					<code>
-					$ mkdir test
-					</code>
-				</li>
-
-				<li>
-                    이제 마지막으로 JS 테스트가 남았습니다. three.js가 잘 작동하는지 간단한 테스트를 통해 확인해 봅시다.
-                    test/verify-three.js 파일을 만들고 안에 다음 내용을 넣어주세요:
-<code>
-const THREE = require('three');
-const assert = require('assert');
-
-describe('The THREE object', function() {
-  it('should have a defined BasicShadowMap constant', function() {
-    assert.notEqual('undefined', THREE.BasicShadowMap);
-  }),
-
-  it('should be able to construct a Vector3 with default of x=0', function() {
-    const vec3 = new THREE.Vector3();
-    assert.equal(0, vec3.x);
-  })
-})
-</code>
-				</li>
-
-				<li>
-				마지막으로 $ npm test로 확인해봅시다. 위의 테스트 파일을 성공적으로 실행시키고 다음과 같은 내용이 나올 것입니다.
-				<code>
-The THREE object should have a defined BasicShadowMap constant: 0ms
-The THREE object should be able to construct a Vector3 with default of x=0: 0ms
-2 passing (8ms)
-				</code>
-				</li>
-			</ol>
-		</div>
-
-		<h2>자신의 코드 추가하기</h2>
-		<div>
-			세 가지를 수행해야 합니다:
-
-			<ol>
-				<li>
-					자신의 코드의 예상 결과가 들어있는 예제를 만들어, test/ 폴더 안에 두세요.
-					여기([link:https://github.com/air/encounter/blob/master/test/Physics-test.js link])에서 진짜 프로젝트의 예제를 확인할 수 있습니다.
-				</li>
-
-				<li>
-                    nodeJS에서 알아볼 수 있는, require를 사용해 기능들을 내보내기 하세요.
-                    여기([link:https://github.com/air/encounter/blob/master/js/Physics.js link])를 참고하세요.
-				</li>
-
-				<li>
-					테스트 파일에서 코드를 불러오세요. 같은 방식으로 우리는 위의 예제에서 require('three')를 불러왔습니다.
-				</li>
-			</ol>
-
-			<p>
-                2번과 3번 과정은 자신의 코드를 어떻게 관리하는지에 따라 달려 있습니다. 위의 Physics.js 예제에서는 내보내기 부분이 맨 마지막에 있습니다.
-                module.exports에 할당했습니다.
-			</p>
-			<code>
-//=============================================================================
-// make available in nodejs
-//=============================================================================
-if (typeof exports !== 'undefined')
-{
-  module.exports = Physics;
-}
-			</code>
-		</div>
-
-		<h2>의존성 관리</h2>
-		<div>
-			<p>
-				require.js나 browserify같은 현명한 방법을 사용하고 있다면 이 부분은 넘어가세요.
-			</p>
-			<p>
-                일반적으로 three.js 프로젝트는 브라우저에서 돌아가게 하기 위한 목적입니다. 따라서 모듈 로딩은 브라우저가 스크립트 태그를 실행함으로써 이루어집니다.
-                개인 파일은 의존성에 대해 걱정하지 않아도 됩니다. 하지만 nodejs 환경에서는 모든 것을 묶어놓은 index.html이 없기 때문에, 분명히 해 둘 필요가 있습니다.
-			</p>
-			<p>
-				다른 파일에 의존하는 모듈을 내보내기 할 때에는, node에 같이 내보내기하라고 알려줘야 합니다.
-				그 방법 중 하나는 다음과 같습니다:
-			</p>
-			<ol>
-				<li>
-					모듈의 시작 부분에서 nodejs 환경인지 체크합니다.
-				</li>
-				<li>
-					만약 그렇다면 의존성을 명확하게 선언해줍니다.
-				</li>
-				<li>
-					그렇지 않다면 브라우저 환경일 것이기 때문에 아무것도 할 것이 없습니다.
-				</li>
-			</ol>
-			Physics.js의 예제입니다:
-			<code>
-//=============================================================================
-// 서버사이드 테스트 설정
-//=============================================================================
-if (typeof require === 'function') // nodejs 환경 테스트
-{
-  const THREE = require('three');
-  const MY3 = require('./MY3.js');
-}
-			</code>
-		</div>
-
-	</body>
-</html>

+ 0 - 255
docs/manual/pt-br/buildTools/Testing-with-NPM.html

@@ -1,255 +0,0 @@
-<!DOCTYPE html>
-<html lang="pt-br">
-	<head>
-		<meta charset="utf-8">
-		<base href="../../../" />
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		<h1>Testando com NPM</h1>
-
-		<p class="desc">
-            Este artigo mostra como colocar o three.js em um ambiente [link:https://nodejs.org/en/ node.js] para que você
-            possa executar testes automatizados. Os testes podem ser executados na linha de comando ou por
-            ferramentas de CI como [link:https://travis-ci.org/ Travis].
-		</p>
-
-		<h2>A versão curta</h2>
-
-		<p>
-			Se você estiver confortável com node e npm,
-			<code>
-				$ npm install three --save-dev
-			</code>
-			e adicione
-		<code>
-			const THREE = require('three');
-		</code>
-			para o seu teste.
-		</p>
-
-		<h2>Criar um projeto testável do zero</h2>
-		<p>
-            Se você não estiver familiarizado com essas ferramentas, aqui está um guia rápido (para linux, o processo de instalação
-            será um pouco diferente do que usando o Windows, mas os comandos do NPM são idênticos).
-		</p>
-
-		<h3>Configuração básica</h3>
-		<div>
-			<ol>
-				<li>
-					Instale o [link:https://www.npmjs.org/ npm] e o nodejs. O caminho mais curto normalmente parece algo como
-					<code>
-$ sudo apt-get install -y npm nodejs-legacy
-# fix any problems with SSL in the default registry URL
-$ npm config set registry http://registry.npmjs.org/
-					</code>
-				</li>
-
-				<li>
-					Crie um novo diretório de projeto
-					<code>
-						 $ mkdir test-example; cd test-example
-					</code>
-				</li>
-
-				<li>
-					Peça ao npm para criar um novo arquivo de projeto para você:
-					<code>
-					 $ npm init
-					</code>
-                    e aceite todas as opções default pressionando Enter em todos os prompts.
-                    Isso criará o package.json.
-				</li><br />
-
-				<li>
-					Experimente iniciar o recurso de teste com
-					<code>
-$ npm test
-					</code>
-					Isso falhará, o que é esperado.
-                    Se você olhar no package.json, a definição do script de teste é
-					<code>
-						"test": "echo \"Error: no test specified\" && exit 1"
-					</code>
-				</li>
-
-			</ol>
-		</div>
-
-		<h2>Adicionar mocha</h2>
-		<div>
-			Vamos usar o [link:https://mochajs.org/mocha].
-
-			<ol>
-				<li>
-					Instale o mocha com
-					<code>
-$ npm install mocha --save-dev
-					</code>
-					Observe que a pasta node_modules/ é criada e suas dependências aparecem lá.
-                    Observe também que seu package.json foi atualizado: a propriedade devDependencies
-                    é adicionada e atualizada pelo uso de --save-dev.
-				</li><br />
-
-				<li>
-                    Edite o package.json para usar o mocha para teste. Quando o teste for chamado, queremos apenas executar
-                    o mocha e especificar um relatório detalhado. Por padrão, isso executará qualquer coisa em test/
-                    (não ter a pasta test/ pode levar a um ERR! no npm, crie-a pelo comando mkdir test)
-					<code>
-						"test": "mocha --reporter list"
-					</code>
-				</li>
-
-				<li>
-					Reexecute o teste com
-					<code>
-						$ npm test
-					</code>
-                    Isso agora deve correr bem, reportando "0 passing (1ms)"
-                    ou similar.
-				</li>
-
-			</ol>
-		</div>
-
-		<h2>Adicionar three.js</h2>
-		<div>
-			<ol>
-				<li>
-					Vamos baixar nossa dependência three.js com
-					<code>
-$ npm install three --save-dev
-					</code>
-					<ul>
-						<li>
-							Se você precisar de uma versão diferente do three.js, use
-							<code>
-								$ npm show three versions
-							</code>
-                          para listar o que está disponível. Para escolher pelo npm a versão correta, use
-							<code>
- $ npm install [email protected] --save
-							</code>
-							(0.84.0 nesse exemplo). --save torna isso uma dependência do projeto, em vez de
-                            dependência dev. Veja os documentos [link:https://docs.npmjs.com/cli/v8/configuring-npm/package-json aqui] para mais informações.
-						</li>
-					</ul>
-				</li>
-
-				<li>
-					Mocha irá procurar por testes em test/, então vamos executar
-					<code>
-					$ mkdir test
-					</code>
-				</li>
-
-				<li>
-                    Finalmente, precisamos de um teste JS para ser executado. Vamos adicionar um teste simples que verificará que
-                    o objeto three.js está disponível e funcionando. Crie test/verify-three.js contendo:
-<code>
-const THREE = require('three');
-const assert = require('assert');
-
-describe('The THREE object', function() {
-  it('should have a defined BasicShadowMap constant', function() {
-    assert.notEqual('undefined', THREE.BasicShadowMap);
-  }),
-
-  it('should be able to construct a Vector3 with default of x=0', function() {
-    const vec3 = new THREE.Vector3();
-    assert.equal(0, vec3.x);
-  })
-})
-</code>
-				</li>
-
-				<li>
-                Finalmente vamos testar novamente com $ npm test. Isso deve executar os testes acima e ter sucesso,
-                mostrando algo como:
-				<code>
-The THREE object should have a defined BasicShadowMap constant: 0ms
-The THREE object should be able to construct a Vector3 with default of x=0: 0ms
-2 passing (8ms)
-				</code>
-				</li>
-			</ol>
-		</div>
-
-		<h2>Adicione seu próprio código</h2>
-		<div>
-			Você precisa fazer três coisas:
-
-			<ol>
-				<li>
-					Escreva um teste para o comportamento esperado do seu código e coloque-o em test/.
-					[link:https://github.com/air/encounter/blob/master/test/Physics-test.js aqui] tem um exemplo de um projeto real.
-				</li>
-
-				<li>
-					Exporte seu código funcional de forma que o nodejs possa vê-lo, para uso em conjunto com require.
-					Veja isso [link:https://github.com/air/encounter/blob/master/js/Physics.js aqui].
-				</li>
-
-				<li>
-                    Requisite seu código no arquivo de teste, da mesma forma que fizemos um require('three') no exemplo acima.
-				</li>
-			</ol>
-
-			<p>
-                Os itens 2 e 3 variam dependendo de como você gerencia seu código. No exemplo de Physics.js
-                dado acima, a parte de exportação está bem no final. Atribuímos um objeto a module.exports:
-			</p>
-			<code>
-//=============================================================================
-// make available in nodejs
-//=============================================================================
-if (typeof exports !== 'undefined')
-{
-  module.exports = Physics;
-}
-			</code>
-		</div>
-
-		<h2>Lidando com dependências</h2>
-		<div>
-			<p>
-				Se você já estiver usando algo como require.js ou browserify, pule esta parte.
-			</p>
-			<p>
-                Normalmente, um projeto three.js será executado no navegador. O carregamento do módulo é, portanto, feito pelo 
-                navegador, executando um monte de tags de script. Seus arquivos individuais não precisam se preocupar
-                com dependências. No entanto, em um contexto nodejs, não há index.html vinculando tudo
-                junto, então você tem que ser explícito.
-			</p>
-			<p>
-				Se você estiver exportando um módulo que depende de outros arquivos, precisará dizer ao node para carregá-los.
-                Aqui está uma abordagem:
-			</p>
-			<ol>
-				<li>
-					No início do seu módulo, verifique se você está em um ambiente nodejs.
-				</li>
-				<li>
-					Em caso afirmativo, declare explicitamente suas dependências.
-				</li>
-				<li>
-					Caso contrário, você provavelmente está em um navegador, então não precisa fazer mais nada.
-				</li>
-			</ol>
-			Código de exemplo de Physics.js:
-			<code>
-//=============================================================================
-// setup for server-side testing
-//=============================================================================
-if (typeof require === 'function') // test for nodejs environment
-{
-  const THREE = require('three');
-  const MY3 = require('./MY3.js');
-}
-			</code>
-		</div>
-
-	</body>
-</html>

+ 0 - 248
docs/manual/zh/buildTools/Testing-with-NPM.html

@@ -1,248 +0,0 @@
-<!DOCTYPE html>
-<html lang="zh">
-	<head>
-		<meta charset="utf-8">
-		<base href="../../../" />
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		<h1>使用NPM进行测试([name])</h1>
-
-		<p class="desc">
-			这篇文章展示了如何将three.js置入[link:https://nodejs.org/en/ node.js]环境中,
-			这样你就可以执行自动化测试了。测试可以通过命令行或者类似[link:https://travis-ci.org/ Travis]的CI工具来运行。
-		</p>
-
-		<h2>一句话概括</h2>
-
-		<p>
-			如果你习惯使用node和npm,
-			<code>
-				$ npm install three --save-dev
-			</code>
-			并将
-		<code>
-			const THREE = require('three');
-		</code>
-			添加到你的测试中。
-		</p>
-
-		<h2>从头创建一个可测试的项目</h2>
-		<p>
-			如果你不太熟悉这些工具,下面是一个快速入门。(基于linux,在windows上的安装过程会稍稍有点不一样,不过NPM指令是相同的。)
-		</p>
-
-		<h3>基本设置</h3>
-		<div>
-			<ol>
-				<li>
-					安装[link:https://www.npmjs.org/ npm]和nodejs。最简单的方式一般像这样
-					<code>
-$ sudo apt-get install -y npm nodejs-legacy
-# 修复默认registry URL中任何SSL的问题
-$ npm config set registry http://registry.npmjs.org/
-					</code>
-				</li>
-
-				<li>
-					新建一个项目路径
-					<code>
-						 $ mkdir test-example; cd test-example
-					</code>
-				</li>
-
-				<li>
-					让npm为你创建一份新的项目文件:
-					<code>
-					 $ npm init
-					</code>
-					 在所有出现的提示中敲击回车键来接受默认值。
-					 这样,一份package.json就建立好了。
-				</li><br />
-
-				<li>
-					尝试启动测试功能
-					<code>
-$ npm test
-					</code>
-					当然,这一定会失败。
-					如果你检查一下package.json,test script的定义是这样的
-					<code>
-						"test": "echo \"Error: no test specified\" && exit 1"
-					</code>
-				</li>
-
-			</ol>
-		</div>
-
-		<h2>添加mocha</h2>
-		<div>
-			我们将使用[link:https://mochajs.org/ mocha]。
-
-			<ol>
-				<li>
-					安装mocha
-					<code>
-$ npm install mocha --save-dev
-					</code>
-					你会注意到 node_modules/ 被创建了,并且你的依赖都出现在了这里面。
-					还有你的package.json被更新了,--save-dev指令向其中加入并更新了devDependencies属性。
-				</li><br />
-
-				<li>
-					编辑package.json来使用mocha进行测试。当调用测试的时候,我们只想运行mocha并且生成一份详细的报告。
-					默认情况下这会运行 test/ 中的任何东西。
-					(如果项目中没有 test/ 目录的话,会导致npm报错。你可以通过mkdir test来创建这个目录)
-					<code>
-						"test": "mocha --reporter list"
-					</code>
-				</li>
-
-				<li>
-					重新运行测试
-					<code>
-						$ npm test
-					</code>
-
-					现在应该就能成功执行了,生成类似 0 passing (1ms) 的报告。
-				</li>
-
-			</ol>
-		</div>
-
-		<h2>添加three.js</h2>
-		<div>
-			<ol>
-				<li>
-					现在添加我们的three.js依赖
-					<code>
-$ npm install three --save-dev
-					</code>
-					<ul>
-						<li>
-							如果你需要three.js的其他版本,使用
-							<code>
-								$ npm show three versions
-							</code>
-						  	来确认哪些是可用的。要让npm使用正确的版本,执行
-							<code>
- $ npm install [email protected] --save
-							</code>
-							(例子中用的是0.84.0)。 --save 指令将此加入项目的dependency而不是dev dependency。
-							更多信息请参阅[link:https://docs.npmjs.com/cli/v8/configuring-npm/package-json 这份文档]。
-						</li>
-					</ul>
-				</li>
-
-				<li>
-					Mocha会在 test/ 目录中寻找测试文件,所以我们先创建这个目录:
-					<code>
-					$ mkdir test
-					</code>
-				</li>
-
-				<li>
-					最后我们需要一份JS测试文件来运行。我们就添加一段简单的测试程序,这段程序会检验three.js对象是否能正常工作。
-					在 test/ 目录下创建verify-three.js包含以下代码:
-<code>
-const THREE = require('three');
-const assert = require("assert");
-
-describe('The THREE object', function() {
-  it('should have a defined BasicShadowMap constant', function() {
-    assert.notEqual('undefined', THREE.BasicShadowMap);
-  }),
-
-  it('should be able to construct a Vector3 with default of x=0', function() {
-    const vec3 = new THREE.Vector3();
-    assert.equal(0, vec3.x);
-  })
-})
-</code>
-				</li>
-
-				<li>
-				最后再次通过$ npm test来测试。这次应该能正确执行上面的代码,并且返回类似:
-				<code>
-The THREE object should have a defined BasicShadowMap constant: 0ms
-The THREE object should be able to construct a Vector3 with default of x=0: 0ms
-2 passing (8ms)
-				</code>
-				</li>
-			</ol>
-		</div>
-
-		<h2>加入你自己的代码</h2>
-		<div>
-			你需要做下面三件事:
-
-			<ol>
-				<li>
-					为你的代码写一段测试程序来检验期望结果,并把它放在 test/ 目录下。
-					[link:https://github.com/air/encounter/blob/master/test/Physics-test.js 这里]有一个实际项目的例子。
-				</li>
-
-				<li>
-					将你的代码以nodejs承认的方式导出,即可以通过require的方式引用。
-					参考[link:https://github.com/air/encounter/blob/master/js/Physics.js 这份代码]。
-				</li>
-
-				<li>
-					在测试程序中通过require引入你自己的代码,就像上面例子中我们通过require('three')来引入一样。
-				</li>
-			</ol>
-
-			<p>
-				第2、3条会根据你组织代码的方式而改变。在上面给出的Physics.js的例子中,导出的部分在代码的最末尾。
-				我们将module.exports赋值为一个对象:
-			</p>
-			<code>
-//=============================================================================
-// 为了在nodejs中可用
-//=============================================================================
-if (typeof exports !== 'undefined')
-{
-  module.exports = Physics;
-}
-			</code>
-		</div>
-
-		<h2>处理依赖</h2>
-		<div>
-			<p>
-				如果你已经在使用require.js或者browserify之类的便捷工具,就跳过这个部分。
-			</p>
-			<p>
-				一般来说,一个three.js项目将在浏览器中运行,浏览器会通过执行一系列script标签来加载模块。
-				你自己的文件不用考虑依赖的问题。然而在nodejs环境中,没有一个关联所有文件的index.html,所以你需要显式地加载。
-			</p>
-			<p>
-				如果你要导出的模块还依赖其他文件,你需要告诉node去加载它们。下面是一种方式:
-			</p>
-			<ol>
-				<li>
-					在你的模块顶部,检查是否处于nodejs环境中。
-				</li>
-				<li>
-					如果是,那就显式地声明你的依赖。
-				</li>
-				<li>
-					如果不是,你多半处于浏览器环境中。这时候你不需要做任何多余操作。
-				</li>
-			</ol>
-			用Physics.js中的代码举例:
-			<code>
-//=============================================================================
-// 服务器端测试配置
-//=============================================================================
-if (typeof require === 'function') // 检测nodejs环境
-{
-  const THREE = require('three');
-  const MY3 = require('./MY3.js');
-}
-			</code>
-		</div>
-
-	</body>
-</html>