mirror of
https://github.com/status-im/burnchart.git
synced 2025-01-19 07:03:27 +00:00
initial coffee skeleton
This commit is contained in:
commit
45ca2e0a59
39
Cakefile
Normal file
39
Cakefile
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
fs = require "fs" # I/O
|
||||||
|
cs = require 'coffee-script' # take a guess
|
||||||
|
yaml = require 'js-yaml' # YAML to JS
|
||||||
|
|
||||||
|
# ANSI Terminal colors.
|
||||||
|
COLORS =
|
||||||
|
BOLD: '\u001b[0;1m'
|
||||||
|
RED: '\u001b[0;31m'
|
||||||
|
GREEN: '\u001b[0;32m'
|
||||||
|
BLUE: '\u001b[0;34m'
|
||||||
|
YELLOW: '\u001b[0;33m'
|
||||||
|
DEFAULT: '\u001b[0m'
|
||||||
|
|
||||||
|
# --------------------------------------------
|
||||||
|
|
||||||
|
# Compile.
|
||||||
|
task "compile", "compile .coffee to .js", (options) ->
|
||||||
|
|
||||||
|
console.log "#{COLORS.BOLD}Compiling#{COLORS.DEFAULT}"
|
||||||
|
|
||||||
|
fs.readFile "paths.yml", "utf8", (err, data) ->
|
||||||
|
if err
|
||||||
|
console.log "#{COLORS.RED}#{err}#{COLORS.DEFAULT}" ; return
|
||||||
|
try
|
||||||
|
#paths = JSON.stringify yaml.load data
|
||||||
|
js = cs.compile fs.readFileSync('burndown.coffee', "utf-8"), bare: "on"
|
||||||
|
write 'js/burndown.js', "(function() {\n#{js}\n}).call(this);"
|
||||||
|
|
||||||
|
# We are done.
|
||||||
|
console.log "#{COLORS.GREEN}Done#{COLORS.DEFAULT}"
|
||||||
|
|
||||||
|
catch err
|
||||||
|
console.log "#{COLORS.RED}#{err}#{COLORS.DEFAULT}" ; return
|
||||||
|
|
||||||
|
# Append to existing file.
|
||||||
|
write = (path, text, mode = "w") ->
|
||||||
|
fs.open path, mode, 0o0666, (e, id) ->
|
||||||
|
if e then throw new Error(e)
|
||||||
|
fs.write id, text, null, "utf8"
|
4
README.md
Normal file
4
README.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
InterMine Github Issues Burn down chart
|
||||||
|
|
||||||
|
## Why?
|
||||||
|
* To measure how well we estimate the effort required to tackle tasks
|
1
burndown.coffee
Normal file
1
burndown.coffee
Normal file
@ -0,0 +1 @@
|
|||||||
|
console.log "loader in da house!"
|
9
package.json
Normal file
9
package.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"name": "github-burndown-chart"
|
||||||
|
, "version": "0.0.0"
|
||||||
|
, "private": true
|
||||||
|
, "dependencies": {
|
||||||
|
"coffee-script": "latest"
|
||||||
|
, "js-yaml": "latest"
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user