diff --git a/Procfile b/Procfile new file mode 100644 index 0000000000..ca9e686335 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: node api/build/app.js \ No newline at end of file diff --git a/api/Procfile b/api/Procfile deleted file mode 100644 index f1cd405cc0..0000000000 --- a/api/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: node src/app.js \ No newline at end of file diff --git a/api/package.json b/api/package.json index c3cc4805fd..56628a60b4 100644 --- a/api/package.json +++ b/api/package.json @@ -65,8 +65,9 @@ }, "scripts": { "readme": "node misc/readmeData.js | mustache - misc/README.mustache > README.md", - "start": "node src/app.ts", - "dev": "nodemon src/app.ts" + "start": "node build/app.ts", + "dev": "nodemon src/app.ts", + "build": "rm -rf build && tsc" }, "publishConfig": { "access": "public" diff --git a/api/src/api.yml b/api/src/api.yml deleted file mode 100644 index 955d51e4a8..0000000000 --- a/api/src/api.yml +++ /dev/null @@ -1,128 +0,0 @@ -swagger: "2.0" -info: - title: nivo - version: 1.0.0 - description: nivo API -host: localhost:3000 -basePath: / -schemes: - - http -paths: - /charts/line: - post: - operationId: lineChart - parameters: - - name: props - in: body - required: true - schema: - type: object - required: - - width - - height - - keys - - identity - properties: - width: - type: integer - height: - type: integer - keys: - type: array - items: - type: string - identity: - type: string - responses: - 200: - description: line chart - - /charts/bar: - post: - operationId: barChart - parameters: - - name: props - in: body - required: true - schema: - type: object - required: - - width - - height - - keys - - identity - properties: - width: - type: integer - height: - type: integer - keys: - type: array - items: - type: string - identity: - type: string - responses: - 200: - description: bar chart - - /charts/bubble: - post: - operationId: bubbleChart - parameters: - - name: props - in: body - required: true - schema: - type: object - required: - - width - - height - properties: - width: - type: integer - height: - type: integer - responses: - 200: - description: bubble chart - - /charts/chord: - post: - operationId: chordChart - parameters: - - name: props - in: body - required: true - schema: - type: object - required: - - width - - height - - data - properties: - width: - type: integer - height: - type: integer - data: - type: string - padAngle: - type: number - innerRadiusRatio: - type: number - innerRadiusOffset: - type: number - ribbonOpacity: - type: number - ribbonBorderWidth: - type: integer - arcOpacity: - type: number - arcBorderWidth: - type: integer - colors: - type: string - responses: - 200: - description: chord diagram \ No newline at end of file diff --git a/api/src/app.ts b/api/src/app.ts index b11a1f62e0..6b00ffc750 100644 --- a/api/src/app.ts +++ b/api/src/app.ts @@ -1,4 +1,3 @@ -import path from 'path' import express from 'express' import { forOwn } from 'lodash' import * as uuid from 'uuid' @@ -30,10 +29,6 @@ app.use( ) app.use(compression()) -app.get('/', (req, res) => { - res.sendFile(path.resolve(__dirname, 'api.yml')) -}) - app.get('/status', (req, res) => { res.status(200).json({ status: 'ok', diff --git a/api/tsconfig.json b/api/tsconfig.json index 86a6d37fef..afecb8b9d7 100644 --- a/api/tsconfig.json +++ b/api/tsconfig.json @@ -1,8 +1,11 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", - "rootDir": "./", - "esModuleInterop": true + "target": "es5", + "rootDir": "./src", + "outDir": "build", + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true } } \ No newline at end of file diff --git a/package.json b/package.json index 4d74d1e837..64218a92a1 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,9 @@ "make:init": "make init", "prepublishOnly": "yarn release:prepare", "release:prepare": "node scripts/bump-peer-deps.js && yarn changelog", - "version": "yarn release:prepare" + "version": "yarn release:prepare", + "build": "echo 'nothing to do, please use make for available commands'", + "heroku-postbuild": "make packages-build && cd api && yarn build" }, "workspaces": [ "packages/*", diff --git a/packages/tooltip/src/BasicTooltip.tsx b/packages/tooltip/src/BasicTooltip.tsx index f457980dec..8ed46085a8 100644 --- a/packages/tooltip/src/BasicTooltip.tsx +++ b/packages/tooltip/src/BasicTooltip.tsx @@ -2,7 +2,7 @@ import { memo, ReactNode } from 'react' import { useTheme, ValueFormat, useValueFormatter } from '@nivo/core' import { Chip } from './Chip' -interface BasicTooltipProps { +export interface BasicTooltipProps { id: ReactNode value?: number | string | Date format?: ValueFormat