mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-30 05:36:43 +02:00
Update some dependencies
This commit is contained in:
@@ -27,6 +27,7 @@ export default function (config) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
webpack: {
|
webpack: {
|
||||||
|
mode: 'development',
|
||||||
node: webpackConfig.node,
|
node: webpackConfig.node,
|
||||||
module: webpackConfig.module,
|
module: webpackConfig.module,
|
||||||
devtool: 'inline-source-map'
|
devtool: 'inline-source-map'
|
||||||
@@ -56,6 +57,6 @@ export default function (config) {
|
|||||||
|
|
||||||
// Continuous Integration mode
|
// Continuous Integration mode
|
||||||
// if true, Karma captures browsers, runs the tests and exits
|
// if true, Karma captures browsers, runs the tests and exits
|
||||||
singleRun: false
|
singleRun: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
37
package.json
37
package.json
@@ -16,9 +16,9 @@
|
|||||||
"build": "webpack --progress --colors",
|
"build": "webpack --progress --colors",
|
||||||
"build:watch": "yarn build --watch",
|
"build:watch": "yarn build --watch",
|
||||||
"release": "yarn build -p --config webpack.config.prod.babel.js",
|
"release": "yarn build -p --config webpack.config.prod.babel.js",
|
||||||
"upgrade": "yarn-upgrade-all && yarn remove d3 && yarn add d3@3.5.17",
|
"upgrade": "yarn-upgrade-all && yarn remove d3 && yarn add d3@3.5.17 && yarn remove dagre-d3-renderer && yarn add dagre-d3-renderer@0.4.25 && yarn remove dagre-layout && yarn add dagre-layout@0.8.0 && yarn remove less && yarn add --dev less@2.7.3 && yarn remove puppeteer && yarn add --dev puppeteer@0.13.0 && yarn remove karma jasmine && yarn add --dev karma@1.7.1 jasmine@2.8.0",
|
||||||
"lint": "standard",
|
"lint": "standard",
|
||||||
"karma": "node -r babel-register node_modules/.bin/karma start karma.conf.js --single-run",
|
"karma": "node -r babel-register node_modules/.bin/karma start karma.conf.js",
|
||||||
"test": "yarn lint && yarn karma",
|
"test": "yarn lint && yarn karma",
|
||||||
"jison": "node -r babel-register node_modules/.bin/gulp jison",
|
"jison": "node -r babel-register node_modules/.bin/gulp jison",
|
||||||
"prepublishOnly": "yarn build && yarn release && yarn test"
|
"prepublishOnly": "yarn build && yarn release && yarn test"
|
||||||
@@ -37,41 +37,42 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"d3": "3.5.17",
|
"d3": "3.5.17",
|
||||||
"dagre-d3-renderer": "^0.4.25",
|
"dagre-d3-renderer": "0.4.25",
|
||||||
"dagre-layout": "^0.8.0",
|
"dagre-layout": "0.8.0",
|
||||||
"he": "^1.1.1",
|
"he": "^1.1.1",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.5",
|
||||||
"moment": "^2.20.1"
|
"moment": "^2.21.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "^6.26.0",
|
"babel-core": "^6.26.0",
|
||||||
"babel-loader": "^7.1.2",
|
"babel-loader": "^7.1.3",
|
||||||
"babel-plugin-lodash": "^3.3.2",
|
"babel-plugin-lodash": "^3.3.2",
|
||||||
"babel-preset-env": "^1.6.1",
|
"babel-preset-env": "^1.6.1",
|
||||||
"codeclimate-test-reporter": "^0.5.0",
|
"codeclimate-test-reporter": "^0.5.0",
|
||||||
"css-loader": "^0.28.7",
|
"css-loader": "^0.28.10",
|
||||||
"css-to-string-loader": "^0.1.3",
|
"css-to-string-loader": "^0.1.3",
|
||||||
"extract-text-webpack-plugin": "^3.0.2",
|
"extract-text-webpack-plugin": "^3.0.2",
|
||||||
"gulp": "^3.9.1",
|
"gulp": "^3.9.1",
|
||||||
"gulp-filelog": "^0.4.1",
|
"gulp-filelog": "^0.4.1",
|
||||||
"gulp-jison": "^1.2.0",
|
"gulp-jison": "^1.2.0",
|
||||||
"inject-loader": "^3.0.1",
|
"inject-loader": "^3.0.1",
|
||||||
"jasmine": "^2.8.0",
|
"jasmine": "2.8.0",
|
||||||
"jasmine-es6": "^0.4.3",
|
"jasmine-es6": "^0.4.3",
|
||||||
"jison": "^0.4.18",
|
"jison": "^0.4.18",
|
||||||
"karma": "^1.7.1",
|
"karma": "1.7.1",
|
||||||
"karma-chrome-launcher": "^2.2.0",
|
"karma-chrome-launcher": "^2.2.0",
|
||||||
"karma-jasmine": "^1.1.1",
|
"karma-jasmine": "^1.1.1",
|
||||||
"karma-sourcemap-loader": "^0.3.7",
|
"karma-sourcemap-loader": "^0.3.7",
|
||||||
"karma-webpack": "^2.0.9",
|
"karma-webpack": "^2.0.13",
|
||||||
"less": "^2.7.3",
|
"less": "2.7.3",
|
||||||
"less-loader": "^4.0.5",
|
"less-loader": "^4.0.6",
|
||||||
"puppeteer": "^0.13.0",
|
"puppeteer": "0.13.0",
|
||||||
"standard": "^10.0.3",
|
"standard": "^11.0.0",
|
||||||
"style-loader": "^0.19.1",
|
"style-loader": "^0.20.2",
|
||||||
"webpack": "^3.10.0",
|
"webpack": "^4.1.0",
|
||||||
|
"webpack-cli": "^2.0.10",
|
||||||
"webpack-node-externals": "^1.6.0",
|
"webpack-node-externals": "^1.6.0",
|
||||||
"yarn-upgrade-all": "^0.2.0"
|
"yarn-upgrade-all": "^0.3.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
|
@@ -233,12 +233,12 @@ const drawClass = function (elem, classDef) {
|
|||||||
|
|
||||||
const titleHeight = title.node().getBBox().height
|
const titleHeight = title.node().getBBox().height
|
||||||
|
|
||||||
const membersLine = g.append('line') // text label for the x axis
|
const membersLine = g.append('line') // text label for the x axis
|
||||||
.attr('x1', 0)
|
.attr('x1', 0)
|
||||||
.attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2)
|
.attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2)
|
||||||
.attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2)
|
.attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2)
|
||||||
|
|
||||||
const members = g.append('text') // text label for the x axis
|
const members = g.append('text') // text label for the x axis
|
||||||
.attr('x', conf.padding)
|
.attr('x', conf.padding)
|
||||||
.attr('y', titleHeight + (conf.dividerMargin) + conf.textHeight)
|
.attr('y', titleHeight + (conf.dividerMargin) + conf.textHeight)
|
||||||
.attr('fill', 'white')
|
.attr('fill', 'white')
|
||||||
@@ -252,12 +252,12 @@ const drawClass = function (elem, classDef) {
|
|||||||
|
|
||||||
const membersBox = members.node().getBBox()
|
const membersBox = members.node().getBBox()
|
||||||
|
|
||||||
const methodsLine = g.append('line') // text label for the x axis
|
const methodsLine = g.append('line') // text label for the x axis
|
||||||
.attr('x1', 0)
|
.attr('x1', 0)
|
||||||
.attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height)
|
.attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height)
|
||||||
.attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height)
|
.attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height)
|
||||||
|
|
||||||
const methods = g.append('text') // text label for the x axis
|
const methods = g.append('text') // text label for the x axis
|
||||||
.attr('x', conf.padding)
|
.attr('x', conf.padding)
|
||||||
.attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight)
|
.attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight)
|
||||||
.attr('fill', 'white')
|
.attr('fill', 'white')
|
||||||
|
@@ -21,7 +21,7 @@ export const draw = function (txt, id, ver) {
|
|||||||
|
|
||||||
const g = svg.append('g')
|
const g = svg.append('g')
|
||||||
|
|
||||||
g.append('text') // text label for the x axis
|
g.append('text') // text label for the x axis
|
||||||
.attr('x', 100)
|
.attr('x', 100)
|
||||||
.attr('y', 40)
|
.attr('y', 40)
|
||||||
.attr('class', 'version')
|
.attr('class', 'version')
|
||||||
|
@@ -64,9 +64,9 @@ export const draw = function (text, id) {
|
|||||||
.domain([d3.min(taskArray, function (d) {
|
.domain([d3.min(taskArray, function (d) {
|
||||||
return d.startTime
|
return d.startTime
|
||||||
}),
|
}),
|
||||||
d3.max(taskArray, function (d) {
|
d3.max(taskArray, function (d) {
|
||||||
return d.endTime
|
return d.endTime
|
||||||
})])
|
})])
|
||||||
.rangeRound([0, w - conf.leftPadding - conf.rightPadding])
|
.rangeRound([0, w - conf.leftPadding - conf.rightPadding])
|
||||||
|
|
||||||
let categories = []
|
let categories = []
|
||||||
|
@@ -209,7 +209,7 @@ const drawMessage = function (elem, startx, stopx, verticalPos, msg) {
|
|||||||
const g = elem.append('g')
|
const g = elem.append('g')
|
||||||
const txtCenter = startx + (stopx - startx) / 2
|
const txtCenter = startx + (stopx - startx) / 2
|
||||||
|
|
||||||
const textElem = g.append('text') // text label for the x axis
|
const textElem = g.append('text') // text label for the x axis
|
||||||
.attr('x', txtCenter)
|
.attr('x', txtCenter)
|
||||||
.attr('y', verticalPos - 7)
|
.attr('y', verticalPos - 7)
|
||||||
.style('text-anchor', 'middle')
|
.style('text-anchor', 'middle')
|
||||||
@@ -258,7 +258,7 @@ const drawMessage = function (elem, startx, stopx, verticalPos, msg) {
|
|||||||
|
|
||||||
line.attr('stroke-width', 2)
|
line.attr('stroke-width', 2)
|
||||||
line.attr('stroke', 'black')
|
line.attr('stroke', 'black')
|
||||||
line.style('fill', 'none') // remove any fill colour
|
line.style('fill', 'none') // remove any fill colour
|
||||||
if (msg.type === parser.yy.LINETYPE.SOLID || msg.type === parser.yy.LINETYPE.DOTTED) {
|
if (msg.type === parser.yy.LINETYPE.SOLID || msg.type === parser.yy.LINETYPE.DOTTED) {
|
||||||
line.attr('marker-end', 'url(' + url + '#arrowhead)')
|
line.attr('marker-end', 'url(' + url + '#arrowhead)')
|
||||||
}
|
}
|
||||||
|
@@ -150,7 +150,7 @@ export const drawLoop = function (elem, bounds, labelText, conf) {
|
|||||||
txt.x = bounds.startx
|
txt.x = bounds.startx
|
||||||
txt.y = bounds.starty
|
txt.y = bounds.starty
|
||||||
txt.labelMargin = 1.5 * 10 // This is the small box that says "loop"
|
txt.labelMargin = 1.5 * 10 // This is the small box that says "loop"
|
||||||
txt.class = 'labelText' // Its size & position are fixed.
|
txt.class = 'labelText' // Its size & position are fixed.
|
||||||
|
|
||||||
drawLabel(g, txt)
|
drawLabel(g, txt)
|
||||||
|
|
||||||
|
@@ -64,7 +64,7 @@ const init = function () {
|
|||||||
nodes = nodes === undefined ? document.querySelectorAll('.mermaid')
|
nodes = nodes === undefined ? document.querySelectorAll('.mermaid')
|
||||||
: typeof nodes === 'string' ? document.querySelectorAll(nodes)
|
: typeof nodes === 'string' ? document.querySelectorAll(nodes)
|
||||||
: nodes instanceof window.Node ? [nodes]
|
: nodes instanceof window.Node ? [nodes]
|
||||||
: nodes // Last case - sequence config was passed pick next
|
: nodes // Last case - sequence config was passed pick next
|
||||||
|
|
||||||
if (typeof global.mermaid_config !== 'undefined') {
|
if (typeof global.mermaid_config !== 'undefined') {
|
||||||
mermaidAPI.initialize(global.mermaid_config)
|
mermaidAPI.initialize(global.mermaid_config)
|
||||||
|
@@ -32,6 +32,7 @@ const lessRule = { // load less to string
|
|||||||
|
|
||||||
export const jsConfig = () => {
|
export const jsConfig = () => {
|
||||||
return {
|
return {
|
||||||
|
mode: 'development',
|
||||||
target: 'web',
|
target: 'web',
|
||||||
entry: {
|
entry: {
|
||||||
mermaid: './src/mermaid.js'
|
mermaid: './src/mermaid.js'
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
import { jsConfig } from './webpack.config.base'
|
import { jsConfig } from './webpack.config.base'
|
||||||
|
|
||||||
const minConfig = jsConfig()
|
const minConfig = jsConfig()
|
||||||
|
minConfig.mode = 'production'
|
||||||
minConfig.output.filename = '[name].min.js'
|
minConfig.output.filename = '[name].min.js'
|
||||||
|
|
||||||
export default [minConfig]
|
export default [minConfig]
|
||||||
|
Reference in New Issue
Block a user