diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000000000..28d2d0a14 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,51 @@ +module.exports = function(grunt) { + + //Load NPM tasks + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-mocha-test'); + grunt.loadNpmTasks('grunt-markdown'); + grunt.loadNpmTasks('grunt-shell'); + + // Project Configuration + grunt.initConfig({ + shell: { + browserify: { + options: { + stdout: true, + stderr: true + }, + command: grunt.option('target') === 'dev' ? + 'node ./util/build.js -d ' : 'node ./util/build.js ' + } + }, + watch: { + readme: { + files: ['README.md'], + tasks: ['markdown'] + }, + scripts: { + files: ['**/*.js', '**/*.html', '!**/node_modules/**', '!browser/bundle.js', '!browser/testdata.js', '!lib/**js', '!browser/vendor-bundle.js'], + tasks: ['shell'], + }, + }, + mochaTest: { + options: { + reporter: 'spec', + }, + src: ['test/*.js'], + }, + markdown: { + all: { + files: [{ + expand: true, + src: 'README.md', + dest: '.', + ext: '.html' + }] + } + } + }); + + grunt.registerTask('default', ['shell','watch']); + +}; diff --git a/concat.sh b/concat.sh new file mode 100755 index 000000000..f747c6684 --- /dev/null +++ b/concat.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +cd vendor/ +cat browser-adapter.js crypto-2.0.js crypto-3.1.js jsbn.js jsbn2.js prng4.js util.js rng.js ec.js sec.js ecdsa.js eckey.js > vendor-bundle.js +mv vendor-bundle.js ../ +cd ../ + diff --git a/copay.js b/copay.js new file mode 100644 index 000000000..5b2a2951c --- /dev/null +++ b/copay.js @@ -0,0 +1,5 @@ + +module.exports.Storage = require('./js/models/Storage'); +module.exports.PublicKeyRing = require('./js/models/PublicKeyRing'); +module.exports.CopayPeer = require('./js/models/CopayPeer'); +module.exports.FakeStorage = require('./test/FakeStorage'); diff --git a/index.html b/index.html index 534d427a2..b5942f087 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,8 @@
-{{$root.peerId}}
+ +