mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-03 07:36:41 +02:00
webpack fs: 'empty'
This commit is contained in:
@@ -31,7 +31,7 @@ export default function (config) {
|
||||
},
|
||||
|
||||
webpack: {
|
||||
externals: webpackConfig.externals,
|
||||
node: webpackConfig.node,
|
||||
module: webpackConfig.module
|
||||
},
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mermaid",
|
||||
"version": "7.0.13",
|
||||
"version": "7.0.14",
|
||||
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
||||
"main": "dist/mermaid.core.js",
|
||||
"keywords": [
|
||||
@@ -24,7 +24,7 @@
|
||||
"karma": "node -r babel-register node_modules/.bin/karma start karma.conf.js --single-run",
|
||||
"jest": "jest --coverage --runInBand",
|
||||
"test": "yarn lint && yarn karma",
|
||||
"jison": "gulp jison",
|
||||
"jison": "node -r babel-register node_modules/.bin/gulp jison",
|
||||
"prepublishOnly": "yarn build && yarn release && yarn test"
|
||||
},
|
||||
"repository": {
|
||||
|
@@ -731,12 +731,12 @@ exports.parser = parser;
|
||||
exports.Parser = parser.Parser;
|
||||
exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
||||
exports.main = function commonjsMain(args) {
|
||||
// if (!args[1]) {
|
||||
// console.log('Usage: '+args[0]+' FILE');
|
||||
// process.exit(1);
|
||||
// }
|
||||
// var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
// return exports.parser.parse(source);
|
||||
if (!args[1]) {
|
||||
console.log('Usage: '+args[0]+' FILE');
|
||||
process.exit(1);
|
||||
}
|
||||
var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
return exports.parser.parse(source);
|
||||
};
|
||||
if (typeof module !== 'undefined' && require.main === module) {
|
||||
exports.main(process.argv.slice(1));
|
||||
|
@@ -621,12 +621,12 @@ exports.parser = parser;
|
||||
exports.Parser = parser.Parser;
|
||||
exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
||||
exports.main = function commonjsMain(args) {
|
||||
// if (!args[1]) {
|
||||
// console.log('Usage: '+args[0]+' FILE');
|
||||
// process.exit(1);
|
||||
// }
|
||||
// var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
// return exports.parser.parse(source);
|
||||
if (!args[1]) {
|
||||
console.log('Usage: '+args[0]+' FILE');
|
||||
process.exit(1);
|
||||
}
|
||||
var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
return exports.parser.parse(source);
|
||||
};
|
||||
if (typeof module !== 'undefined' && require.main === module) {
|
||||
exports.main(process.argv.slice(1));
|
||||
|
@@ -731,12 +731,12 @@ exports.parser = parser;
|
||||
exports.Parser = parser.Parser;
|
||||
exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
||||
exports.main = function commonjsMain(args) {
|
||||
// if (!args[1]) {
|
||||
// console.log('Usage: '+args[0]+' FILE');
|
||||
// process.exit(1);
|
||||
// }
|
||||
// var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
// return exports.parser.parse(source);
|
||||
if (!args[1]) {
|
||||
console.log('Usage: '+args[0]+' FILE');
|
||||
process.exit(1);
|
||||
}
|
||||
var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
return exports.parser.parse(source);
|
||||
};
|
||||
if (typeof module !== 'undefined' && require.main === module) {
|
||||
exports.main(process.argv.slice(1));
|
||||
|
@@ -952,12 +952,12 @@ exports.parser = parser;
|
||||
exports.Parser = parser.Parser;
|
||||
exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
||||
exports.main = function commonjsMain(args) {
|
||||
// if (!args[1]) {
|
||||
// console.log('Usage: '+args[0]+' FILE');
|
||||
// process.exit(1);
|
||||
// }
|
||||
// var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
// return exports.parser.parse(source);
|
||||
if (!args[1]) {
|
||||
console.log('Usage: '+args[0]+' FILE');
|
||||
process.exit(1);
|
||||
}
|
||||
var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
return exports.parser.parse(source);
|
||||
};
|
||||
if (typeof module !== 'undefined' && require.main === module) {
|
||||
exports.main(process.argv.slice(1));
|
||||
|
@@ -647,12 +647,12 @@ exports.parser = parser;
|
||||
exports.Parser = parser.Parser;
|
||||
exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
||||
exports.main = function commonjsMain(args) {
|
||||
// if (!args[1]) {
|
||||
// console.log('Usage: '+args[0]+' FILE');
|
||||
// process.exit(1);
|
||||
// }
|
||||
// var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
// return exports.parser.parse(source);
|
||||
if (!args[1]) {
|
||||
console.log('Usage: '+args[0]+' FILE');
|
||||
process.exit(1);
|
||||
}
|
||||
var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
return exports.parser.parse(source);
|
||||
};
|
||||
if (typeof module !== 'undefined' && require.main === module) {
|
||||
exports.main(process.argv.slice(1));
|
||||
|
@@ -687,12 +687,12 @@ exports.parser = parser;
|
||||
exports.Parser = parser.Parser;
|
||||
exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
||||
exports.main = function commonjsMain(args) {
|
||||
// if (!args[1]) {
|
||||
// console.log('Usage: '+args[0]+' FILE');
|
||||
// process.exit(1);
|
||||
// }
|
||||
// var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
// return exports.parser.parse(source);
|
||||
if (!args[1]) {
|
||||
console.log('Usage: '+args[0]+' FILE');
|
||||
process.exit(1);
|
||||
}
|
||||
var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
return exports.parser.parse(source);
|
||||
};
|
||||
if (typeof module !== 'undefined' && require.main === module) {
|
||||
exports.main(process.argv.slice(1));
|
||||
|
@@ -797,12 +797,12 @@ exports.parser = parser;
|
||||
exports.Parser = parser.Parser;
|
||||
exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
||||
exports.main = function commonjsMain(args) {
|
||||
// if (!args[1]) {
|
||||
// console.log('Usage: '+args[0]+' FILE');
|
||||
// process.exit(1);
|
||||
// }
|
||||
// var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
// return exports.parser.parse(source);
|
||||
if (!args[1]) {
|
||||
console.log('Usage: '+args[0]+' FILE');
|
||||
process.exit(1);
|
||||
}
|
||||
var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
|
||||
return exports.parser.parse(source);
|
||||
};
|
||||
if (typeof module !== 'undefined' && require.main === module) {
|
||||
exports.main(process.argv.slice(1));
|
||||
|
4
todo.md
4
todo.md
@@ -9,6 +9,7 @@
|
||||
- Get familar with jison
|
||||
- git graph requires a blank line at the end. why?
|
||||
- Move cli to mermaid-cli project ?
|
||||
- think about it
|
||||
- Remove 'lodash' as dependency
|
||||
- https://github.com/lodash/babel-plugin-lodash
|
||||
- https://www.npmjs.com/package/lodash-webpack-plugin
|
||||
@@ -22,5 +23,4 @@
|
||||
- Generate them into system temp folder instead
|
||||
- Replace phantomjs with Chrome headless
|
||||
- `yarn jest` is disabled
|
||||
- Don't manually change jison generated files
|
||||
- Removed 'fs' dependency from it
|
||||
- Travis build failed
|
||||
|
@@ -16,6 +16,9 @@ export const jsConfig = () => {
|
||||
entry: {
|
||||
mermaid: './src/mermaid.js'
|
||||
},
|
||||
node: {
|
||||
fs: 'empty' // jison generated code requires 'fs'
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, './dist/'),
|
||||
filename: '[name].js',
|
||||
|
Reference in New Issue
Block a user