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

Commit

Permalink
Merge pull request #108 from phovea/release_0.1.0
Browse files Browse the repository at this point in the history
Release 0.1.0
  • Loading branch information
Samuel Gratzl authored Apr 5, 2017
2 parents 05f40f3 + 8c42d3e commit 7eed49a
Show file tree
Hide file tree
Showing 146 changed files with 14,288 additions and 11,213 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
# build config
*.npmignore text
*.bowerrc text
Dockerfile text eof=LF

# Heroku
Procfile text
Expand Down Expand Up @@ -123,4 +124,4 @@ AUTHORS text
# Note: .db, .p, and .pkl files are associated
# with the python modules ``pickle``, ``dbm.*``,
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
# (among others).
# (among others).
35 changes: 20 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
language: node_js

node_js:
- 6

addons:
firefox: 49.0.1
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi

addons:
firefox: 49.0.1
script: npm run dist

deploy:
provider: releases
api_key:
secure: TK9/P34Bi3WuppiDrBCwVcn41yCBwmILaU8hXTBzUPbT7TbeFIwsC6/4CtH85Z+ZrUve4S5pTmWRNf2dQDxWw3uYu7+bJuemV2J1LHG76mognj+TNEiYxfLQUt3Gql4W7C7FcI4Rlx5/uMN9wY1wro8TWUBMwT6jjSrUWIvK3GXoojd5bHvJx07XpjWl9wCon4D0ruZiFoM2mdeP23lbc2GckETi32oEKswnQXxkMACmxbPzoWbvkxH4aK8Bt2Rj2sl2TbPhVkN6DAkHGkGAvLI+2/aRfG27+oo3OKsaDjbuGABct8TfZccJ970CbQ8kbnCjYxstvqkg1JWjF0W67sX/flBZZOEUA5l0OLWo6HqMGMxm7/lEQhIdPMsRmvXL+HVOxkMrB2dda58QzxVwiZp+rRqUaeabPZp8Kl5xodGrV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FQfxLpfWVOvENJArfIMKgR1r7sFA7SaY+GYBh318451od6qG5OnSowW6NicBmjuaBT7BqPHnbLNSLZfM/mQchkMv0USndeM5kERVdkXaeS3MggeBrChWnCkcr4BIyXQ0SKAunSj0ykIKi1/XaKFHtCrYaY3gtFUVVYCB4F2HPltUmVgfaZwiIE0rz4mBL1SdWIglyEcXVqDlfVPO6HoogjU2yzNbt3aIotX/Qlff6OFgETmtnIWRhZyLk7Y/w0X3QeBF3n0mQvFPURlXW7s8swVN2d3+e0n5xESyloFlSlMHXDknV2bjt74iD22bRhmCSU+iNSgbjwHqmWr/bhh+f1f2tzLd1tJ7JYwNMcz48qbv6Dv6hjKid5C4H51sEmxZANVbBXLF5SDzRN8tpkked+RRMuX3ZWpVu2xKiSa85hFMl910GD7eHLTEuBaWGTvL6jaQs47YBwRLOS1NX1ogLGaaReWV5oqwhcrmm/EMn099aAW5+hV48feC/7v6QTezR6QOr+4BvoysPc5zi9pONXZ2XMHyCKgtlNZ1toKcPvinJ/z5fDh61j0ieZaC9FD4t1BjiB1t77odJa3PTjt5yZcFDw=
on_success: change
on_failure: always
deploy:
- provider: releases
api_key:
secure: d/OUmDw5A77qY9mZVwWPew9oJM29eKFISUwjbU7dk0ev8vF1YUaSuZAqUKUdnaSYEQt+uTw1wBn2KGPW7VyFxuU0yWn17KJC+QFyLFHDVN2+7l2/KDKH/H15cePubcw1YPVg1z3GlSWZW+/vQF417QWphj/Tr6NnEzxXxLf3zu79FCOwhap/tc8f4FOTx4bFe6QhgpTn4VMo0EUWVi5VB2V83w2QfxzvFay6DGoGXFoPGeMUlPdasHDTKfEHzDoOYbtMCalNDhtX9Rg6MPINmd912L5BgrQ/01MfDz79eU4Q2w71NIUCgJz4llcKZZVRBOgkcev+lI2pBamZ2TS2IKVaeUZ5IIP9GylegSGw1cHTV2noL8ALJ3DfJuocGfqJINLu6oGlVfhfywk4FSaB51D2s5fdQLgy+9/wARypyZcHwk8w6djtHztiiWpqFn04CazRUsVUADujsbZYPLyH+cuv3gTXqkETpYRl558zakNAWvPBfqmVpOFyzVE6W4b00qQgCIDorcLVixoJrtE8w+MmMrFrJd1LkverXulgWYOqmdgChJjCPu2QTuXrTsvshpeWmpG0p0ZGX4qxLVV6ckQnQ08JlejhbUWndFfoODTE4S8pOzkMrnPhWud5RMiqFPGtfds8nktb6MTeAIn2fclUerooRWN0p/DvjBiQKB4=
file: dist/phovea_core.tar.gz
on:
tags: true
repo: phovea/phovea_core
- provider: npm
email: samuel.gratzl@jku.at
api_key:
secure: HImMnVxZ/Et1hxggv/IfFW2c2sQyYiBabjafJFyBGFGeenavisdXut5RwtGoIuQoQ20rV8w7U/jBHv7shsVgTvzM3em0nZrKr6ibw5GCMKqM9tQtHc113aN+m/5w3dc1MJGMyZdYPpKVaVNoaS2zzDhgD3u+vpalFW3KkcqZ7SHBOQv1P5K94JFehx5mWI5RCpuur5hu1x4RLpD5g2mQvwcsE99jxy2q4tfzyfsXCFSPwv/HuUq44QGU9pk78CL9nX1X0FB0Spt1nI/+GGUzof7+mVSxSrjTc9Qn19Z7aEM4sksCOEJm2JYtuoRkJ4t3ysgfYeN5JYz6Jnzuv3W/zsNvXhtT8MECJUWbZNxAkzShrVxKI6yrZ8gOnTtempj8T3iU9DSo7IOEL88Clg6r0rRHXikxkhmALwDhWxWPsN9zX1vHsxW9vRZQRucizskCF1mILswX30i5FDr7tpPK0xWVKbsvlJYmdw0g9oJKoSppIEa2EyKcJEt71oUi0n9A7mW2wUh4G8oLMaVwKm2kQK0nQPFCn+zooM3uH72XvfhUNxS8RUfg0pTmhox3FnjprjgLyzRQDHCjrgRzbtQnaFSBWEUFhEO+ZoGonOMsC0oJLcLZ6A2r5eXa5/XqqLM2S4soejjoDjursHYlS7p679QrdAJrhz97mTrCVdQhlnk=
on:
tags: true
repo: phovea/phovea_core
2 changes: 1 addition & 1 deletion ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
* Static or animated images showing the UI behavior

