You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi;
I want to use this plugin on the browser but I can't figure out how, I've cloned the repository built it, but seems not working to me, because the file in dist/index.js have only the plugin compiled there's not the mermais package there's, here's the code I had :
(functionwebpackUniversalModuleDefinition(root,factory){if(typeofexports==='object'&&typeofmodule==='object')module.exports=factory();elseif(typeofdefine==='function'&&define.amd)define([],factory);else{vara=factory();for(variina)(typeofexports==='object' ? exports : root)[i]=a[i];}})(typeofself!=='undefined' ? self : this,function(){return/******/(function(modules){// webpackBootstrap/******/// The module cache/******/varinstalledModules={};/******//******/// The require function/******/function__webpack_require__(moduleId){/******//******/// Check if module is in cache/******/if(installedModules[moduleId]){/******/returninstalledModules[moduleId].exports;/******/}/******/// Create a new module (and put it into the cache)/******/varmodule=installedModules[moduleId]={/******/i: moduleId,/******/l: false,/******/exports: {}/******/};/******//******/// Execute the module function/******/modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);/******//******/// Flag the module as loaded/******/module.l=true;/******//******/// Return the exports of the module/******/returnmodule.exports;/******/}/******//******//******/// expose the modules object (__webpack_modules__)/******/__webpack_require__.m=modules;/******//******/// expose the module cache/******/__webpack_require__.c=installedModules;/******//******/// define getter function for harmony exports/******/__webpack_require__.d=function(exports,name,getter){/******/if(!__webpack_require__.o(exports,name)){/******/Object.defineProperty(exports,name,{/******/configurable: false,/******/enumerable: true,/******/get: getter/******/});/******/}/******/};/******//******/// getDefaultExport function for compatibility with non-harmony modules/******/__webpack_require__.n=function(module){/******/vargetter=module&&module.__esModule ?
/******/functiongetDefault(){returnmodule['default'];} :
/******/functiongetModuleExports(){returnmodule;};/******/__webpack_require__.d(getter,'a',getter);/******/returngetter;/******/};/******//******/// Object.prototype.hasOwnProperty.call/******/__webpack_require__.o=function(object,property){returnObject.prototype.hasOwnProperty.call(object,property);};/******//******/// __webpack_public_path__/******/__webpack_require__.p="";/******//******/// Load entry module and return exports/******/return__webpack_require__(__webpack_require__.s=0);/******/})/************************************************************************//******/([/* 0 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value: true});var_mermaid=__webpack_require__(1);var_mermaid2=_interopRequireDefault(_mermaid);function_interopRequireDefault(obj){returnobj&&obj.__esModule ? obj : {default: obj};}varmermaidChart=functionmermaidChart(code){try{_mermaid2.default.parse(code);return'<div class="mermaid">'+code+'</div>';}catch(_ref){varstr=_ref.str;varhash=_ref.hash;return'<pre>'+str+'</pre>';}};varMermaidPlugin=functionMermaidPlugin(md){md.mermaid=_mermaid2.default;_mermaid2.default.loadPreferences=function(preferenceStore){varmermaidTheme=preferenceStore.get('mermaid-theme');if(mermaidTheme===undefined){mermaidTheme='default';}varganttAxisFormat=preferenceStore.get('gantt-axis-format');if(ganttAxisFormat===undefined){ganttAxisFormat='%Y-%m-%d';}_mermaid2.default.initialize({theme: mermaidTheme,gantt: {axisFormatter: [[ganttAxisFormat,function(d){returnd.getDay()===1;}]]}});return{'mermaid-theme': mermaidTheme,'gantt-axis-format': ganttAxisFormat};};vartemp=md.renderer.rules.fence.bind(md.renderer.rules);md.renderer.rules.fence=function(tokens,idx,options,env,slf){vartoken=tokens[idx];varcode=token.content.trim();if(token.info==='mermaid'){returnmermaidChart(code);}varfirstLine=code.split(/\n/)[0].trim();if(firstLine==='gantt'||firstLine==='sequenceDiagram'||firstLine.match(/^graph(?:TB|BT|RL|LR|TD);?$/)){returnmermaidChart(code);}returntemp(tokens,idx,options,env,slf);};};exports.default=MermaidPlugin;/***/}),/* 1 *//***/(function(module,exports){module.exports=require("mermaid");/***/})/******/]);});//# sourceMappingURL=index.js.map
Am I missing something?
The text was updated successfully, but these errors were encountered:
Hi;
I want to use this plugin on the browser but I can't figure out how, I've cloned the repository built it, but seems not working to me, because the file in
dist/index.js
have only the plugin compiled there's not the mermais package there's, here's the code I had :Am I missing something?
The text was updated successfully, but these errors were encountered: