mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-28 21:52:17 -04:00
Set up gulpp
This commit is contained in:
parent
ab24877359
commit
423305a19d
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/node_modules
|
/node_modules
|
||||||
/test/npm-debug.log
|
/test/npm-debug.log
|
||||||
/test/server
|
/test/server
|
||||||
|
/dist/
|
||||||
|
19
gulpfile.js
Normal file
19
gulpfile.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
var gulp = require('gulp');
|
||||||
|
|
||||||
|
var babel = require('gulp-babel');
|
||||||
|
var options = {
|
||||||
|
experimental: true // Dat ES7 goodness
|
||||||
|
};
|
||||||
|
|
||||||
|
gulp.task('compile', function() {
|
||||||
|
gulp
|
||||||
|
.src('lib/*.js')
|
||||||
|
.pipe(babel(options))
|
||||||
|
.pipe(gulp.dest('build/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('watch', function() {
|
||||||
|
gulp.watch('lib/*.js', ['compile']);
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('default', ['compile']);
|
10
package.json
10
package.json
@ -2,7 +2,7 @@
|
|||||||
"name": "minecraft-protocol",
|
"name": "minecraft-protocol",
|
||||||
"version": "0.12.3",
|
"version": "0.12.3",
|
||||||
"description": "Parse and serialize minecraft packets, plus authentication and encryption.",
|
"description": "Parse and serialize minecraft packets, plus authentication and encryption.",
|
||||||
"main": "index.js",
|
"main": "dist/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/andrewrk/node-minecraft-protocol.git"
|
"url": "git://github.com/andrewrk/node-minecraft-protocol.git"
|
||||||
@ -26,11 +26,13 @@
|
|||||||
"node": ">=0.8.16"
|
"node": ">=0.8.16"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"mocha": "~1.8.2",
|
"batch": "~0.3.1",
|
||||||
|
"gulp": "^3.8.11",
|
||||||
|
"gulp-babel": "^4.0.0",
|
||||||
"mkdirp": "~0.3.4",
|
"mkdirp": "~0.3.4",
|
||||||
|
"mocha": "~1.8.2",
|
||||||
"rimraf": "~2.1.1",
|
"rimraf": "~2.1.1",
|
||||||
"zfill": "0.0.1",
|
"zfill": "0.0.1"
|
||||||
"batch": "~0.3.1"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"node-rsa": "^0.1.53",
|
"node-rsa": "^0.1.53",
|
||||||
|
@ -4,10 +4,10 @@ var EventEmitter = require('events').EventEmitter
|
|||||||
, crypto = require('crypto')
|
, crypto = require('crypto')
|
||||||
, bufferEqual = require('buffer-equal')
|
, bufferEqual = require('buffer-equal')
|
||||||
, superagent = require('superagent')
|
, superagent = require('superagent')
|
||||||
, protocol = require('./lib/protocol')
|
, protocol = require('./protocol')
|
||||||
, Client = require('./lib/client')
|
, Client = require('./client')
|
||||||
, Server = require('./lib/server')
|
, Server = require('./server')
|
||||||
, Yggdrasil = require('./lib/yggdrasil.js')
|
, Yggdrasil = require('./yggdrasil.js')
|
||||||
, getSession = Yggdrasil.getSession
|
, getSession = Yggdrasil.getSession
|
||||||
, validateSession = Yggdrasil.validateSession
|
, validateSession = Yggdrasil.validateSession
|
||||||
, joinServer = Yggdrasil.joinServer
|
, joinServer = Yggdrasil.joinServer
|
||||||
@ -20,7 +20,7 @@ try {
|
|||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.log("You are using a pure-javascript implementation of RSA.");
|
console.log("You are using a pure-javascript implementation of RSA.");
|
||||||
console.log("Your performance might be subpar. Please consider installing URSA");
|
console.log("Your performance might be subpar. Please consider installing URSA");
|
||||||
ursa = require("./rsa-wrap");
|
ursa = require("../rsa-wrap");
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@ -28,7 +28,7 @@ module.exports = {
|
|||||||
createServer: createServer,
|
createServer: createServer,
|
||||||
Client: Client,
|
Client: Client,
|
||||||
Server: Server,
|
Server: Server,
|
||||||
ping: require('./lib/ping'),
|
ping: require('./ping'),
|
||||||
protocol: protocol,
|
protocol: protocol,
|
||||||
yggdrasil: Yggdrasil,
|
yggdrasil: Yggdrasil,
|
||||||
};
|
};
|
Loading…
x
Reference in New Issue
Block a user