### Expected behavior
*
*
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ Testing
-------

```
npm run test:watch
npm test
```

When you save changes, tests will re-run.

Building
--------

Expand All @@ -35,7 +33,7 @@ npm run build
***

<a href="https://caleydo.org"><img src="http://caleydo.org/assets/images/logos/caleydo.svg" align="left" width="200px" hspace="10" vspace="6"></a>
This repository is part of **[Phovea](http://phovea.caleydo.org/)**, a platform for developing web-based visualization applications. For tutorials, API docs, and more information about the build and deployment process, see the [documentation page](http://caleydo.org/documentation/).
This repository is part of **[Phovea](http://phovea.caleydo.org/)**, a platform for developing web-based visualization applications. For tutorials, API docs, and more information about the build and deployment process, see the [documentation page](http://phovea.caleydo.org).


[phovea-image]: https://img.shields.io/badge/Phovea-Client%20Plugin-F47D20.svg
Expand All @@ -44,5 +42,5 @@ This repository is part of **[Phovea](http://phovea.caleydo.org/)**, a platform
[npm-url]: https://npmjs.org/package/phovea_core
[travis-image]: https://travis-ci.org/phovea/phovea_core.svg?branch=master
[travis-url]: https://travis-ci.org/phovea/phovea_core
[daviddm-image]: https://david-dm.org/phovea/phovea_core.svg?theme=shields.io
[daviddm-image]: https://david-dm.org/phovea/phovea_core/status.svg
[daviddm-url]: https://david-dm.org/phovea/phovea_core
19 changes: 10 additions & 9 deletions buildInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,29 @@ function cleanupDependency(d) {
return d;
}

function resolveUeber() {
function resolveWorkspace() {
console.log('resolve parent');
const ueberDeps = dependencyGraph('..').dependencies;
const workspaceDeps = dependencyGraph('..').dependencies;
const modules = new Set(resolveModules());

const resolveModule = (m) => {
console.log('resolve', m);
const pkg = require(`../${m}/package.json`);
const head = gitHead('../' + m);
const repo = pkg.repository.url;
return {
name: pkg.name,
version: pkg.version,
resolved: head ? `${pkg.repository.url}#${head}` : pkg.version,
resolved: head ? `${repo.endsWith('.git') ? repo.slice(0, repo.length-4) : repo}/commit/${head}` : pkg.version,
dependencies: deps(pkg.dependencies)
};
};
const deps = (deps) => {
const r = {};
Object.keys(deps).forEach((d) => {
if (d in ueberDeps) {
r[d] = cleanupDependency(ueberDeps[d]);
delete ueberDeps[d];
if (d in workspaceDeps) {
r[d] = cleanupDependency(workspaceDeps[d]);
delete workspaceDeps[d];
} else if (modules.has(d)) {
modules.delete(d);
r[d] = resolveModule(d);
Expand Down Expand Up @@ -117,9 +118,9 @@ function resolveSingle() {

function generate() {
console.log('building buildInfo');
const isUeberContext = fs.existsSync('../phovea_registry.js');
if (isUeberContext) {
return resolveUeber();
const isWorkspaceContext = fs.existsSync('../phovea_registry.js');
if (isWorkspaceContext) {
return resolveWorkspace();
} else {
return resolveSingle();
}
Expand Down
30 changes: 16 additions & 14 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,32 @@ var INDEX_FILE = './index.ts';
* @returns {number}
*/
function byName(a, b) {
if (a === INDEX_FILE) {
return a === b ? 0 : -1;
}
if (b === INDEX_FILE) {
return 1;
}
return a.toLowerCase().localeCompare(b.toLowerCase());
if (a === INDEX_FILE) {
return a === b ? 0 : -1;
}
if (b === INDEX_FILE) {
return 1;
}
return a.toLowerCase().localeCompare(b.toLowerCase());
}
//list all modules in the src folder excluding the one starting with _
var req = require.context('./src', false, /\/[^_].*\.tsx?$/);
var req = require.context('./src', true, /^\.\/(?!internal)(([^_][\w]+)|(\w+\/index))\.tsx?$/);

var files = req.keys().sort(byName);

//root file exists? else use anonymous root object
if (files[0] === INDEX_FILE) {
module.exports = req(files.shift());
module.exports = req(files.shift());
} else {
module.exports = {};
module.exports = {};
}

//generate getter for all modules
files.forEach(function (f) {
Object.defineProperty(module.exports, f.substring(2, f.length - 3), {
get: function () { return req(f); },
enumerable: true
});
Object.defineProperty(module.exports, f.substring(2, f.lastIndexOf('/index.') > 0 ? f.lastIndexOf('/index.') : f.lastIndexOf('.')), {
get: function () {
return req(f);
},
enumerable: true
});
});
94 changes: 49 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
{
"name": "phovea_core",
"version": "0.1.0",
"homepage": "https://phovea.caleydo.org",
"description": "Phovea Core including plugin registry, data definition (+ common types: tables, matrix, vector, stratification), ajax, selections",
"author": {
"name": "The Caleydo Team",
"email": "contact@caleydo.org",
"url": "https://caleydo.org"
},
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/phovea/phovea_core/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/phovea/phovea_core.git"
},
"engines": {
"npm": ">= 3",
"node": ">= 6",
"iojs": ">= 3"
},
"main": "build/phovea_core.js",
"files": [
"src",
Expand All @@ -7,18 +29,13 @@
"phovea_registry.js",
"build"
],
"engines": {
"npm": ">= 3",
"node": ">= 6",
"iojs": ">= 3"
},
"scripts": {
"compile": "tsc",
"lint": "tslint -c tslint.json src/**.ts tests/**.ts",
"docs": "typedoc --options typedoc.json src/**.ts",
"prebuild": "npm run test",
"prebuild": "node -e \"process.exit(process.env.PHOVEA_SKIP_TESTS === undefined?1:0)\" || npm run test",
"pretest": "npm run compile",
"test": "karma start",
"test": "test ! -d tests || karma start",
"posttest": "npm run lint",
"test:watch": "karma start --autoWatch=true --singleRun=false",
"build:dev": "webpack",
Expand All @@ -29,56 +46,43 @@
"release:major": "npm version major && npm publish && git push --follow-tags",
"release:minor": "npm version minor && npm publish && git push --follow-tags",
"release:patch": "npm version patch && npm publish && git push --follow-tags",
"predist": "npm run build",
"predist": "npm run build && npm run docs",
"dist": "mkdirp dist && cd build && tar cvzf ../dist/phovea_core.tar.gz *"
},
"dependencies": {
"tslib": "1.5.0",
"@types/whatwg-fetch": "0.0.33"
},
"devDependencies": {
"@types/jasmine": "2.5.35",
"awesome-typescript-loader": "2.2.4",
"css-loader": "0.25.0",
"extract-text-webpack-plugin": "2.0.0-beta.4",
"file-loader": "0.9.0",
"@types/jasmine": "2.5.41",
"awesome-typescript-loader": "3.0.3",
"css-loader": "0.26.1",
"extract-text-webpack-plugin": "2.0.0-rc.3",
"file-loader": "0.10.0",
"html-loader": "0.4.4",
"imports-loader": "0.6.5",
"jasmine": "2.5.2",
"imports-loader": "0.7.0",
"jasmine": "2.5.3",
"json-loader": "0.5.4",
"karma": "1.3.0",
"karma": "1.4.0",
"karma-chrome-launcher": "2.0.0",
"karma-firefox-launcher": "1.0.0",
"karma-jasmine": "1.0.2",
"karma-junit-reporter": "1.1.0",
"karma-jasmine": "1.1.0",
"karma-junit-reporter": "2.0.0",
"karma-sourcemap-loader": "0.3.7",
"karma-webpack": "1.8.0",
"karma-webpack": "2.0.2",
"mkdirp": "0.5.1",
"node-sass": "3.10.0",
"node-sass": "4.5.0",
"null-loader": "0.1.1",
"raw-loader": "0.5.1",
"sass-loader": "4.0.2",
"sass-loader": "5.0.0",
"style-loader": "0.13.1",
"tslint": "3.15.1",
"typedoc": "0.5.1",
"typescript": "2.0.6",
"tslib": "1.5.0",
"tslint": "4.4.2",
"typedoc": "0.5.5",
"typescript": "2.2.0",
"url-loader": "0.5.7",
"webpack": "2.1.0-beta.26",
"webpack-dev-server": "2.1.0-beta.10",
"extract-loader": "0.0.2"
},
"dependencies": {},
"name": "phovea_core",
"description": "Phovea Core including plugin registry, data definition (+ common types: tables, matrix, vector, stratification), ajax, selections",
"homepage": "https://phovea.caleydo.org",
"version": "0.0.5",
"author": {
"name": "The Caleydo Team",
"email": "contact@caleydo.org",
"url": "https://caleydo.org"
},
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/phovea/phovea_core/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/phovea/phovea_core.git"
"webpack": "2.2.1",
"webpack-dev-server": "2.3.0",
"extract-loader": "0.1.0"
}
}
14 changes: 9 additions & 5 deletions phovea.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@
//register all extensions in the registry following the given pattern
module.exports = function(registry) {
//registry.push('extension-type', 'extension-id', function() { return System.import('./src/extension_impl'); }, {});
registry.push('datatype', 'matrix', function() { return System.import('./src/matrix_impl'); }, {});
registry.push('datatype', 'matrix', function() { return System.import('./src/matrix/Matrix'); }, {});

registry.push('datatype', 'table', function() { return System.import('./src/table_impl'); }, {});
registry.push('datatype', 'table', function() { return System.import('./src/table/Table'); }, {});

registry.push('datatype', 'vector', function() { return System.import('./src/vector_impl'); }, {});
registry.push('datatype', 'vector', function() { return System.import('./src/vector/Vector'); }, {});

registry.push('datatype', 'stratification', function() { return System.import('./src/stratification_impl'); }, {});
registry.push('datatype', 'stratification', function() { return System.import('./src/stratification/Stratification'); }, {});

registry.push('datatype', 'graph', function() { return System.import('./src/graph'); }, {});
registry.push('datatype', 'graph', function() { return System.import('./src/graph/GraphProxy'); }, {});

registry.push('datatype', 'atom', function() { return System.import('./src/atom/Atom'); }, {});

registry.push('tabSyncer', 'selection', function() { return System.import('./src/sync/SelectionSyncer'); }, {});
};

Loading

0 comments on commit 7eed49a

Please sign in to comment.