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
8b4dbbe0
Unverified
Commit
8b4dbbe0
authored
Sep 27, 2018
by
Torkel Ödegaard
Committed by
GitHub
Sep 27, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13448 from grafana/davkal/typecheck-precommit
Compile TS on precommit hook
parents
5873a713
88f36cbd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
scripts/grunt/default_task.js
+5
-4
scripts/grunt/options/exec.js
+2
-1
No files found.
scripts/grunt/default_task.js
View file @
8b4dbbe0
// Lint and build CSS
// Lint and build CSS
module
.
exports
=
function
(
grunt
)
{
module
.
exports
=
function
(
grunt
)
{
'use strict'
;
'use strict'
;
grunt
.
registerTask
(
'default'
,
[
grunt
.
registerTask
(
'default'
,
[
...
@@ -18,15 +18,16 @@ module.exports = function(grunt) {
...
@@ -18,15 +18,16 @@ module.exports = function(grunt) {
grunt
.
registerTask
(
'precommit'
,
[
grunt
.
registerTask
(
'precommit'
,
[
'sasslint'
,
'sasslint'
,
'exec:tslint'
,
'exec:tslint'
,
'exec:tsc'
,
'no-only-tests'
'no-only-tests'
]);
]);
grunt
.
registerTask
(
'no-only-tests'
,
function
()
{
grunt
.
registerTask
(
'no-only-tests'
,
function
()
{
var
files
=
grunt
.
file
.
expand
(
'public/**/*_specs
\
.ts'
,
'public/**/*_specs
\
.js'
);
var
files
=
grunt
.
file
.
expand
(
'public/**/*_specs
\
.ts'
,
'public/**/*_specs
\
.js'
);
files
.
forEach
(
function
(
spec
)
{
files
.
forEach
(
function
(
spec
)
{
var
rows
=
grunt
.
file
.
read
(
spec
).
split
(
'
\
n'
);
var
rows
=
grunt
.
file
.
read
(
spec
).
split
(
'
\
n'
);
rows
.
forEach
(
function
(
row
)
{
rows
.
forEach
(
function
(
row
)
{
if
(
row
.
indexOf
(
'.only('
)
>
0
)
{
if
(
row
.
indexOf
(
'.only('
)
>
0
)
{
grunt
.
log
.
errorlns
(
row
);
grunt
.
log
.
errorlns
(
row
);
grunt
.
fail
.
warn
(
'found only statement in test: '
+
spec
)
grunt
.
fail
.
warn
(
'found only statement in test: '
+
spec
)
...
...
scripts/grunt/options/exec.js
View file @
8b4dbbe0
module
.
exports
=
function
(
config
,
grunt
)
{
module
.
exports
=
function
(
config
,
grunt
)
{
'use strict'
;
'use strict'
;
return
{
return
{
tslint
:
'node ./node_modules/tslint/lib/tslintCli.js -c tslint.json --project ./tsconfig.json'
,
tslint
:
'node ./node_modules/tslint/lib/tslintCli.js -c tslint.json --project ./tsconfig.json'
,
tsc
:
'yarn tsc --noEmit'
,
jest
:
'node ./node_modules/jest-cli/bin/jest.js --maxWorkers 2'
,
jest
:
'node ./node_modules/jest-cli/bin/jest.js --maxWorkers 2'
,
webpack
:
'node ./node_modules/webpack/bin/webpack.js --config scripts/webpack/webpack.prod.js'
,
webpack
:
'node ./node_modules/webpack/bin/webpack.js --config scripts/webpack/webpack.prod.js'
,
};
};
...
...
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