breaking up grafana into multiple packages poc
This commit is contained in:
@@ -1,11 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "grafana-ui",
|
"name": "@grafana/ui",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.ts",
|
"main": "dist/index.js",
|
||||||
|
"types": "dist/types",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC"
|
"license": "ISC",
|
||||||
|
"devDependencies": {
|
||||||
|
"typescript": "^3.2.2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
|
export { Other } from './other';
|
||||||
|
import { TimeSeries } from '../types';
|
||||||
|
|
||||||
export class Google {
|
export class Google {
|
||||||
|
data: TimeSeries;
|
||||||
|
|
||||||
hello() {
|
hello() {
|
||||||
return 'hello';
|
return 'hello';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Singleton {
|
class Singleton {
|
||||||
constructor(private state) {}
|
constructor(private state: string) {}
|
||||||
|
|
||||||
hello() {
|
hello() {
|
||||||
return this.state;
|
return this.state;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export class Other {
|
||||||
|
static hello() {
|
||||||
|
return "hello from other";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"include": [
|
||||||
|
"src/**/*.ts",
|
||||||
|
"src/**/*.tsx"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc"
|
||||||
|
},
|
||||||
|
"compilerOptions": {
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"target": "es5",
|
||||||
|
"lib": ["es6", "dom"],
|
||||||
|
"jsx": "react",
|
||||||
|
"module": "esnext",
|
||||||
|
"outDir": "dist",
|
||||||
|
"declaration": false,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"importHelpers": true,
|
||||||
|
"noEmitHelpers": true,
|
||||||
|
"removeComments": false,
|
||||||
|
"inlineSourceMap": false,
|
||||||
|
"sourceMap": true,
|
||||||
|
"noEmitOnError": false,
|
||||||
|
"emitDecoratorMetadata": false,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"declaration": true,
|
||||||
|
"declarationDir": "./dist/types",
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"strictNullChecks": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
export interface TimeSeries {
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ import { PanelOptionSection } from './PanelOptionSection';
|
|||||||
import { PanelModel } from '../panel_model';
|
import { PanelModel } from '../panel_model';
|
||||||
import { DashboardModel } from '../dashboard_model';
|
import { DashboardModel } from '../dashboard_model';
|
||||||
import { PanelPlugin } from 'app/types/plugins';
|
import { PanelPlugin } from 'app/types/plugins';
|
||||||
|
import { TimeSeries } from '@grafana/ui/types';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
panel: PanelModel;
|
panel: PanelModel;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import * as ticks from 'app/core/utils/ticks';
|
|||||||
import impressionSrv from 'app/core/services/impression_srv';
|
import impressionSrv from 'app/core/services/impression_srv';
|
||||||
import builtInPlugins from './built_in_plugins';
|
import builtInPlugins from './built_in_plugins';
|
||||||
import * as d3 from 'd3';
|
import * as d3 from 'd3';
|
||||||
import * as grafanaUI from 'grafana-ui';
|
import * as grafanaUI from '@grafana/ui';
|
||||||
|
|
||||||
// rxjs
|
// rxjs
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|||||||
@@ -14544,6 +14544,11 @@ typescript@^3.0.3:
|
|||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.1.tgz#3362ba9dd1e482ebb2355b02dfe8bcd19a2c7c96"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.1.tgz#3362ba9dd1e482ebb2355b02dfe8bcd19a2c7c96"
|
||||||
integrity sha512-Veu0w4dTc/9wlWNf2jeRInNodKlcdLgemvPsrNpfu5Pq39sgfFjvIIgTsvUHCoLBnMhPoUA+tFxsXjU6VexVRQ==
|
integrity sha512-Veu0w4dTc/9wlWNf2jeRInNodKlcdLgemvPsrNpfu5Pq39sgfFjvIIgTsvUHCoLBnMhPoUA+tFxsXjU6VexVRQ==
|
||||||
|
|
||||||
|
typescript@^3.2.2:
|
||||||
|
version "3.2.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.2.tgz#fe8101c46aa123f8353523ebdcf5730c2ae493e5"
|
||||||
|
integrity sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==
|
||||||
|
|
||||||
ua-parser-js@^0.7.18:
|
ua-parser-js@^0.7.18:
|
||||||
version "0.7.19"
|
version "0.7.19"
|
||||||
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.19.tgz#94151be4c0a7fb1d001af7022fdaca4642659e4b"
|
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.19.tgz#94151be4c0a7fb1d001af7022fdaca4642659e4b"
|
||||||
|
|||||||
Reference in New Issue
Block a user