Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/0.2.30'
Browse files Browse the repository at this point in the history
  • Loading branch information
justmoon committed Aug 13, 2013
2 parents ad8902a + 851983d commit ab37ac3
Show file tree
Hide file tree
Showing 34 changed files with 1,514 additions and 477 deletions.
125 changes: 111 additions & 14 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
var path = require("path"),
fs = require("fs");

var BannerPlugin = require("webpack/lib/BannerPlugin");

module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-webpack');
grunt.loadNpmTasks('grunt-preprocess');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');

// Ripple client dependencies
var deps = ["deps/js/jquery.js",
Expand Down Expand Up @@ -65,19 +70,35 @@ module.exports = function(grunt) {
return [{dest:dest, src:compile?src:[]}];
};

grunt.registerTask("version", "Describes current git commit", function (prop) {
var done = this.async();

grunt.log.write("Version: ");

grunt.util.spawn({
cmd : "git",
args : [ "describe", "--tags", "--always", "--dirty" ]
}, function (err, result) {
if (err) {
grunt.log.error(err);
return done(false);
}

grunt.config(prop || "meta.version", result.stdout);

grunt.log.writeln(result.stdout.green);

done(result);
});
});

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
},
meta: {},
recess: {
dist: {
src: ['src/less/ripple/desktop.less'],
dest: 'build/css/ripple-desktop.css',
dest: 'build/dist/ripple-desktop.css',
options: {
compile: true
}
Expand Down Expand Up @@ -114,7 +135,10 @@ module.exports = function(grunt) {
"expr" : true,
"asi" : true,
"sub" : true
}
},
plugins: [
new BannerPlugin("Ripple Client v<%= meta.version %>\nCopyright (c) <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>\nLicensed under the <%= pkg.license %> license.")
]
},
desktop: {
output: {
Expand Down Expand Up @@ -173,15 +197,75 @@ module.exports = function(grunt) {
}
}
},
preprocess: {
web: {
src: 'index.html',
dest: 'build/dist/index.html',
options: {
context: {
MODE_RELEASE: true,
TARGET_WEB: true,
VERSION: "<%= meta.version %>"
}
}
},
web_debug: {
src: 'index.html',
dest: 'build/dist/index_debug.html',
options: {
context: {
MODE_DEBUG: true,
TARGET_WEB: true,
VERSION: "<%= meta.version %>"
}
}
}
},
copy: {
web: {
files: [
{expand: true, src: ['build/dist/*.js'], dest: 'build/bundle/web'},
{expand: true, src: ['build/dist/*.css'], dest: 'build/bundle/web'},
{expand: true, src: ['build/dist/*.html'], dest: 'build/bundle/web', flatten: true},
{expand: true, src: ['fonts/*'], dest: 'build/bundle/web'},
{expand: true, src: ['img/*'], dest: 'build/bundle/web'},
{expand: true, src: ['deps/js/modernizr*.js'], dest: 'build/bundle/web'},
{src: 'config-example.js', dest: 'build/bundle/web/config-example.js'}
]
},
nw_linux: {
files: [
{expand: true, src: ['build/dist/*.js'], dest: 'build/bundle/nw-linux'},
{expand: true, src: ['build/dist/*.css'], dest: 'build/bundle/nw-linux'},
{expand: true, src: ['build/dist/*.html'], dest: 'build/bundle/nw-linux', flatten: true},
{expand: true, src: ['fonts/*'], dest: 'build/bundle/nw-linux'},
{expand: true, src: ['img/*'], dest: 'build/bundle/nw-linux'},
{expand: true, src: ['deps/js/modernizr*.js'], dest: 'build/bundle/nw-linux'},
{src: 'res/nw/package_linux.json', dest: 'build/bundle/nw-linux/package.json'},
{src: 'config-example.js', dest: 'build/bundle/nw-linux/config-example.js'}
]
},
nw_linux_debug: {
files: [
{expand: true, src: ['build/dist/*.js'], dest: 'build/bundle/nw-linux-debug'},
{expand: true, src: ['build/dist/*.css'], dest: 'build/bundle/nw-linux-debug'},
{expand: true, src: ['build/dist/*.html'], dest: 'build/bundle/nw-linux-debug', flatten: true},
{expand: true, src: ['fonts/*'], dest: 'build/bundle/nw-linux-debug'},
{expand: true, src: ['img/*'], dest: 'build/bundle/nw-linux-debug'},
{expand: true, src: ['deps/js/modernizr*.js'], dest: 'build/bundle/nw-linux-debug'},
{src: 'res/nw/package_linux_debug.json', dest: 'build/bundle/nw-linux-debug/package.json'},
{src: 'config-example.js', dest: 'build/bundle/nw-linux-debug/config-example.js'}
]
}
},
watch: {
livereload: {
livereload: {
options: {
livereload: true
livereload: true
},
files: ['build/css/**/*.css'],
tasks: []
},

},
scripts_debug: {
files: ['src/js/**/*.js', 'src/jade/**/*.jade'],
tasks: ['webpack:desktop_debug'],
Expand All @@ -195,17 +279,30 @@ module.exports = function(grunt) {
files: 'src/less/**/*.less',
options: {livereload:true},
tasks: 'recess'
},
index: {
files: ['index.html'],
options: {livereload:true},
tasks: ['preprocess']
},
config: {
files: ['config.js'],
options: {livereload:true}
}
}
});

