mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
Upgrade grunt to latest.
Also adds (experimental) dox documentation generator. Run with `grunt dox`. Documentation will be placed under build/docs/.
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks('grunt-webpack');
|
||||
grunt.loadNpmTasks('grunt-dox');
|
||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: '<json:package.json>',
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
meta: {
|
||||
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
|
||||
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
|
||||
@@ -43,39 +46,53 @@ module.exports = function(grunt) {
|
||||
}
|
||||
},
|
||||
webpack: {
|
||||
lib: {
|
||||
src: "src/js/index.js",
|
||||
dest: "build/ripple-<%= pkg.version %>.js",
|
||||
libary: "ripple", // misspelling fixed in later versions of webpack
|
||||
options: {
|
||||
entry: "./src/js/index.js",
|
||||
library: "ripple"
|
||||
},
|
||||
lib: {
|
||||
output: {
|
||||
filename: "build/ripple-<%= pkg.version %>.js"
|
||||
}
|
||||
},
|
||||
lib_debug: {
|
||||
src: "src/js/index.js",
|
||||
dest: "build/ripple-<%= pkg.version %>-debug.js",
|
||||
libary: "ripple", // misspelling fixed in later versions of webpack
|
||||
library: "ripple",
|
||||
debug: true
|
||||
output: {
|
||||
filename: "build/ripple-<%= pkg.version %>-debug.js"
|
||||
},
|
||||
debug: true,
|
||||
devtool: 'eval'
|
||||
},
|
||||
lib_min: {
|
||||
src: "src/js/index.js",
|
||||
dest: "build/ripple-<%= pkg.version %>-min.js",
|
||||
libary: "ripple", // misspelling fixed in later versions of webpack
|
||||
library: "ripple",
|
||||
output: {
|
||||
filename: "build/ripple-<%= pkg.version %>-min.js"
|
||||
},
|
||||
optimize: {
|
||||
minimize: true
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
sjcl: {
|
||||
files: ['<config:concat.sjcl.src>'],
|
||||
files: ['<%= concat.sjcl.src %>'],
|
||||
tasks: 'concat:sjcl'
|
||||
},
|
||||
lib: {
|
||||
files: 'src/js/*.js',
|
||||
tasks: 'webpack'
|
||||
}
|
||||
},
|
||||
dox: {
|
||||
libdocs: {
|
||||
options: {
|
||||
title: "Test"
|
||||
},
|
||||
src: ['src/js/'],
|
||||
dest: 'build/docs'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Tasks
|
||||
grunt.registerTask('default', 'concat:sjcl webpack');
|
||||
grunt.registerTask('default', ['concat:sjcl', 'webpack']);
|
||||
|
||||
};
|
||||
18
package.json
18
package.json
@@ -2,7 +2,6 @@
|
||||
"name": "ripple-lib",
|
||||
"version": "0.7.11",
|
||||
"description": "Ripple JavaScript client library",
|
||||
|
||||
"files": [
|
||||
"src/js/*.js",
|
||||
"build/sjcl.js",
|
||||
@@ -12,7 +11,6 @@
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"async": "~0.1.22",
|
||||
"ws": "~0.4.22",
|
||||
@@ -20,19 +18,19 @@
|
||||
"simple-jsonrpc": "~0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "~0.3.17",
|
||||
"buster": "~0.6.2",
|
||||
"grunt-webpack": "~0.4.0"
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-contrib-concat": "~0.3.0",
|
||||
"grunt-contrib-watch": "~0.4.0",
|
||||
"grunt-webpack": "~0.10.2",
|
||||
"grunt-dox": "~0.4.1",
|
||||
"buster": "~0.6.2"
|
||||
},
|
||||
|
||||
"scripts": {
|
||||
"test": "buster test"
|
||||
"test": "node_modules/buster/bin/buster test"
|
||||
},
|
||||
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/jedmccaleb/NewCoin.git"
|
||||
"url": "git://github.com/rippleFoundation/ripple-lib.git"
|
||||
},
|
||||
|
||||
"readmeFilename": "README.md"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user