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

Add gitlabCi

parent bd002fcf
Pipeline #37003475 failed with stages
in 4 minutes and 11 seconds
image: node
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 examples/dist/bundle.js public/
- cp examples/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"
"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