Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/tgdwyer/WebCola
Browse files Browse the repository at this point in the history
Conflicts:
	WebCola/examples/unix.html
  • Loading branch information
tgdwyer committed Apr 7, 2014
2 parents 57e4131 + 0de20d4 commit 7072224
Show file tree
Hide file tree
Showing 19 changed files with 4,801 additions and 1,139 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
WebCola/compiledtypescript.js
WebCola/doc
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: node_js
node_js:
- "0.10"
before_script:
- "npm install -g grunt-cli"
154 changes: 98 additions & 56 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,102 @@
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-typescript');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-yuidoc');

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
typescript: {
base: {
src: ['WebCola/src/*.ts'],
dest: 'WebCola/compiledtypescript.js',
options: {
module: 'amd',
target: 'es5',
sourcemap: false
}
}
},
concat: {
options: {},
dist: {
src: ['WebCola/compiledtypescript.js', 'WebCola/src/d3adaptor.js', 'WebCola/src/rbtree.js', 'WebCola/src/scc.js','WebCola/src/handle_disconnected.js'],
dest: 'WebCola/cola.v1.min.js'
}
},
uglify: {
dist: {
options: {
//sourceMap: 'WebCola/cola.min.map',
//sourceMapIn: 'WebCola/compiledtypescript.js.map',
//sourceMapRoot: 'WebCola'
},
files: {
'WebCola/cola.v1.min.js': ['WebCola/compiledtypescript.js', 'WebCola/src/d3adaptor.js', 'WebCola/src/rbtree.js', 'WebCola/src/scc.js','WebCola/src/handle_disconnected.js']
}
}
},
qunit: {
all: ['WebCola/test/*.html']
require('load-grunt-tasks')(grunt);
require('./tasks/examples')(grunt);

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
default: {
files: ["<%= concat.dist.src %>", "Gruntfile.js", "templates/*"],
tasks: ["default"]
},
typescript: {
files: ["<%= typescript.base.src %>"],
tasks: ["typescript"]
},
test: {
files: ["WebCola/test/*.js"],
tasks: ["qunit"]
}
},
typescript: {
base: {
src: ['WebCola/src/*.ts'],
dest: 'WebCola/compiledtypescript.js',
options: {
module: 'amd',
target: 'es5',
sourcemap: false
}
},
examples: {
src: ['WebCola/examples/*.ts'],
options: {
module: 'amd',
target: 'es5',
sourcemap: false
}
}
},
concat: {
options: {},
dist: {
src: [
'WebCola/compiledtypescript.js',
'WebCola/src/d3adaptor.js',
'WebCola/src/rbtree.js',
'WebCola/src/scc.js',
'WebCola/src/handle_disconnected.js'
],
dest: 'WebCola/cola.v1.min.js'
}
},
umd: {
all: {
src: '<%= concat.dist.dest %>',
template: 'templates/umd.hbs',
objectToExport: 'cola',
deps: {
'default': ['d3']
}
}
},
uglify: {
dist: {
options: {
//sourceMap: 'WebCola/cola.min.map',
//sourceMapIn: 'WebCola/compiledtypescript.js.map',
//sourceMapRoot: 'WebCola'
},
yuidoc: {
compile: {
name: 'cola.js',
description: 'Javascript constraint based layout for high-quality graph visualization and exploration using D3.js and other web-based graphics libraries.',
version: '1',
url: 'http://marvl.infotech.monash.edu/webcola',
options: {
paths: 'WebCola/src',
outdir: 'WebCola/doc'
}
}
files: {
'WebCola/cola.v1.min.js': [
'<%= concat.dist.dest %>'
]
}
}
},
qunit: {
all: ['WebCola/test/*.html']
},
examples: {
all: ["WebCola/examples/*.html"]
},
yuidoc: {
compile: {
name: 'cola.js',
description: 'Javascript constraint based layout for high-quality graph visualization and exploration using D3.js and other web-based graphics libraries.',
version: '1',
url: 'http://marvl.infotech.monash.edu/webcola',
options: {
paths: 'WebCola/src',
outdir: 'WebCola/doc'
}
});
}
}
});

grunt.registerTask('default', ['typescript', 'uglify', 'qunit', 'yuidoc']);
grunt.registerTask('nougly', ['typescript', 'concat', 'qunit']);
grunt.registerTask('nougly-notest', ['typescript', 'concat']);
}
grunt.registerTask('default', ['typescript:base', 'concat', 'umd', 'uglify', 'qunit']);
grunt.registerTask('nougly', ['typescript:base', 'concat', 'umd', 'qunit']);
grunt.registerTask('nougly-notest', ['typescript', 'concat']);
grunt.registerTask('docs', ['yuidoc', 'typescript:examples']);
grunt.registerTask('full', ['default', 'typescript:examples', 'examples']);
};
Loading

0 comments on commit 7072224

Please sign in to comment.