Skip to content

Commit

Permalink
use require-self to be able to do require('mineflayer') in the examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rom1504 committed Nov 30, 2015
1 parent 9ab788c commit 73608b8
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/chatAddPattern.js
Expand Up @@ -13,7 +13,7 @@
*
* Below you can see an example for the skyblock.net server
*/
var mineflayer = require('../');
var mineflayer = require('mineflayer');

if(process.argv.length < 4 || process.argv.length > 6) {
console.log("Usage : node chatAddPattern.js <host> <port> [<name>] [<password>]");
Expand Down
2 changes: 1 addition & 1 deletion examples/chatterbox.js
Expand Up @@ -12,7 +12,7 @@
* This bot also replies to some specific chat messages so you can ask him
* a few informations while you are in game.
*/
var mineflayer = require('../');
var mineflayer = require('mineflayer');

if(process.argv.length < 4 || process.argv.length > 6) {
console.log("Usage : node chatterbot.js <host> <port> [<name>] [<password>]");
Expand Down
2 changes: 1 addition & 1 deletion examples/chest.js
Expand Up @@ -19,7 +19,7 @@
* This last one is usually reserved to Server Ops so make sure you have the
* appropriate permission to do it or it won't work.
*/
var mineflayer = require('../');
var mineflayer = require('mineflayer');

if(process.argv.length < 4 || process.argv.length > 6) {
console.log("Usage : node chest.js <host> <port> [<name>] [<password>]");
Expand Down
2 changes: 1 addition & 1 deletion examples/digger.js
Expand Up @@ -10,7 +10,7 @@
* Remember that in survival mode he might not have enough dirt to get back up,
* so be sure to teach him a few more tricks before leaving him alone at night.
*/
var mineflayer = require('../');
var mineflayer = require('mineflayer');

if(process.argv.length < 4 || process.argv.length > 6) {
console.log("Usage : node digger.js <host> <port> [<name>] [<password>]");
Expand Down
2 changes: 1 addition & 1 deletion examples/echo.js
Expand Up @@ -6,7 +6,7 @@
* It's not very useful yet, but you can use this as a starting point
* to create your own bot.
*/
var mineflayer = require('../');
var mineflayer = require('mineflayer');

if(process.argv.length < 4 || process.argv.length > 6) {
console.log("Usage : node echo.js <host> <port> [<name>] [<password>]");
Expand Down
2 changes: 1 addition & 1 deletion examples/graffiti.js
Expand Up @@ -9,7 +9,7 @@
*
* To update a sign simply send a message in this format: write [your message]
*/
var mineflayer = require('../');
var mineflayer = require('mineflayer');

if(process.argv.length < 4 || process.argv.length > 6) {
console.log("Usage : node graffiti.js <host> <port> [<name>] [<password>]");
Expand Down
2 changes: 1 addition & 1 deletion examples/inventory.js
Expand Up @@ -8,7 +8,7 @@
* To learn more about the recipe system and how crafting works
* remember to read the API documentation!
*/
var mineflayer = require('../');
var mineflayer = require('mineflayer');

if(process.argv.length < 4 || process.argv.length > 6) {
console.log("Usage : node inventory.js <host> <port> [<name>] [<password>]");
Expand Down
2 changes: 1 addition & 1 deletion examples/jumper.js
Expand Up @@ -5,7 +5,7 @@
*
* This bot can move, jump, ride vehicles, attack nearby entities and much more.
*/
var mineflayer = require('../');
var mineflayer = require('mineflayer');

if(process.argv.length < 4 || process.argv.length > 6) {
console.log("Usage : node jumper.js <host> <port> [<name>] [<password>]");
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple.js
@@ -1,4 +1,4 @@
var mineflayer = require('../');
var mineflayer = require('mineflayer');

if(process.argv.length < 3 || process.argv.length > 5) {
console.log("Usage : node multiple.js <host> <port>");
Expand Down
2 changes: 1 addition & 1 deletion examples/quitter.js
Expand Up @@ -6,7 +6,7 @@
* It's not very useful yet, but you can use this as a starting point
* to create your own bot.
*/
var mineflayer = require('../');
var mineflayer = require('mineflayer');

if(process.argv.length < 4 || process.argv.length > 6) {
console.log("Usage : node quitter.js <host> <port> [<name>] [<password>]");
Expand Down
2 changes: 1 addition & 1 deletion examples/sleeper.js
Expand Up @@ -6,7 +6,7 @@
*
* You can ask the bot to sleep or wake up by sending a chat message.
*/
var mineflayer = require('../');
var mineflayer = require('mineflayer');

if(process.argv.length < 4 || process.argv.length > 6) {
console.log("Usage : node sleeper.js <host> <port> [<name>] [<password>]");
Expand Down
8 changes: 5 additions & 3 deletions package.json
Expand Up @@ -4,7 +4,8 @@
"description": "create minecraft bots with a stable, high level API",
"main": "index.js",
"scripts": {
"test": "mocha --reporter spec"
"test": "mocha --reporter spec",
"prepublish":"require-self"
},
"repository": {
"type": "git",
Expand All @@ -27,8 +28,9 @@
"vec3": "~0.1.3"
},
"devDependencies": {
"mocha": "~2.2.1",
"doctoc": "0.13.0",
"minecraft-wrap": "0.7.0"
"minecraft-wrap": "0.7.0",
"mocha": "~2.2.1",
"require-self": "^0.1.0"
}
}

0 comments on commit 73608b8

Please sign in to comment.