Skip to content

Commit 3d41ff2

Browse files
KuthorXrichardlau
authored andcommitted
tools: add banner to lint-md.js by rollup.config.js
PR-URL: #34233 Reviewed-By: Rich Trott <[email protected]>
1 parent 8c207c6 commit 3d41ff2

File tree

2 files changed

+129
-61
lines changed

2 files changed

+129
-61
lines changed

tools/lint-md.js

+121-61
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
'use strict';
22

3+
// Don't change this file manually,
4+
// it is generated from tools/node-lint-md-cli-rollup
5+
36
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
47

58
var stream = _interopDefault(require('stream'));
@@ -16750,9 +16753,9 @@ var colorName$1 = {
1675016753
"bisque": [255, 228, 196],
1675116754
"black": [0, 0, 0],
1675216755
"blanchedalmond": [255, 235, 205],
16753-
"blue": [0, 0, 255],
16754-
"blueviolet": [138, 43, 226],
16755-
"brown": [165, 42, 42],
16756+
"blue": [0, 0, 255],
16757+
"blueviolet": [138, 43, 226],
16758+
"brown": [165, 42, 42],
1675616759
"burlywood": [222, 184, 135],
1675716760
"cadetblue": [95, 158, 160],
1675816761
"chartreuse": [127, 255, 0],
@@ -16879,9 +16882,9 @@ var colorName$1 = {
1687916882
"springgreen": [0, 255, 127],
1688016883
"steelblue": [70, 130, 180],
1688116884
"tan": [210, 180, 140],
16882-
"teal": [0, 128, 128],
16883-
"thistle": [216, 191, 216],
16884-
"tomato": [255, 99, 71],
16885+
"teal": [0, 128, 128],
16886+
"thistle": [216, 191, 216],
16887+
"tomato": [255, 99, 71],
1688516888
"turquoise": [64, 224, 208],
1688616889
"violet": [238, 130, 238],
1688716890
"wheat": [245, 222, 179],
@@ -43322,10 +43325,65 @@ function stringify$6(options) {
4332243325

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

43325-
const name$1 = "remark";
43326-
const version$1 = "12.0.0";
43328+
const _args = [
43329+
[
43330+
43331+
"/Users/bytedance/Documents/code/github/node/tools/node-lint-md-cli-rollup"
43332+
]
43333+
];
43334+
const _from = "[email protected]";
43335+
const _id = "[email protected]";
43336+
const _inBundle = false;
43337+
const _integrity = "sha512-oX4lMIS0csgk8AEbzY0h2jdR0ngiCHOpwwpxjmRa5TqAkeknY+tkhjRJGZqnCmvyuWh55/0SW5WY3R3nn3PH9A==";
43338+
const _location = "/remark";
43339+
const _phantomChildren = {
43340+
};
43341+
const _requested = {
43342+
type: "version",
43343+
registry: true,
43344+
43345+
name: "remark",
43346+
escapedName: "remark",
43347+
rawSpec: "12.0.0",
43348+
saveSpec: null,
43349+
fetchSpec: "12.0.0"
43350+
};
43351+
const _requiredBy = [
43352+
"/"
43353+
];
43354+
const _resolved = "https://registry.npmjs.org/remark/-/remark-12.0.0.tgz";
43355+
const _spec = "12.0.0";
43356+
const _where = "/Users/bytedance/Documents/code/github/node/tools/node-lint-md-cli-rollup";
43357+
const author = {
43358+
name: "Titus Wormer",
43359+
43360+
url: "https://wooorm.com"
43361+
};
43362+
const bugs = {
43363+
url: "https://github.com/remarkjs/remark/issues"
43364+
};
43365+
const contributors = [
43366+
{
43367+
name: "Titus Wormer",
43368+
43369+
url: "https://wooorm.com"
43370+
}
43371+
];
43372+
const dependencies = {
43373+
"remark-parse": "^8.0.0",
43374+
"remark-stringify": "^8.0.0",
43375+
unified: "^9.0.0"
43376+
};
4332743377
const description = "Markdown processor powered by plugins part of the unified collective";
43328-
const license = "MIT";
43378+
const files = [
43379+
"index.js",
43380+
"types/index.d.ts"
43381+
];
43382+
const funding = {
43383+
type: "opencollective",
43384+
url: "https://opencollective.com/unified"
43385+
};
43386+
const homepage = "https://remark.js.org";
4332943387
const keywords = [
4333043388
"unified",
4333143389
"remark",
@@ -43341,77 +43399,79 @@ const keywords = [
4334143399
"compile",
4334243400
"process"
4334343401
];
43344-
const homepage = "https://remark.js.org";
43345-
const repository = "https://github.com/remarkjs/remark/tree/master/packages/remark";
43346-
const bugs = "https://github.com/remarkjs/remark/issues";
43347-
const funding = {
43348-
type: "opencollective",
43349-
url: "https://opencollective.com/unified"
43350-
};
43351-
const author = "Titus Wormer <[email protected]> (https://wooorm.com)";
43352-
const contributors = [
43353-
"Titus Wormer <[email protected]> (https://wooorm.com)"
43354-
];
43355-
const files = [
43356-
"index.js",
43357-
"types/index.d.ts"
43358-
];
43359-
const types = "types/index.d.ts";
43360-
const dependencies = {
43361-
"remark-parse": "^8.0.0",
43362-
"remark-stringify": "^8.0.0",
43363-
unified: "^9.0.0"
43402+
const license = "MIT";
43403+
const name$1 = "remark";
43404+
const repository = {
43405+
type: "git",
43406+
url: "https://github.com/remarkjs/remark/tree/master/packages/remark"
4336443407
};
4336543408
const scripts = {
4336643409
test: "tape test.js"
4336743410
};
43411+
const types = "types/index.d.ts";
43412+
const version$1 = "12.0.0";
4336843413
const xo = false;
43369-
const _resolved = "https://registry.npmjs.org/remark/-/remark-12.0.0.tgz";
43370-
const _integrity = "sha512-oX4lMIS0csgk8AEbzY0h2jdR0ngiCHOpwwpxjmRa5TqAkeknY+tkhjRJGZqnCmvyuWh55/0SW5WY3R3nn3PH9A==";
43371-
const _from = "[email protected]";
4337243414
var _package = {
43373-
name: name$1,
43374-
version: version$1,
43375-
description: description,
43376-
license: license,
43377-
keywords: keywords,
43378-
homepage: homepage,
43379-
repository: repository,
43380-
bugs: bugs,
43381-
funding: funding,
43415+
_args: _args,
43416+
_from: _from,
43417+
_id: _id,
43418+
_inBundle: _inBundle,
43419+
_integrity: _integrity,
43420+
_location: _location,
43421+
_phantomChildren: _phantomChildren,
43422+
_requested: _requested,
43423+
_requiredBy: _requiredBy,
43424+
_resolved: _resolved,
43425+
_spec: _spec,
43426+
_where: _where,
4338243427
author: author,
43428+
bugs: bugs,
4338343429
contributors: contributors,
43384-
files: files,
43385-
types: types,
4338643430
dependencies: dependencies,
43431+
description: description,
43432+
files: files,
43433+
funding: funding,
43434+
homepage: homepage,
43435+
keywords: keywords,
43436+
license: license,
43437+
name: name$1,
43438+
repository: repository,
4338743439
scripts: scripts,
43388-
xo: xo,
43389-
_resolved: _resolved,
43390-
_integrity: _integrity,
43391-
_from: _from
43440+
types: types,
43441+
version: version$1,
43442+
xo: xo
4339243443
};
4339343444

4339443445
var _package$1 = /*#__PURE__*/Object.freeze({
4339543446
__proto__: null,
43396-
name: name$1,
43397-
version: version$1,
43398-
description: description,
43399-
license: license,
43400-
keywords: keywords,
43401-
homepage: homepage,
43402-
repository: repository,
43403-
bugs: bugs,
43404-
funding: funding,
43447+
_args: _args,
43448+
_from: _from,
43449+
_id: _id,
43450+
_inBundle: _inBundle,
43451+
_integrity: _integrity,
43452+
_location: _location,
43453+
_phantomChildren: _phantomChildren,
43454+
_requested: _requested,
43455+
_requiredBy: _requiredBy,
43456+
_resolved: _resolved,
43457+
_spec: _spec,
43458+
_where: _where,
4340543459
author: author,
43460+
bugs: bugs,
4340643461
contributors: contributors,
43407-
files: files,
43408-
types: types,
4340943462
dependencies: dependencies,
43463+
description: description,
43464+
files: files,
43465+
funding: funding,
43466+
homepage: homepage,
43467+
keywords: keywords,
43468+
license: license,
43469+
name: name$1,
43470+
repository: repository,
4341043471
scripts: scripts,
43472+
types: types,
43473+
version: version$1,
4341143474
xo: xo,
43412-
_resolved: _resolved,
43413-
_integrity: _integrity,
43414-
_from: _from,
4341543475
'default': _package
4341643476
});
4341743477

tools/node-lint-md-cli-rollup/rollup.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,13 @@ module.exports = {
4646
}),
4747
resolve(), // tells Rollup how to find date-fns in node_modules
4848
commonjs(), // Converts date-fns to ES modules
49+
{
50+
name: 'banner',
51+
renderChunk(code) {
52+
const banner = '// Don\'t change this file manually,\n' +
53+
'// it is generated from tools/node-lint-md-cli-rollup';
54+
return code.replace('\'use strict\';', '\'use strict\';\n\n' + banner);
55+
}
56+
},
4957
]
5058
};

0 commit comments

Comments
 (0)