Skip to content

Commit

Permalink
tools: add banner to lint-md.js by rollup.config.js
Browse files Browse the repository at this point in the history
PR-URL: #34233
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
KuthorX authored and addaleax committed Sep 22, 2020
1 parent bde9fb8 commit 3e91519
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 61 deletions.
182 changes: 121 additions & 61 deletions tools/lint-md.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
'use strict';

// Don't change this file manually,
// it is generated from tools/node-lint-md-cli-rollup

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var stream = _interopDefault(require('stream'));
Expand Down Expand Up @@ -16750,9 +16753,9 @@ var colorName$1 = {
"bisque": [255, 228, 196],
"black": [0, 0, 0],
"blanchedalmond": [255, 235, 205],
"blue": [0, 0, 255],
"blueviolet": [138, 43, 226],
"brown": [165, 42, 42],
"blue": [0, 0, 255],
"blueviolet": [138, 43, 226],
"brown": [165, 42, 42],
"burlywood": [222, 184, 135],
"cadetblue": [95, 158, 160],
"chartreuse": [127, 255, 0],
Expand Down Expand Up @@ -16879,9 +16882,9 @@ var colorName$1 = {
"springgreen": [0, 255, 127],
"steelblue": [70, 130, 180],
"tan": [210, 180, 140],
"teal": [0, 128, 128],
"thistle": [216, 191, 216],
"tomato": [255, 99, 71],
"teal": [0, 128, 128],
"thistle": [216, 191, 216],
"tomato": [255, 99, 71],
"turquoise": [64, 224, 208],
"violet": [238, 130, 238],
"wheat": [245, 222, 179],
Expand Down Expand Up @@ -43322,10 +43325,65 @@ function stringify$6(options) {

var remark = unified_1().use(remarkParse).use(remarkStringify).freeze();

const name$1 = "remark";
const version$1 = "12.0.0";
const _args = [
[
"remark@12.0.0",
"/Users/bytedance/Documents/code/github/node/tools/node-lint-md-cli-rollup"
]
];
const _from = "remark@12.0.0";
const _id = "remark@12.0.0";
const _inBundle = false;
const _integrity = "sha512-oX4lMIS0csgk8AEbzY0h2jdR0ngiCHOpwwpxjmRa5TqAkeknY+tkhjRJGZqnCmvyuWh55/0SW5WY3R3nn3PH9A==";
const _location = "/remark";
const _phantomChildren = {
};
const _requested = {
type: "version",
registry: true,
raw: "remark@12.0.0",
name: "remark",
escapedName: "remark",
rawSpec: "12.0.0",
saveSpec: null,
fetchSpec: "12.0.0"
};
const _requiredBy = [
"/"
];
const _resolved = "https://registry.npmjs.org/remark/-/remark-12.0.0.tgz";
const _spec = "12.0.0";
const _where = "/Users/bytedance/Documents/code/github/node/tools/node-lint-md-cli-rollup";
const author = {
name: "Titus Wormer",
email: "tituswormer@gmail.com",
url: "https://wooorm.com"
};
const bugs = {
url: "https://github.com/remarkjs/remark/issues"
};
const contributors = [
{
name: "Titus Wormer",
email: "tituswormer@gmail.com",
url: "https://wooorm.com"
}
];
const dependencies = {
"remark-parse": "^8.0.0",
"remark-stringify": "^8.0.0",
unified: "^9.0.0"
};
const description = "Markdown processor powered by plugins part of the unified collective";
const license = "MIT";
const files = [
"index.js",
"types/index.d.ts"
];
const funding = {
type: "opencollective",
url: "https://opencollective.com/unified"
};
const homepage = "https://remark.js.org";
const keywords = [
"unified",
"remark",
Expand All @@ -43341,77 +43399,79 @@ const keywords = [
"compile",
"process"
];
const homepage = "https://remark.js.org";
const repository = "https://github.com/remarkjs/remark/tree/master/packages/remark";
const bugs = "https://github.com/remarkjs/remark/issues";
const funding = {
type: "opencollective",
url: "https://opencollective.com/unified"
};
const author = "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)";
const contributors = [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
];
const files = [
"index.js",
"types/index.d.ts"
];
const types = "types/index.d.ts";
const dependencies = {
"remark-parse": "^8.0.0",
"remark-stringify": "^8.0.0",
unified: "^9.0.0"
const license = "MIT";
const name$1 = "remark";
const repository = {
type: "git",
url: "https://github.com/remarkjs/remark/tree/master/packages/remark"
};
const scripts = {
test: "tape test.js"
};
const types = "types/index.d.ts";
const version$1 = "12.0.0";
const xo = false;
const _resolved = "https://registry.npmjs.org/remark/-/remark-12.0.0.tgz";
const _integrity = "sha512-oX4lMIS0csgk8AEbzY0h2jdR0ngiCHOpwwpxjmRa5TqAkeknY+tkhjRJGZqnCmvyuWh55/0SW5WY3R3nn3PH9A==";
const _from = "remark@12.0.0";
var _package = {
name: name$1,
version: version$1,
description: description,
license: license,
keywords: keywords,
homepage: homepage,
repository: repository,
bugs: bugs,
funding: funding,
_args: _args,
_from: _from,
_id: _id,
_inBundle: _inBundle,
_integrity: _integrity,
_location: _location,
_phantomChildren: _phantomChildren,
_requested: _requested,
_requiredBy: _requiredBy,
_resolved: _resolved,
_spec: _spec,
_where: _where,
author: author,
bugs: bugs,
contributors: contributors,
files: files,
types: types,
dependencies: dependencies,
description: description,
files: files,
funding: funding,
homepage: homepage,
keywords: keywords,
license: license,
name: name$1,
repository: repository,
scripts: scripts,
xo: xo,
_resolved: _resolved,
_integrity: _integrity,
_from: _from
types: types,
version: version$1,
xo: xo
};

var _package$1 = /*#__PURE__*/Object.freeze({
__proto__: null,
name: name$1,
version: version$1,
description: description,
license: license,
keywords: keywords,
homepage: homepage,
repository: repository,
bugs: bugs,
funding: funding,
_args: _args,
_from: _from,
_id: _id,
_inBundle: _inBundle,
_integrity: _integrity,
_location: _location,
_phantomChildren: _phantomChildren,
_requested: _requested,
_requiredBy: _requiredBy,
_resolved: _resolved,
_spec: _spec,
_where: _where,
author: author,
bugs: bugs,
contributors: contributors,
files: files,
types: types,
dependencies: dependencies,
description: description,
files: files,
funding: funding,
homepage: homepage,
keywords: keywords,
license: license,
name: name$1,
repository: repository,
scripts: scripts,
types: types,
version: version$1,
xo: xo,
_resolved: _resolved,
_integrity: _integrity,
_from: _from,
'default': _package
});

Expand Down
8 changes: 8 additions & 0 deletions tools/node-lint-md-cli-rollup/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,13 @@ module.exports = {
}),
resolve(), // tells Rollup how to find date-fns in node_modules
commonjs(), // Converts date-fns to ES modules
{
name: 'banner',
renderChunk(code) {
const banner = '// Don\'t change this file manually,\n' +
'// it is generated from tools/node-lint-md-cli-rollup';
return code.replace('\'use strict\';', '\'use strict\';\n\n' + banner);
}
},
]
};

0 comments on commit 3e91519

Please sign in to comment.