mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Added web and grunt scripts
This commit is contained in:
48
gruntfile.js
Normal file
48
gruntfile.js
Normal file
@@ -0,0 +1,48 @@
|
||||
module.exports = function (grunt) {
|
||||
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
grunt.initConfig({
|
||||
|
||||
// define source files and their destinations
|
||||
babel: {
|
||||
dist: {
|
||||
files: [{
|
||||
expand: true,
|
||||
cwd: "src/",
|
||||
src: ["**.*"],
|
||||
dest: "lib/",
|
||||
ext: ".js"
|
||||
}]
|
||||
}
|
||||
},
|
||||
browserify: {
|
||||
dist: {
|
||||
files: {
|
||||
'web-dist/discord.js': ["lib/index.js"],
|
||||
},
|
||||
options: {
|
||||
browserifyOptions: {
|
||||
standalone: "Discord"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
uglify: {
|
||||
min: {
|
||||
files: {
|
||||
"./web-dist/discord.min.js": "./web-dist/discord.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// load plugins
|
||||
grunt.loadNpmTasks('grunt-browserify');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
|
||||
// register at least this one task
|
||||
grunt.registerTask('default', ['babel']);
|
||||
grunt.registerTask('web', ['browserify', "uglify"]);
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user