Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
de3a7610
Unverified
Commit
de3a7610
authored
Jan 12, 2021
by
Steven Vachon
Committed by
GitHub
Jan 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print Node.js and Toolkit versions (#30230)
* Minor changes * Print Node.js and toolkit versions when building
parent
24cfab6c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletions
+17
-1
packages/grafana-toolkit/src/cli/index.ts
+8
-1
packages/grafana-toolkit/src/cli/tasks/plugin.build.ts
+9
-0
No files found.
packages/grafana-toolkit/src/cli/index.ts
View file @
de3a7610
// @ts-ignore
import
chalk
from
'chalk'
;
import
program
from
'commander'
;
import
{
promises
as
fs
}
from
'fs'
;
import
{
execTask
}
from
'./utils/execTask'
;
import
chalk
from
'chalk'
;
import
{
startTask
}
from
'./tasks/core.start'
;
import
{
changelogTask
}
from
'./tasks/changelog'
;
import
{
cherryPickTask
}
from
'./tasks/cherrypick'
;
...
...
@@ -130,6 +131,12 @@ export const run = (includeInternalScripts = false) => {
});
}
program
.
option
(
'-v, --version'
,
'Toolkit version'
).
action
(
async
()
=>
{
const
pkg
=
await
fs
.
readFile
(
`
${
__dirname
}
/../../package.json`
,
'utf8'
);
const
{
version
}
=
JSON
.
parse
(
pkg
);
console
.
log
(
`v
${
version
}
`
);
});
program
.
command
(
'plugin:create [name]'
)
.
description
(
'Creates plugin from template'
)
...
...
packages/grafana-toolkit/src/cli/tasks/plugin.build.ts
View file @
de3a7610
...
...
@@ -58,6 +58,14 @@ export const prepare = () =>
])
);
export
const
versions
=
async
()
=>
{
const
nodeVersion
=
await
execa
(
'node'
,
[
'--version'
]);
console
.
log
(
`Using Node.js
${
nodeVersion
}
`
);
const
toolkitVersion
=
await
execa
(
'grafana-toolkit'
,
[
'--version'
]);
console
.
log
(
`Using @grafana/toolkit
${
toolkitVersion
}
`
);
};
// @ts-ignore
const
typecheckPlugin
=
()
=>
useSpinner
(
'Typechecking'
,
()
=>
execa
(
'tsc'
,
[
'--noEmit'
]));
...
...
@@ -121,6 +129,7 @@ export const pluginBuildRunner: TaskRunner<PluginBuildOptions> = async ({
maxJestWorkers
,
preserveConsole
,
})
=>
{
await
versions
();
await
prepare
();
await
lintPlugin
({
fix
:
false
});
await
testPlugin
({
updateSnapshot
:
false
,
coverage
,
maxWorkers
:
maxJestWorkers
,
watch
:
false
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment