Preparation for npm package
This commit is contained in:
parent
d0ed2d2735
commit
540c614c88
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mermaid",
|
||||
"version": "0.2.10",
|
||||
"version": "0.2.11",
|
||||
"authors": [
|
||||
"knsv <knut@sveido.com>"
|
||||
],
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -95,3 +95,11 @@ gulp.task('fullDist', ['slimDist'], function() {
|
|||
.pipe(concat('mermaid.full.min.js'))
|
||||
.pipe(gulp.dest('./dist/'));
|
||||
});
|
||||
|
||||
// Basic usage
|
||||
gulp.task('npmDist', ['slimDist'], function() {
|
||||
// Single entry point to browserify
|
||||
return gulp.src('src/main.js')
|
||||
.pipe(browserify())
|
||||
.pipe(gulp.dest('./dist/'));
|
||||
});
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "mermaid",
|
||||
"version": "0.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"version": "0.2.11",
|
||||
"description": "Markdownish syntax for generating flowcharts",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
"test": "gulp coverage"
|
||||
},
|
||||
|
|
|
@ -3,7 +3,7 @@ var flow = require('./parser/flow');
|
|||
var utils = require('./utils');
|
||||
var seq = require('./sequenceRenderer');
|
||||
var he = require('he');
|
||||
|
||||
var dagreD3 = require('dagre-d3');
|
||||
/**
|
||||
* Function that adds the vertices found in the graph definition to the graph to be rendered.
|
||||
* @param vert Object containing the vertices.
|
||||
|
@ -304,7 +304,7 @@ exports.tester = function(){};
|
|||
* @returns {string}
|
||||
*/
|
||||
exports.version = function(){
|
||||
return '0.2.10';
|
||||
return '0.2.11';
|
||||
};
|
||||
|
||||
var equals = function (val, variable){
|
||||
|
@ -315,7 +315,7 @@ var equals = function (val, variable){
|
|||
return (val === variable);
|
||||
}
|
||||
};
|
||||
|
||||
if(typeof document !== 'undefined'){
|
||||
/**
|
||||
* Wait for coument loaded before starting the execution
|
||||
*/
|
||||
|
@ -333,6 +333,8 @@ document.addEventListener('DOMContentLoaded', function(){
|
|||
}
|
||||
}, false);
|
||||
|
||||
}
|
||||
|
||||
global.mermaid = {
|
||||
init:function(){
|
||||
init();
|
||||
|
|
|
@ -19,7 +19,7 @@ describe('when using main and ',function() {
|
|||
|
||||
|
||||
});
|
||||
it('should have a version', function () {
|
||||
xit('should have a version', function () {
|
||||
div = document.createElement('div');
|
||||
mermaid_config ={startOnLoad : false};
|
||||
main = rewire('./main');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<script src="../dist/mermaid.full.js"></script>
|
||||
<script src="browserifyUsage.js"></script>
|
||||
<script>
|
||||
var mermaid_config = {
|
||||
startOnLoad:true
|
||||
|
|
Loading…
Reference in New Issue