Toolkit: moved front end cli scripts to separate package and introduced very early version of plugin tools

* Move cli to grafana-toolkit

* Moving packages, fixing ts

* Add basics of plugin build task

* Add toolkit build task

* Circle - use node 10 for test-frontend

* Prettier fix

* First attempt for having shared tsconfig for plugins

* Add enzyme as peer depencency

* Do not expose internal commands when using toolkit from npm package

* Introduce plugin linting

* Fix missing file

* Fix shim extenstion

* Remove rollup typings

* Add tslint as dependency

* Toolkit - use the same versions of enzyme and tslint as core does

* Remove include property from plugin tsconfig

* Take failed suites into consideration when tests failed

* Set ts-jest preset for jest

* Cleanup tsconfig.plugins

* Add plugin:test task

* Rename file causing build failute

* Fixing those missed renames

* Add ts as peer dependency

* Remove enzyme dependency and tweak test plugin task

* Allow jest options overrides via package.json config

* Improvements

* Remove rollup node packages

* TMP : Fix ts errors when linked

* use local tslint if it exists

* support coverage commands

* Fix merge

* fix build

* Some minors

* Make jest pass when no tests discovered
This commit is contained in:
Dominik Prokop
2019-06-28 14:11:12 +02:00
committed by GitHub
parent ead4b1f5c7
commit 742e0d56eb
40 changed files with 1666 additions and 386 deletions

View File

@@ -19,14 +19,11 @@
"@emotion/core": "10.0.10",
"@rtsao/plugin-proposal-class-properties": "7.0.1-patch.1",
"@types/angular": "1.6.54",
"@types/chalk": "2.2.0",
"@types/classnames": "2.2.7",
"@types/clipboard": "2.0.1",
"@types/commander": "2.12.2",
"@types/d3": "4.13.1",
"@types/enzyme": "3.9.0",
"@types/expect-puppeteer": "3.3.1",
"@types/inquirer": "0.0.43",
"@types/jest": "24.0.13",
"@types/jquery": "1.10.35",
"@types/lodash": "4.14.123",
@@ -49,16 +46,13 @@
"babel-jest": "24.8.0",
"babel-loader": "8.0.5",
"babel-plugin-angularjs-annotate": "0.10.0",
"chalk": "2.4.2",
"clean-webpack-plugin": "2.0.0",
"concurrently": "4.1.0",
"css-loader": "2.1.1",
"enzyme": "3.9.0",
"enzyme-adapter-react-16": "1.11.2",
"enzyme-to-json": "3.3.5",
"es6-promise": "3.3.1",
"es6-shim": "0.35.5",
"execa": "1.0.0",
"expect-puppeteer": "4.1.1",
"expect.js": "0.2.0",
"expose-loader": "0.7.5",
@@ -83,7 +77,6 @@
"html-webpack-harddisk-plugin": "1.0.1",
"html-webpack-plugin": "3.2.0",
"husky": "1.3.1",
"inquirer": "6.2.2",
"jest": "24.8.0",
"jest-date-mock": "1.0.7",
"lint-staged": "8.1.5",
@@ -98,7 +91,6 @@
"node-sass": "4.11.0",
"npm": "6.9.0",
"optimize-css-assets-webpack-plugin": "5.0.1",
"ora": "3.2.0",
"phantomjs-prebuilt": "2.1.16",
"pixelmatch": "4.0.2",
"pngjs": "3.4.0",
@@ -115,8 +107,6 @@
"rimraf": "2.6.3",
"sass-lint": "1.12.1",
"sass-loader": "7.1.0",
"semver": "5.7.0",
"simple-git": "^1.112.0",
"sinon": "1.17.6",
"style-loader": "0.23.1",
"systemjs": "0.20.19",
@@ -140,9 +130,9 @@
},
"scripts": {
"dev": "webpack --progress --colors --mode development --config scripts/webpack/webpack.dev.js",
"start": "npm run cli -- core:start --watchTheme",
"start:hot": "npm run cli -- core:start --hot --watchTheme",
"start:ignoreTheme": "npm run cli -- core:start --hot",
"start": "grafana-toolkit core:start --watchTheme",
"start:hot": "grafana-toolkit core:start --hot --watchTheme",
"start:ignoreTheme": "grafana-toolkit core:start --hot",
"watch": "yarn start -d watch,start core:start --watchTheme ",
"build": "grunt build",
"test": "grunt test",
@@ -153,16 +143,15 @@
"api-tests": "jest --notify --watch --config=devenv/e2e-api-tests/jest.js",
"storybook": "cd packages/grafana-ui && yarn storybook",
"storybook:build": "cd packages/grafana-ui && yarn storybook:build",
"themes:generate": "ts-node --project ./scripts/cli/tsconfig.json ./scripts/cli/generateSassVariableFiles.ts",
"prettier:check": "prettier --list-different \"**/*.{ts,tsx,scss}\"",
"prettier:write": "prettier --list-different \"**/*.{ts,tsx,scss}\" --write",
"cli": "ts-node --project ./scripts/cli/tsconfig.json ./scripts/cli/index.ts",
"gui:tslint": "tslint -c ./packages/grafana-ui/tslint.json --project ./packages/grafana-ui/tsconfig.json",
"gui:build": "npm run cli -- gui:build",
"gui:releasePrepare": "npm run cli -- gui:release",
"gui:build": "grafana-toolkit gui:build",
"gui:releasePrepare": "grafana-toolkit gui:release",
"gui:publish": "cd packages/grafana-ui/dist && npm publish --access public",
"gui:release": "npm run cli -- gui:release -p --createVersionCommit",
"precommit": "npm run cli -- precommit"
"gui:release": "grafana-toolkit gui:release -p --createVersionCommit",
"precommit": "grafana-toolkit precommit",
"themes:generate": "ts-node --project ./scripts/cli/tsconfig.json ./scripts/cli/generateSassVariableFiles.ts"
},
"husky": {
"hooks": {