Skip to content

Commit

Permalink
fix packages
Browse files Browse the repository at this point in the history
  • Loading branch information
iamcco committed Jan 16, 2019
1 parent b0ac647 commit 53f0f69
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion app/lib/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ if (param === PATH) {
}
else if (param === VERSION) {
// tslint:disable-next-line
console.log('0.0.8');
console.log('0.0.9');
}
11 changes: 2 additions & 9 deletions app/lib/app/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ function load(scriptPath) {
userModule.paths = module_1.default._nodeModulePaths(path_1.default.dirname(scriptPath));
const moduleCode = fs_1.default.readFileSync(userModule.filename, 'utf-8');
userModule.require = userModule.require.bind(userModule);
const sanbox = vm_1.default.createContext({
exports: userModule.exports,
module: userModule,
require: name => {
const sanbox = vm_1.default.createContext(Object.assign({}, global, { exports: userModule.exports, module: userModule, require: name => {
if (preloadmodules_1.default[name]) {
return preloadmodules_1.default[name];
}
Expand All @@ -32,11 +29,7 @@ function load(scriptPath) {
}
return load(loadScript);
}
},
__filename: userModule.filename,
__dirname: path_1.default.dirname(scriptPath),
process,
});
}, __filename: userModule.filename, __dirname: path_1.default.dirname(scriptPath), process }));
vm_1.default.runInContext(moduleCode, sanbox, { filename: userModule.filename });
return userModule.exports;
}
Expand Down
1 change: 1 addition & 0 deletions app/lib/app/preloadmodules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ declare const _default: {
log4js: any;
tslib: any;
'socket.io': any;
'msgpack-lite': any;
};
export default _default;
4 changes: 3 additions & 1 deletion app/lib/app/preloadmodules.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ const neovim = require('neovim');
const log4js = require('log4js');
const tslib = require('tslib');
const socketIO = require('socket.io');
const msgpackLite = require('msgpack-lite');
exports.default = {
neovim,
log4js,
tslib,
'socket.io': socketIO
'socket.io': socketIO,
'msgpack-lite': msgpackLite
};
1 change: 0 additions & 1 deletion app/lib/vim-node-rpc/lib/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env node
'use strict'
Object.defineProperty(exports, '__esModule', { value: true })
const tslib_1 = require('tslib')
Expand Down
2 changes: 1 addition & 1 deletion app/out/404.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charSet="utf-8" class="next-head"/><link rel="preload" href="/_next/static/m8mLe3bgnbJBQe82yuoK9/pages/404.js" as="script"/><link rel="preload" href="/_next/static/m8mLe3bgnbJBQe82yuoK9/pages/_app.js" as="script"/><link rel="preload" href="/_next/static/m8mLe3bgnbJBQe82yuoK9/pages/_error.js" as="script"/><link rel="preload" href="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" as="script"/><link rel="preload" href="/_next/static/chunks/commons.1c1b5ebd55cbcad2529a.js" as="script"/><link rel="preload" href="/_next/static/runtime/main-94dad8183cac85e3af97.js" as="script"/></head><body><div id="__next"><div data-reactroot="">404</div></div><script>__NEXT_DATA__ = {"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"m8mLe3bgnbJBQe82yuoK9","nextExport":true};__NEXT_LOADED_PAGES__=[];__NEXT_REGISTER_PAGE=function(r,f){__NEXT_LOADED_PAGES__.push([r, f])}</script><script async="" id="__NEXT_PAGE__/404" src="/_next/static/m8mLe3bgnbJBQe82yuoK9/pages/404.js"></script><script async="" id="__NEXT_PAGE__/_app" src="/_next/static/m8mLe3bgnbJBQe82yuoK9/pages/_app.js"></script><script async="" id="__NEXT_PAGE__/_error" src="/_next/static/m8mLe3bgnbJBQe82yuoK9/pages/_error.js"></script><script src="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" async=""></script><script src="/_next/static/chunks/commons.1c1b5ebd55cbcad2529a.js" async=""></script><script src="/_next/static/runtime/main-94dad8183cac85e3af97.js" async=""></script></body></html>
<!DOCTYPE html><html><head><meta charSet="utf-8" class="next-head"/><link rel="preload" href="/_next/static/7ucuy2QOU5SXjP1rAf88U/pages/404.js" as="script"/><link rel="preload" href="/_next/static/7ucuy2QOU5SXjP1rAf88U/pages/_app.js" as="script"/><link rel="preload" href="/_next/static/7ucuy2QOU5SXjP1rAf88U/pages/_error.js" as="script"/><link rel="preload" href="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" as="script"/><link rel="preload" href="/_next/static/chunks/commons.1c1b5ebd55cbcad2529a.js" as="script"/><link rel="preload" href="/_next/static/runtime/main-94dad8183cac85e3af97.js" as="script"/></head><body><div id="__next"><div data-reactroot="">404</div></div><script>__NEXT_DATA__ = {"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"7ucuy2QOU5SXjP1rAf88U","nextExport":true};__NEXT_LOADED_PAGES__=[];__NEXT_REGISTER_PAGE=function(r,f){__NEXT_LOADED_PAGES__.push([r, f])}</script><script async="" id="__NEXT_PAGE__/404" src="/_next/static/7ucuy2QOU5SXjP1rAf88U/pages/404.js"></script><script async="" id="__NEXT_PAGE__/_app" src="/_next/static/7ucuy2QOU5SXjP1rAf88U/pages/_app.js"></script><script async="" id="__NEXT_PAGE__/_error" src="/_next/static/7ucuy2QOU5SXjP1rAf88U/pages/_error.js"></script><script src="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" async=""></script><script src="/_next/static/chunks/commons.1c1b5ebd55cbcad2529a.js" async=""></script><script src="/_next/static/runtime/main-94dad8183cac85e3af97.js" async=""></script></body></html>
2 changes: 1 addition & 1 deletion app/out/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charSet="utf-8" class="next-head"/><title class="next-head">「」</title><link rel="shortcut icon" type="image/ico" href="/_static/favicon.ico" class="next-head"/><link rel="stylesheet" href="/_static/page.css" class="next-head"/><link rel="stylesheet" href="/_static/markdown.css" class="next-head"/><link rel="stylesheet" href="/_static/highlight.css" class="next-head"/><link rel="stylesheet" href="/_static/katex@0.5.1.css" class="next-head"/><script type="text/javascript" src="/_static/tweenlite.min.js" class="next-head"></script><script type="text/javascript" src="/_static/mermaid.min.js" class="next-head"></script><link rel="preload" href="/_next/static/m8mLe3bgnbJBQe82yuoK9/pages/index.js" as="script"/><link rel="preload" href="/_next/static/m8mLe3bgnbJBQe82yuoK9/pages/_app.js" as="script"/><link rel="preload" href="/_next/static/m8mLe3bgnbJBQe82yuoK9/pages/_error.js" as="script"/><link rel="preload" href="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" as="script"/><link rel="preload" href="/_next/static/chunks/commons.1c1b5ebd55cbcad2529a.js" as="script"/><link rel="preload" href="/_next/static/runtime/main-94dad8183cac85e3af97.js" as="script"/></head><body><div id="__next"><div id="page-ctn"><header id="page-header"><h3><svg viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"></path></svg></h3></header><section class="markdown-body"></section></div></div><script>__NEXT_DATA__ = {"props":{"pageProps":{}},"page":"/","query":{},"buildId":"m8mLe3bgnbJBQe82yuoK9","nextExport":true};__NEXT_LOADED_PAGES__=[];__NEXT_REGISTER_PAGE=function(r,f){__NEXT_LOADED_PAGES__.push([r, f])}</script><script async="" id="__NEXT_PAGE__/" src="/_next/static/m8mLe3bgnbJBQe82yuoK9/pages/index.js"></script><script async="" id="__NEXT_PAGE__/_app" src="/_next/static/m8mLe3bgnbJBQe82yuoK9/pages/_app.js"></script><script async="" id="__NEXT_PAGE__/_error" src="/_next/static/m8mLe3bgnbJBQe82yuoK9/pages/_error.js"></script><script src="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" async=""></script><script src="/_next/static/chunks/commons.1c1b5ebd55cbcad2529a.js" async=""></script><script src="/_next/static/runtime/main-94dad8183cac85e3af97.js" async=""></script></body></html>
<!DOCTYPE html><html><head><meta charSet="utf-8" class="next-head"/><title class="next-head">「」</title><link rel="shortcut icon" type="image/ico" href="/_static/favicon.ico" class="next-head"/><link rel="stylesheet" href="/_static/page.css" class="next-head"/><link rel="stylesheet" href="/_static/markdown.css" class="next-head"/><link rel="stylesheet" href="/_static/highlight.css" class="next-head"/><link rel="stylesheet" href="/_static/katex@0.5.1.css" class="next-head"/><script type="text/javascript" src="/_static/tweenlite.min.js" class="next-head"></script><script type="text/javascript" src="/_static/mermaid.min.js" class="next-head"></script><link rel="preload" href="/_next/static/7ucuy2QOU5SXjP1rAf88U/pages/index.js" as="script"/><link rel="preload" href="/_next/static/7ucuy2QOU5SXjP1rAf88U/pages/_app.js" as="script"/><link rel="preload" href="/_next/static/7ucuy2QOU5SXjP1rAf88U/pages/_error.js" as="script"/><link rel="preload" href="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" as="script"/><link rel="preload" href="/_next/static/chunks/commons.1c1b5ebd55cbcad2529a.js" as="script"/><link rel="preload" href="/_next/static/runtime/main-94dad8183cac85e3af97.js" as="script"/></head><body><div id="__next"><div id="page-ctn"><header id="page-header"><h3><svg viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"></path></svg></h3></header><section class="markdown-body"></section></div></div><script>__NEXT_DATA__ = {"props":{"pageProps":{}},"page":"/","query":{},"buildId":"7ucuy2QOU5SXjP1rAf88U","nextExport":true};__NEXT_LOADED_PAGES__=[];__NEXT_REGISTER_PAGE=function(r,f){__NEXT_LOADED_PAGES__.push([r, f])}</script><script async="" id="__NEXT_PAGE__/" src="/_next/static/7ucuy2QOU5SXjP1rAf88U/pages/index.js"></script><script async="" id="__NEXT_PAGE__/_app" src="/_next/static/7ucuy2QOU5SXjP1rAf88U/pages/_app.js"></script><script async="" id="__NEXT_PAGE__/_error" src="/_next/static/7ucuy2QOU5SXjP1rAf88U/pages/_error.js"></script><script src="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" async=""></script><script src="/_next/static/chunks/commons.1c1b5ebd55cbcad2529a.js" async=""></script><script src="/_next/static/runtime/main-94dad8183cac85e3af97.js" async=""></script></body></html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "markdown-preview.vim",
"version": "0.0.8",
"version": "0.0.9",
"description": "markdown preview plugin for (neo)vim",
"bin": "./app/server.js",
"repository": "https://github.com/iamcco/markdown-preview.vim.git",
Expand Down
2 changes: 1 addition & 1 deletion src/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ if (param === PATH) {
load(argv[3]).run()
} else if (param === VERSION) {
// tslint:disable-next-line
console.log('0.0.8')
console.log('0.0.9')
}
1 change: 1 addition & 0 deletions src/app/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default function load(scriptPath) {
userModule.require = userModule.require.bind(userModule)

const sanbox = vm.createContext({
...global,
exports: userModule.exports,
module: userModule,
require: name => {
Expand Down
4 changes: 3 additions & 1 deletion src/app/preloadmodules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ const neovim = require('neovim')
const log4js = require('log4js')
const tslib = require('tslib')
const socketIO = require('socket.io')
const msgpackLite = require('msgpack-lite')

export default {
neovim,
log4js,
tslib,
'socket.io': socketIO
'socket.io': socketIO,
'msgpack-lite': msgpackLite
}

0 comments on commit 53f0f69

Please sign in to comment.