include necessary jquery-ui

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-01-11 17:22:56 +01:00
parent ebe1732282
commit 09fcf6f51b
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
3 changed files with 10 additions and 0 deletions

View File

@ -32,6 +32,14 @@ hexo.extend.generator.register('jquery', function(locals) {
};
});
hexo.extend.generator.register('jquery-ui', function(locals) {
const sourceFile = require.resolve('jquery-ui-dist/jquery-ui.min.js')
return {
path: path.join('js', 'jquery-ui.min.js'),
data: function() { return fs.createReadStream(sourceFile); }
};
});
hexo.extend.generator.register('marcopolo', function(locals) {
const sourceFile = require.resolve('jquery-marcopolo/src/jquery.marcopolo.js')
return {

View File

@ -4,6 +4,7 @@ module.exports = function(hexoConfig) {
const es = hexoConfig.elasticsearch;
return (
'<script src="/js/jquery.min.js"></script>\n'+
'<script src="/js/jquery-ui.min.js"></script>\n'+
'<script src="/js/jquery.marcopolo.js" type="text/javascript"></script>\n'+
'<meta property="elasticsearch" data-es-host="' +
es.esHost +

View File

@ -36,6 +36,7 @@
"elasticsearch": "^15.2.0",
"jquery": "3.3.1",
"jquery-marcopolo": "https://github.com/jstayton/jquery-marcopolo.git",
"jquery-ui-dist": "^1.12.1",
"p-each-series": "^1.0.0"
},
"devDependencies": {