// Tasks
grunt.registerTask('default', ['webpack', 'recess',
grunt.registerTask('default', ['version',
'preprocess',
'webpack', 'recess',
'uglify:deps',
'concat:deps','concat:deps_debug',
'uglify:deps_ie',
'concat:deps_ie', 'concat:deps_ie_debug']);
grunt.registerTask('deps', ['concat:deps', 'min:deps']);
grunt.registerTask('dist', ['default',
'copy:web', 'copy:nw_linux', 'copy:nw_linux_debug']);
};
// Helpers
function escapeRegExpString(str) { return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); }
Expand Down
9 changes: 5 additions & 4 deletions config-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ var Options = {
"trusted" : true,
"websocket_ip" : "s1.ripple.com",
"websocket_port" : 443,
"websocket_ssl" : true
// "websocket_ip" : "127.0.0.1",
// "websocket_port" : 5006,
// "websocket_ssl" : false
"websocket_ssl" : true /**/
/* "websocket_ip" : "127.0.0.1",
"websocket_port" : 5006,
"websocket_ssl" : false /**/
},
blobvault : "https://blobvault.payward.com",

Expand All @@ -26,6 +26,7 @@ var Options = {
bridge: {
out: {
// "bitcoin": "localhost:3000"
// "bitcoin": "https://www.bitstamp.net/ripple/bridge/out/bitcoin/"
}
}
};
Expand Down
76 changes: 45 additions & 31 deletions deps/js/ripple.js

Large diffs are not rendered by default.

32 changes: 23 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@

<!-- CSS -->
<link href="fonts/stylesheet.css" rel="stylesheet">
<link href="build/css/ripple-desktop.css" rel="stylesheet">
<link href="build/dist/ripple-desktop.css" rel="stylesheet">
<!-- ENDS CSS -->

<!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance.
Create your own custom Modernizr build: www.modernizr.com/download/ -->
<script src="deps/js/modernizr-2.5.3.min.js"></script>
<script src="analytics.js"></script>
</head>

<body>
Expand Down Expand Up @@ -66,7 +65,7 @@
<a href="http://ripple.com/terms" target="_blank">Terms of Service</a>.
</span>
<span class="left">
Version: 0.2.27
Version: <!-- @echo VERSION --><!-- @ifdef MODE_DEBUG !>-debug<!-- @endif --><!-- @exclude -->[unprocessed]<!-- @endexclude -->
</span>
<span class="right">
<a href="https://github.com/rippleFoundation/ripple-client/issues?state=open" target="_blank">Bug reports</a>
Expand All @@ -89,16 +88,31 @@
</p>
</div>

<!-- JavaScript at the bottom for fast page loading -->

<!-- scripts concatenated and minified via build script -->
<!-- JAVASCRIPT -->
<!-- @ifdef MODE_RELEASE !>
<script src="build/dist/deps.js"></script>
<!--[if IE]>
<script src="compat/ie/ws/ws-config.js"></script>
<script src="build/dist/deps_ie.js"></script>
-->
<![endif]-->
<!-- @endif -->

<!-- @ifdef MODE_DEBUG -->
<script src="build/dist/deps-debug.js"></script>
<!--[if IE]>
<script src="compat/ie/ws/ws-config.js"></script>
<script src="build/dist/deps_ie-debug.js"></script>
<![endif]-->
<!-- @endif -->

<script src="config.js"></script>
<script src="build/dist/ripple-client-desktop.js?v=0.2.27"></script>
<!-- end scripts -->

<!-- @ifdef MODE_RELEASE !>
<script src="build/dist/ripple-client-desktop.js?v=0.2.25"></script>
<!-- @endif -->
<!-- @ifdef MODE_DEBUG -->
<script src="build/dist/ripple-client-desktop-debug.js"></script>
<!-- @endif -->
<!-- ENDS JAVASCRIPT -->
</body>
</html>
96 changes: 0 additions & 96 deletions index_debug.html

This file was deleted.

14 changes: 12 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"name": "ripple-client",
"version": "0.2.27",
"version": "0.2.30",
"description": "Client for the Ripple payment network",
"author": {
"name": "OpenCoin, Inc.",
"email": "info@ripple.com",
"url": "https://ripple.com/"
},
"dependencies": {
"async": "~0.2.9",
"extend": "~1.1.3",
Expand All @@ -13,8 +18,13 @@
"grunt-contrib-watch": "~0.4.4",
"jade-loader": "~0.5.1",
"jshint-loader": "~0.5.0",
"webpack": "~0.10.0-beta24"
"webpack": "~0.10.0-beta24",
"grunt-contrib-copy": "~0.4.1",
"grunt-preprocess": "https://github.com/justmoon/grunt-preprocess/tarball/defhidden",
"jade": "~0.34.1",
"jsdom": "~0.8.2"
},
"license": "ISC",
"scripts": {},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit ab37ac3

Please sign in to comment.