Skip to content

Commit

Permalink
Initial project setup
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Nov 11, 2016
0 parents commit 79164cd
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Nikita Savchenko, [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# iKnow Entity Browser

A visualizer of iKnow entities.

Development
-----------

Requires [Node.JS](https://nodejs.org) (v0.10.0-6.2.2+),
[Git](https://git-scm.com) and
[Caché](http://www.intersystems.com/library/software-downloads/) 2017.1+
to be installed.

To install & test, open up a terminal and execute the following set of commands:

```sh
git clone https://github.com/intersystems-ru/iknow-entity-browser
cd iknow-entity-browser
npm install
gulp
```

Then, open `build/static/index.html` file.
53 changes: 53 additions & 0 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import gulp from "gulp";
import rimraf from "gulp-rimraf";
import preprocess from "gulp-preprocess";
import cssMin from "gulp-cssmin";
import browserify from "browserify";
import to5ify from "6to5ify";
import streamify from "gulp-streamify";
import source from "vinyl-source-stream";
import scss from "gulp-sass";
import pkg from "./package.json";

const
SOURCE_DIR = `${ __dirname }/src`,
BUILD_DIR = `${ __dirname }/build`,
context = {
package: pkg
};

gulp.task("clean", () => {
return gulp.src(BUILD_DIR, { read: false })
.pipe(rimraf());
});

gulp.task("cls", ["clean"], () => {
return gulp.src(SOURCE_DIR + "/cls/**/*.cls")
.pipe(preprocess({ context: context }))
.pipe(gulp.dest(BUILD_DIR + "/cls"));
});

gulp.task("html", ["clean"], () => {
return gulp.src(SOURCE_DIR + "/static/**/*.html")
.pipe(preprocess({ context: context }))
.pipe(gulp.dest(BUILD_DIR + "/static"));
});

gulp.task("js", ["clean"], () => {
return browserify(`${ SOURCE_DIR }/static/js/index.js`, { debug: true })
.transform(to5ify)
.bundle()
.on(`error`, (err) => { console.error(err); })
.pipe(source("index.js"))
.pipe(streamify(preprocess({ context: context })))
.pipe(gulp.dest(`${ BUILD_DIR }/static/js`));
});

gulp.task("css", ["clean"], () => {
return gulp.src(`${ SOURCE_DIR }/static/scss/index.scss`)
.pipe(scss().on("error", scss.logError))
.pipe(cssMin())
.pipe(gulp.dest(`${ BUILD_DIR }/static/css`));
});

gulp.task("default", ["cls", "html", "js", "css"]);
30 changes: 30 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "iknow-entity-browser",
"version": "0.0.1",
"description": "Visualizer for iKnow entities",
"main": "gulpfile.babel.js",
"scripts": {
"gulp": "gulp",
"build": "npm run gulp"
},
"repository": {
"type": "git",
"url": "https://github.com/intersystems-ru/iknow-entity-browser"
},
"author": "ZitRo",
"license": "MIT",
"devDependencies": {
"6to5ify": "^4.1.1",
"babel": "^6.5.2",
"babel-core": "^6.18.2",
"babel-preset-es2015": "^6.18.0",
"browserify": "^13.1.1",
"gulp": "^3.9.1",
"gulp-cssmin": "^0.1.7",
"gulp-preprocess": "^2.0.0",
"gulp-rimraf": "^0.2.0",
"gulp-sass": "^2.3.2",
"gulp-streamify": "^1.0.2",
"vinyl-source-stream": "^1.1.0"
}
}
13 changes: 13 additions & 0 deletions src/static/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>iKnow Entity Browser</title>
<meta name="author" content="ZitRo">
<link rel="stylesheet" href="css/index.css"/>
<script type="text/javascript" src="js/index.js" async></script>
</head>
<body>
<div class="version">v<!-- @echo package.version --></div>
</body>
</html>
8 changes: 8 additions & 0 deletions src/static/js/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
if (document.readyState !== "loading")
init();
else
document.addEventListener(`DOMContentLoaded`, init, false);

function init () {

}
4 changes: 4 additions & 0 deletions src/static/scss/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
html, body {
margin: 0;
padding: 0;
}

0 comments on commit 79164cd

Please sign in to comment.