Skip to content

Commit

Permalink
Add grunt build
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxLaumeister committed Jun 7, 2015
1 parent 1f6f08f commit 1eb223c
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 106 deletions.
14 changes: 9 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Closure Compiler #
####################

compiler.jar

# OS generated files #
######################

.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Grunt #
#########

node_modules
.npm-debug.log
tmp

66 changes: 66 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
module.exports = function(grunt) {

"use strict";

var srcFiles = ['src/*.js'];
var libFiles = ['lib/*.js'];
var destFile = 'dist/bitlisten.min.js';

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
all: {
options: {
base: 'dist',
port: 8000,
keepalive: true
}
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> Copyright (c) <%= grunt.template.today("yyyy") %> Maximillian Laumeister, see README.md for license info. */\n',
sourceMap: true,
sourceMapIncludeSources: true
},
build: {
src: libFiles.concat(srcFiles),
dest: destFile
}
},
jshint: {
all: {
src: srcFiles.concat(['Gruntfile.js'])
}
},
todos: {
all: {
options: {
verbose: false
},
src: srcFiles
}
},
watch: {
all: {
files: srcFiles.concat(['Gruntfile.js']),
tasks: ['newer:jshint:all', 'uglify', 'connect'],
options: {
interrupt: true,
atBegin: true
}
}
}
});

grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-newer');
grunt.loadNpmTasks('grunt-todos');
grunt.loadNpmTasks('grunt-contrib-watch');

grunt.registerTask('default', ['jshint', 'uglify']);
};

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ Realtime Bitcoin transaction visualizer written in HTML/Javascript. See and hear

### Building ###

The project is built and ready-to-go in the dist folder. If you change any of the javascript, you will need to re-build the `dist/bitlisten.min.js` file:
The project is built and ready-to-go in the dist folder. If you change any of the javascript, you will need to re-build the `dist/bitlisten.min.js` file using Grunt. If you haven't used Grunt before, here is a short tutorial:

1. Download the [latest Google Closure Compiler](http://dl.google.com/closure-compiler/compiler-latest.zip) and copy `compiler.jar` into the root project folder.
2. Run make.bat (Windows) or make.sh (Mac/Linux) to invoke closure compiler with the necessary arguments.
1.

The compiled/minified script will be output to `dist/bitlisten.min.js`.

Expand Down
91 changes: 5 additions & 86 deletions dist/bitlisten.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/bitlisten.min.js.map

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions make.bat

This file was deleted.

7 changes: 0 additions & 7 deletions make.sh

This file was deleted.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "BitListen",
"author": "Maximillian Laumeister",
"version": "1.0.0"
}
15 changes: 15 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
User-agent: *
Disallow: /keybase.txt # Because why spam google results with this?

# You're not a robot, so enjoy some art!
#
# ░░░░░░░░░░░░░░░░░░░░
# ░░░░░░▄▀▀▄▀▀▄░░░░░░░
# ░░░░░█▒▄░▄░░▒█▄▄▄░░░
# ░░░▄▄█░▀░▀░░░█▄▓▓█░░
# ░▄▀▒▒▒▀▄▀▄▄▄▀▒▒▀█▓▄░
# ▄▀▀▒▀▒▒▒▒▒░░░▒▒▒█▓▓█
# █▒▒▒▒▒▒▒▒▄░░░░▒▒██▀░
# ▀▄▒▒▒▒▒▒▒█▀░░▒▄█▄▀░░
# ░░▀▀▄▄▄▄█▄░░▒▒▀▄█▄▄░

0 comments on commit 1eb223c

Please sign in to comment.