Skip to content

Commit

Permalink
add build system, fix deps, version
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Nelson committed Oct 18, 2018
1 parent 3377505 commit 9f06993
Show file tree
Hide file tree
Showing 3 changed files with 2,138 additions and 78 deletions.
25 changes: 25 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const gulp = require('gulp');
const fsn = require('fs-nextra');
const ts = require('gulp-typescript');
const sourcemaps = require('gulp-sourcemaps');
const merge = require('merge2');
const project = ts.createProject('tsconfig.json');

async function build() {
await Promise.all([
fsn.emptydir('dist'),
fsn.emptydir('typings'),
]);

const result = project.src()
.pipe(sourcemaps.init())
.pipe(project());

return merge([
result.dts.pipe(gulp.dest('typings')),
result.js.pipe(sourcemaps.write('.', { sourceRoot: '../src' })).pipe(gulp.dest('dist')),
]);
}

gulp.task('default', build);
gulp.task('build', build);
18 changes: 15 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
{
"name": "@lavalink/discord.js",
"version": "1.0.0",
"version": "0.1.0",
"description": "Lavalink Library based on lavalink.js made for discord.js",
"main": "index.js",
"main": "dist/index.js",
"typings": "typings/index.d.ts",
"repository": "git@github.com:lavalibs/discord.js.git",
"author": "Yukine <devyukine@gmx.de>",
"license": "MIT",
"private": false,
"scripts": {
"prepare": "gulp build"
},
"dependencies": {
"discord.js": "discordjs/discord.js",
"lavalink": "^2.2.2"
},
"peerDependencies": {
"discord.js": ">=11.4.2"
},
"devDependencies": {
"@types/node": "^10.11.2",
"@types/ws": "^6.0.1",
"discord.js": "^11.4.2",
"fs-nextra": "^0.3.7",
"gulp": "^3.9.1",
"gulp-sourcemaps": "^2.6.4",
"gulp-typescript": "^5.0.0-alpha.3",
"merge2": "^1.2.3",
"tslint": "^5.11.0",
"typescript": "^3.1.1"
}
Expand Down
Loading

0 comments on commit 9f06993

Please sign in to comment.