Commit b65ac43e authored by Daniel Król's avatar Daniel Król

Merge branch 'gitlab'

parents bd002fcf cca0cba7
Pipeline #37004026 passed with stages
in 3 minutes and 57 seconds
image: node
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
before_script:
- npm -q install
compile:
stage: build
script:
- npm run -q compile
- npm run -q compile:examples
check:
stage: test
script:
- npm run -q lint
pages:
stage: deploy
script:
- mkdir public
- npm run -q compile:examples
- cp example/dist/bundle.js public/
- cp example/public/index.html public/
- "echo -e \"DATE: $(date '+%Y-%m-%d %H:%M:%S')\\nREF: $(git rev-parse --verify HEAD)\" > public/dist.info.txt"
artifacts:
paths:
- public
only:
- master
import * as d3 from "d3";
import {Delaunay} from "d3-delaunay";
import {kmeans} from "../";
import { Cluster } from "./../src/kmeans";
import {Cluster, kmeans} from "../";
const colors = ["blue", "green", "yellow", "cyan", "magenta", "brown", "grey"];
let data: any = {};
......
......@@ -28,10 +28,14 @@ const config = {
},
entry: {
// Set index.tsx as application entry point.
bundle: "./example/index.ts"
bundle: path.join(__dirname, "./index.ts")
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "bundle.js"
},
devServer: {
contentBase: path.join(__dirname, "example")
contentBase: path.join(__dirname, "public")
},
plugins: [
new webpack.DefinePlugin({
......
......@@ -13,12 +13,13 @@
],
"scripts": {
"compile": "tsc -d",
"compile:examples": "webpack --config example/webpack.config.ts",
"prepublishOnly": "npm run lint && tsc -d",
"lint": "tslint -t verbose index.ts src/* src/**/*",
"test": "mocha tests/*.test.ts tests/**/*.test.ts --opts ./mocha.opts",
"test:coverage": "nyc mocha tests/*.test.ts tests/**/*.test.ts --opts ./mocha.opts",
"test:coverage:html": "nyc --reporter=html mocha tests/*.test.ts tests/**/*.test.ts --opts ./mocha.opts && open .coverage/index.html",
"example": "webpack-dev-server --open"
"lint": "tslint -t verbose index.ts src/**.ts example/**.ts",
"test": "mocha tests/**.test.ts --opts ./mocha.opts",
"test:coverage": "nyc mocha tests/**.test.ts --opts ./mocha.opts",
"test:coverage:html": "nyc --reporter=html mocha tests/**.test.ts --opts ./mocha.opts && open .coverage/index.html",
"example": "webpack-dev-server --config example/webpack.config.ts --open"
},
"author": "Daniel Król",
"license": "MIT",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment