Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gesundkrank committed Mar 6, 2014
0 parents commit 69d9593
Show file tree
Hide file tree
Showing 16 changed files with 776 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "bower_components"
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules/
/bower_components/
dist
21 changes: 21 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true
}
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: node_js
node_js:
- '0.10'
- '0.8'
32 changes: 32 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Contributing

## Important notes
Please don't edit files in the `dist` subdirectory as they are generated via Grunt. You'll find source code in the `src` subdirectory!

### Code style
Regarding code style like indentation and whitespace, **follow the conventions you see used in the source already.**

### PhantomJS
While Grunt can run the included unit tests via [PhantomJS](http://phantomjs.org/), this shouldn't be considered a substitute for the real thing. Please be sure to test the `test/*.html` unit test file(s) in _actual_ browsers.

## Modifying the code
First, ensure that you have the latest [Node.js](http://nodejs.org/) and [npm](http://npmjs.org/) installed.

Test that Grunt's CLI and Bower are installed by running `grunt --version` and `bower --version`. If the commands aren't found, run `npm install -g grunt-cli bower`. For more information about installing the tools, see the [getting started with Grunt guide](http://gruntjs.com/getting-started) or [bower.io](http://bower.io/) respectively.

1. Fork and clone the repo.
1. Run `npm install` to install all build dependencies (including Grunt).
1. Run `bower install` to install the front-end dependencies.
1. Run `grunt` to grunt this project.

Assuming that you don't see any red, you're ready to go. Just be sure to run `grunt` after making any changes, to ensure that nothing is broken.

## Submitting pull requests

1. Create a new branch, please don't work in your `master` branch directly.
1. Add failing tests for the change you want to make. Run `grunt` to see the tests fail.
1. Fix stuff.
1. Run `grunt` to see if the tests pass. Repeat steps 2-4 until done.
1. Open `test/*.html` unit test file(s) in actual browser to ensure tests pass everywhere.
1. Update the documentation to reflect any changes.
1. Push to your fork and submit a pull request.
99 changes: 99 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
'use strict';

module.exports = function (grunt) {
// Load all grunt tasks
require('load-grunt-tasks')(grunt);
// Show elapsed time at the end
require('time-grunt')(grunt);

// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
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 MIT */\n',
// Task configuration.
clean: {
files: ['dist']
},
concat: {
options: {
banner: '<%= banner %>',
stripBanners: true
},
dist: {
src: ['src/<%= pkg.name %>.js'],
dest: 'dist/jquery.<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: '<%= banner %>'
},
dist: {
src: '<%= concat.dist.dest %>',
dest: 'dist/jquery.<%= pkg.name %>.min.js'
}
},
qunit: {
all: {
options: {
urls: ['http://localhost:9000/test/<%= pkg.name %>.html']
}
}
},
jshint: {
options: {
reporter: require('jshint-stylish')
},
gruntfile: {
options: {
jshintrc: '.jshintrc'
},
src: 'Gruntfile.js'
},
src: {
options: {
jshintrc: 'src/.jshintrc'
},
src: ['src/**/*.js']
},
test: {
options: {
jshintrc: 'test/.jshintrc'
},
src: ['test/**/*.js']
}
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
src: {
files: '<%= jshint.src.src %>',
tasks: ['jshint:src', 'qunit']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'qunit']
}
},
connect: {
server: {
options: {
hostname: '*',
port: 9000
}
}
}
});

// Default task.
grunt.registerTask('default', ['jshint', 'connect', 'qunit', 'clean', 'concat', 'uglify']);
grunt.registerTask('server', ['connect', 'watch']);
grunt.registerTask('test', ['jshint', 'connect', 'qunit']);
};
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Picapica visualization

Visualization of a text and its text reuse sources.

## Getting Started

Download the [production version][min] or the [development version][max].

[min]: comming soon
[max]: comming soon

In your web page:

```html
<script src="jquery.js"></script>
<script src="dist/jquery.picaviz.min.js"></script>
<script>
jQuery(function($) {
$('.container').picaviz(model, options);
});
</script>
```

## Documentation

### Model
The model has to look like this:

```Javascript

[
{
active: true|false,
source:{
id: String,
title: String,
start: Number,
end: Number
}
text{
start: Number,
end: Number
}
},
...
]

```

## Examples
_(Coming soon)_

## Release History
_(Nothing yet)_
12 changes: 12 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "picaviz",
"version": "0.1.0",
"dependencies": {
"jquery": "~2.1.0",
"d3": "~3.4.3"
},
"devDependencies": {
"qunit": "~1.12.0",
"jquery": "~2.1.0"
}
}
36 changes: 36 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "picaviz",
"version": "0.1.0",
"description": "Picapica visualization",
"keywords": [
"jquery-plugin"
],
"homepage": "https://github.com/gesundkrank/picaviz",
"author": {
"name": "Jan Graßegger",
"email": "[email protected]",
"url": "https://github.com/gesundkrank"
},
"repository": {
"type": "git",
"url": "https://github.com/gesundkrank/picaviz.git"
},
"licenses": [
{
"type": "MIT"
}
],
"devDependencies": {
"grunt-contrib-jshint": "~0.7.2",
"grunt-contrib-qunit": "~0.3.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.2.7",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-connect": "~0.5.0",
"time-grunt": "~0.2.3",
"load-grunt-tasks": "~0.2.0",
"jshint-stylish": "~0.1.3",
"grunt": "~0.4.2"
}
}
28 changes: 28 additions & 0 deletions picaviz.jquery.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "picaviz",
"title": "Picapica visualization",
"description": "Visualization of a text and its text reuse sources.",
"version": "0.1.0",
"homepage": "?",
"author": {
"name": "Jan Graßegger",
"url": "https://github.com/gesundkrank"
},
"repository": {
"type": "git",
"url": "https://github.com/gesundkrank/picaviz.git"
},
"bugs": "",
"licenses": [
{
"type": "MIT",
"url": "http://opensource.org/licenses/MIT"
}
],
"dependencies": {
"jquery": "~0.1.0"
},
"keywords": [
"jquery-plugin"
]
}
15 changes: 15 additions & 0 deletions src/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"unused": true,
"boss": true,
"eqnull": true,
"browser": true,
"predef": ["jQuery"]
}
Loading

0 comments on commit 69d9593

Please sign in to comment.