Add dist/ directory to repo to correspond development guide.

http://docs.grafana.org/plugins/development/
This commit is contained in:
Alexander Zobnin
2017-02-02 11:33:54 +03:00
parent 658e436198
commit 0b3f537341
88 changed files with 11482 additions and 1 deletions

View File

@@ -0,0 +1,49 @@
// JSHint options
/* globals global: false */
import prunk from 'prunk';
import {jsdom} from 'jsdom';
import chai from 'chai';
// import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import * as dateMath from './modules/datemath';
// Mock angular module
var angularMocks = {
module: function() {
return {
directive: function() {},
service: function() {},
factory: function() {}
};
}
};
var datemathMock = {
parse: dateMath.parse,
parseDateMath: dateMath.parseDateMath,
isValid: dateMath.isValid
};
// Mock Grafana modules that are not available outside of the core project
// Required for loading module.js
prunk.mock('./css/query-editor.css!', 'no css, dude.');
prunk.mock('app/plugins/sdk', {
QueryCtrl: null
});
prunk.mock('app/core/utils/datemath', datemathMock);
prunk.mock('angular', angularMocks);
prunk.mock('jquery', 'module not found');
// Setup jsdom
// Required for loading angularjs
global.document = jsdom('<html><head><script></script></head><body></body></html>');
global.window = global.document.parentWindow;
global.navigator = window.navigator = {};
global.Node = window.Node;
// Setup Chai
chai.should();
chai.use(sinonChai);
global.assert = chai.assert;
global.expect = chai.expect;