add license in rollup

This commit is contained in:
Tony Brix 2019-11-06 11:54:31 -06:00
parent 2ea16d432e
commit a4652f1363
14 changed files with 63 additions and 133 deletions

View File

@ -1,3 +1,9 @@
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) : typeof define === 'function' && define.amd ? define(factory) :
@ -73,12 +79,6 @@
changeDefaults: changeDefaults changeDefaults: changeDefaults
}; };
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
/** /**
* Helpers * Helpers
*/ */
@ -340,12 +340,6 @@
checkSanitizeDeprecation: checkSanitizeDeprecation checkSanitizeDeprecation: checkSanitizeDeprecation
}; };
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
var noop$1 = helpers.noop, var noop$1 = helpers.noop,
edit$1 = helpers.edit, edit$1 = helpers.edit,
merge$1 = helpers.merge; merge$1 = helpers.merge;
@ -501,12 +495,6 @@
inline: inline inline: inline
}; };
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
var defaults$1 = defaults_1.defaults; var defaults$1 = defaults_1.defaults;
var block$1 = regexp.block; var block$1 = regexp.block;
var rtrim$1 = helpers.rtrim, var rtrim$1 = helpers.rtrim,
@ -885,12 +873,6 @@
return Lexer; return Lexer;
}(); }();
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
var defaults$2 = defaults_1.defaults; var defaults$2 = defaults_1.defaults;
var cleanUrl$1 = helpers.cleanUrl, var cleanUrl$1 = helpers.cleanUrl,
escape$2 = helpers.escape; escape$2 = helpers.escape;
@ -1064,12 +1046,6 @@
return Renderer; return Renderer;
}(); }();
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
/** /**
* Slugger generates header id * Slugger generates header id
*/ */
@ -1108,12 +1084,6 @@
return Slugger; return Slugger;
}(); }();
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
var defaults$3 = defaults_1.defaults; var defaults$3 = defaults_1.defaults;
var inline$1 = regexp.inline; var inline$1 = regexp.inline;
var findClosingBracket$1 = helpers.findClosingBracket, var findClosingBracket$1 = helpers.findClosingBracket,
@ -1426,12 +1396,6 @@
return InlineLexer; return InlineLexer;
}(); }();
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
/** /**
* TextRenderer * TextRenderer
* returns only the textual part of the token * returns only the textual part of the token
@ -1489,12 +1453,6 @@
return TextRenderer; return TextRenderer;
}(); }();
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
var defaults$4 = defaults_1.defaults; var defaults$4 = defaults_1.defaults;
var merge$2 = helpers.merge, var merge$2 = helpers.merge,
unescape$1 = helpers.unescape; unescape$1 = helpers.unescape;
@ -1735,12 +1693,6 @@
return Parser; return Parser;
}(); }();
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
var merge$3 = helpers.merge, var merge$3 = helpers.merge,
checkSanitizeDeprecation$1 = helpers.checkSanitizeDeprecation, checkSanitizeDeprecation$1 = helpers.checkSanitizeDeprecation,
escape$4 = helpers.escape; escape$4 = helpers.escape;

20
marked.min.js vendored

File diff suppressed because one or more lines are too long

43
package-lock.json generated
View File

@ -1129,6 +1129,12 @@
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true "dev": true
}, },
"commenting": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/commenting/-/commenting-1.1.0.tgz",
"integrity": "sha512-YeNK4tavZwtH7jEgK1ZINXzLKm6DZdEMfsaaieOsCAN0S8vsY7UeuO3Q7d/M018EFgE+IeUAuBOKkFccBZsUZA==",
"dev": true
},
"commonmark": { "commonmark": {
"version": "0.29.0", "version": "0.29.0",
"resolved": "https://registry.npmjs.org/commonmark/-/commonmark-0.29.0.tgz", "resolved": "https://registry.npmjs.org/commonmark/-/commonmark-0.29.0.tgz",
@ -2316,6 +2322,12 @@
} }
} }
}, },
"moment": {
"version": "2.24.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
"integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==",
"dev": true
},
"ms": { "ms": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@ -2804,6 +2816,37 @@
"rollup-pluginutils": "^2.8.1" "rollup-pluginutils": "^2.8.1"
} }
}, },
"rollup-plugin-license": {
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-0.12.1.tgz",
"integrity": "sha512-zT8UO+Tc+DAVQHM5qeX4jnuHzTtDUYJ/8AHzUgVgqYrx5Wj5kHlvoZNaQqg7hOQbjSuHuJFlQGZmxxSQq2WMqA==",
"dev": true,
"requires": {
"commenting": "1.1.0",
"glob": "7.1.4",
"lodash": "4.17.15",
"magic-string": "0.25.3",
"mkdirp": "0.5.1",
"moment": "2.24.0"
},
"dependencies": {
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
},
"magic-string": {
"version": "0.25.3",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz",
"integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==",
"dev": true,
"requires": {
"sourcemap-codec": "^1.4.4"
}
}
}
},
"rollup-pluginutils": { "rollup-pluginutils": {
"version": "2.8.2", "version": "2.8.2",
"resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz",

View File

@ -49,6 +49,7 @@
"rollup": "^1.26.3", "rollup": "^1.26.3",
"rollup-plugin-babel": "^4.3.3", "rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-license": "^0.12.1",
"uglify-js": "^3.6.8" "uglify-js": "^3.6.8"
}, },
"scripts": { "scripts": {

View File

@ -1,5 +1,6 @@
const commonjs = require('rollup-plugin-commonjs'); const commonjs = require('rollup-plugin-commonjs');
const babel = require('rollup-plugin-babel'); const babel = require('rollup-plugin-babel');
const license = require('rollup-plugin-license');
module.exports = { module.exports = {
input: 'src/marked.js', input: 'src/marked.js',
@ -9,6 +10,13 @@ module.exports = {
name: 'marked' name: 'marked'
}, },
plugins: [ plugins: [
license({
banner: `
marked - a markdown parser
Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
https://github.com/markedjs/marked
`
}),
commonjs(), commonjs(),
babel({ babel({
presets: ['@babel/preset-env'] presets: ['@babel/preset-env']

View File

@ -1,9 +1,3 @@
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
const Renderer = require('./Renderer.js'); const Renderer = require('./Renderer.js');
const { defaults } = require('./defaults.js'); const { defaults } = require('./defaults.js');
const { inline } = require('./regexp.js'); const { inline } = require('./regexp.js');
@ -15,7 +9,6 @@ const {
/** /**
* Inline Lexer & Compiler * Inline Lexer & Compiler
*/ */
module.exports = class InlineLexer { module.exports = class InlineLexer {
constructor(links, options) { constructor(links, options) {
this.options = options || defaults; this.options = options || defaults;

View File

@ -1,9 +1,3 @@
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
const { defaults } = require('./defaults.js'); const { defaults } = require('./defaults.js');
const { block } = require('./regexp.js'); const { block } = require('./regexp.js');
const { const {
@ -15,7 +9,6 @@ const {
/** /**
* Block Lexer * Block Lexer
*/ */
module.exports = class Lexer { module.exports = class Lexer {
constructor(options) { constructor(options) {
this.tokens = []; this.tokens = [];

View File

@ -1,9 +1,3 @@
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
const Renderer = require('./Renderer.js'); const Renderer = require('./Renderer.js');
const Slugger = require('./Slugger.js'); const Slugger = require('./Slugger.js');
const InlineLexer = require('./InlineLexer.js'); const InlineLexer = require('./InlineLexer.js');
@ -17,7 +11,6 @@ const {
/** /**
* Parsing & Compiling * Parsing & Compiling
*/ */
module.exports = class Parser { module.exports = class Parser {
constructor(options) { constructor(options) {
this.tokens = []; this.tokens = [];

View File

@ -1,9 +1,3 @@
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
const { defaults } = require('./defaults.js'); const { defaults } = require('./defaults.js');
const { const {
cleanUrl, cleanUrl,
@ -13,7 +7,6 @@ const {
/** /**
* Renderer * Renderer
*/ */
module.exports = class Renderer { module.exports = class Renderer {
constructor(options) { constructor(options) {
this.options = options || defaults; this.options = options || defaults;

View File

@ -1,13 +1,6 @@
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
/** /**
* Slugger generates header id * Slugger generates header id
*/ */
module.exports = class Slugger { module.exports = class Slugger {
constructor() { constructor() {
this.seen = {}; this.seen = {};

View File

@ -1,14 +1,7 @@
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
/** /**
* TextRenderer * TextRenderer
* returns only the textual part of the token * returns only the textual part of the token
*/ */
module.exports = class TextRenderer { module.exports = class TextRenderer {
// no need for block level renderers // no need for block level renderers
strong(text) { strong(text) {

View File

@ -1,13 +1,6 @@
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
/** /**
* Helpers * Helpers
*/ */
function escape(html, encode) { function escape(html, encode) {
if (encode) { if (encode) {
if (escape.escapeTest.test(html)) { if (escape.escapeTest.test(html)) {

View File

@ -1,9 +1,3 @@
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
const Lexer = require('./Lexer.js'); const Lexer = require('./Lexer.js');
const Parser = require('./Parser.js'); const Parser = require('./Parser.js');
const Renderer = require('./Renderer.js'); const Renderer = require('./Renderer.js');
@ -24,7 +18,6 @@ const {
/** /**
* Marked * Marked
*/ */
function marked(src, opt, callback) { function marked(src, opt, callback) {
// throw error in case of non string input // throw error in case of non string input
if (typeof src === 'undefined' || src === null) { if (typeof src === 'undefined' || src === null) {

View File

@ -1,9 +1,3 @@
/**
* marked - a markdown parser
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
const { const {
noop, noop,
edit, edit,
@ -13,7 +7,6 @@ const {
/** /**
* Block-Level Grammar * Block-Level Grammar
*/ */
const block = { const block = {
newline: /^\n+/, newline: /^\n+/,
code: /^( {4}[^\n]+\n*)+/, code: /^( {4}[^\n]+\n*)+/,
@ -136,7 +129,6 @@ block.pedantic = merge({}, block.normal, {
/** /**
* Inline-Level Grammar * Inline-Level Grammar
*/ */
const inline = { const inline = {
escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/,