Rebuild vendor

This commit is contained in:
eight 2020-02-13 01:41:39 +08:00
parent 3a785e935c
commit 1cdc35f0cb
17 changed files with 230 additions and 104 deletions

View File

@ -27,10 +27,16 @@ const files = {
'addon/search/matchesonscrollbar.*', 'addon/search/matchesonscrollbar.*',
'addon/search/searchcursor.js', 'addon/search/searchcursor.js',
'addon/selection/active-line.js', 'addon/selection/active-line.js',
'theme' 'keymap/*',
'lib/*',
'mode/css',
'mode/javascript',
'mode/stylus',
'theme/*'
], ],
'jsonlint': [ 'jsonlint': [
'lib/jsonlint.js → jsonlint.js' 'lib/jsonlint.js → jsonlint.js',
'README.md → LICENSE'
], ],
'less-bundle': [ 'less-bundle': [
'dist/less.min.js → less.min.js' 'dist/less.min.js → less.min.js'
@ -42,7 +48,8 @@ const files = {
'dist/semver.js → semver.js' 'dist/semver.js → semver.js'
], ],
'stylelint-bundle': [ 'stylelint-bundle': [
'stylelint-bundle.min.js' 'stylelint-bundle.min.js',
'https://github.com/stylelint/stylelint/raw/{VERSION}/LICENSE → LICENSE'
], ],
'stylus-lang-bundle': [ 'stylus-lang-bundle': [
'stylus.min.js' 'stylus.min.js'
@ -68,7 +75,7 @@ async function main() {
// README // README
await fse.outputFile(`vendor/${pkg}/README.md`, generateReadme(pkg, fetched, copied)); await fse.outputFile(`vendor/${pkg}/README.md`, generateReadme(pkg, fetched, copied));
// LICENSE // LICENSE
await fse.copy(`node_modules/${pkg}/LICENSE`, `vendor/${pkg}/LICENSE`); await copyLicense(pkg);
} }
console.log('\x1b[32m%s\x1b[0m', 'updating codemirror themes list...'); console.log('\x1b[32m%s\x1b[0m', 'updating codemirror themes list...');
await fse.outputFile('edit/codemirror-themes.js', await generateThemeList()); await fse.outputFile('edit/codemirror-themes.js', await generateThemeList());
@ -88,6 +95,20 @@ async function generateThemeList() {
`.replace(/"/g, "'") + '\n'; `.replace(/"/g, "'") + '\n';
} }
async function copyLicense(pkg) {
try {
await fse.access(`vendor/${pkg}/LICENSE`);
return;
} catch (err) {
// pass
}
for (const file of await glob(`node_modules/${pkg}/LICEN[SC]E*`)) {
await fse.copy(file, `vendor/${pkg}/LICENSE`);
return;
}
throw new Error(`cannot find license file for ${pkg}`);
}
async function buildFiles(pkg, patterns) { async function buildFiles(pkg, patterns) {
const fetchedFiles = []; const fetchedFiles = [];
const copiedFiles = []; const copiedFiles = [];
@ -96,14 +117,14 @@ async function buildFiles(pkg, patterns) {
const [src, dest] = pattern.split(/\s*→\s*/); const [src, dest] = pattern.split(/\s*→\s*/);
if (src.startsWith('http')) { if (src.startsWith('http')) {
const content = await (await fetch(src)).text(); const content = await (await fetch(src)).text();
fse.outputFile(`vendor/${pkg}/${dest}`, content); await fse.outputFile(`vendor/${pkg}/${dest}`, content);
fetchedFiles.push([src, dest]); fetchedFiles.push([src, dest]);
} else { } else {
for (const file of glob(`node_modules/${pkg}/${src}`)) { for (const file of await glob(`node_modules/${pkg}/${src}`)) {
if (!dest) { if (dest) {
await fse.copy(file, path.join('vendor', path.relative('node_modules', file))); await fse.copy(file, `vendor/${pkg}/${dest}`);
} else { } else {
await fse.copy(file, dest); await fse.copy(file, path.join('vendor', path.relative('node_modules', file)));
} }
copiedFiles.push([path.relative(`node_modules/${pkg}`, file), dest]); copiedFiles.push([path.relative(`node_modules/${pkg}`, file), dest]);
} }

View File

@ -1,8 +1,3 @@
https://codemirror.net/
https://github.com/codemirror/CodeMirror/blob/master/LICENSE
MIT License MIT License
Copyright (C) 2017 by Marijn Haverbeke <marijnh@gmail.com> and others Copyright (C) 2017 by Marijn Haverbeke <marijnh@gmail.com> and others

View File

@ -1,3 +1,97 @@
## CodeMirror v5.51.0 ## codemirror v5.51.0
Only files & folders that exist in the `vendor/codemirror` folder are copied from the `node_modules/codemirror` folder. Except all theme files are copied, in case new themes have been added. Following files are copied from npm (node_modules):
* addon\comment\comment.js
* addon\dialog
* addon\edit\closebrackets.js
* addon\edit\matchbrackets.js
* addon\fold\brace-fold.js
* addon\fold\comment-fold.js
* addon\fold\foldcode.js
* addon\fold\foldgutter.css
* addon\fold\foldgutter.js
* addon\fold\indent-fold.js
* addon\hint\css-hint.js
* addon\hint\show-hint.css
* addon\hint\show-hint.js
* addon\lint\css-lint.js
* addon\lint\json-lint.js
* addon\lint\lint.css
* addon\lint\lint.js
* addon\scroll\annotatescrollbar.js
* addon\search\matchesonscrollbar.css
* addon\search\matchesonscrollbar.js
* addon\search\searchcursor.js
* addon\selection\active-line.js
* keymap\emacs.js
* keymap\sublime.js
* keymap\vim.js
* lib\codemirror.css
* lib\codemirror.js
* mode\css
* mode\javascript
* mode\stylus
* theme\3024-day.css
* theme\3024-night.css
* theme\abcdef.css
* theme\ambiance-mobile.css
* theme\ambiance.css
* theme\ayu-dark.css
* theme\ayu-mirage.css
* theme\base16-dark.css
* theme\base16-light.css
* theme\bespin.css
* theme\blackboard.css
* theme\cobalt.css
* theme\colorforth.css
* theme\darcula.css
* theme\dracula.css
* theme\duotone-dark.css
* theme\duotone-light.css
* theme\eclipse.css
* theme\elegant.css
* theme\erlang-dark.css
* theme\gruvbox-dark.css
* theme\hopscotch.css
* theme\icecoder.css
* theme\idea.css
* theme\isotope.css
* theme\lesser-dark.css
* theme\liquibyte.css
* theme\lucario.css
* theme\material-darker.css
* theme\material-ocean.css
* theme\material-palenight.css
* theme\material.css
* theme\mbo.css
* theme\mdn-like.css
* theme\midnight.css
* theme\monokai.css
* theme\moxer.css
* theme\neat.css
* theme\neo.css
* theme\night.css
* theme\nord.css
* theme\oceanic-next.css
* theme\panda-syntax.css
* theme\paraiso-dark.css
* theme\paraiso-light.css
* theme\pastel-on-dark.css
* theme\railscasts.css
* theme\rubyblue.css
* theme\seti.css
* theme\shadowfox.css
* theme\solarized.css
* theme\ssms.css
* theme\the-matrix.css
* theme\tomorrow-night-bright.css
* theme\tomorrow-night-eighties.css
* theme\ttcn.css
* theme\twilight.css
* theme\vibrant-ink.css
* theme\xq-dark.css
* theme\xq-light.css
* theme\yeti.css
* theme\yonce.css
* theme\zenburn.css

View File

@ -1,9 +1,5 @@
## db-to-cloud v0.4.5 ## db-to-cloud v0.4.5
Installed via npm - source code: Following files are copied from npm (node_modules):
https://github.com/eight04/db-to-cloud/tree/v0.4.5 * db-to-cloud.min.js: dist\db-to-cloud.min.js
Bundled code:
https://unpkg.com/db-to-cloud@0.4.5/dist/db-to-cloud.min.js

View File

@ -1,13 +1,64 @@
https://github.com/zaach/jison JSON Lint
https://github.com/zaach/jsonlint =========
A pure [JavaScript version](http://zaach.github.com/jsonlint/) of the service provided at [jsonlint.com](http://jsonlint.com).
Copyright (c) 2009-2014 Zachary Carter
## Command line interface
MIT LICENSE Install jsonlint with npm to use the command line interface:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: npm install jsonlint -g
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Validate a file like so:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. jsonlint myfile.json
or pipe input into stdin:
cat myfile.json | jsonlint
jsonlint will either report a syntax error with details or pretty print the source if it is valid.
### Options
$ jsonlint -h
Usage: jsonlint [file] [options]
file file to parse; otherwise uses stdin
Options:
-v, --version print version and exit
-s, --sort-keys sort object keys
-i, --in-place overwrite the file
-t CHAR, --indent CHAR character(s) to use for indentation [ ]
-c, --compact compact error display
-V, --validate a JSON schema to use for validation
-e, --environment which specification of JSON Schema the validation file uses [json-schema-draft-03]
-q, --quiet do not print the parsed json to STDOUT [false]
-p, --pretty-print force pretty printing even if invalid
## Module interface
I'm not sure why you wouldn't use the built in `JSON.parse` but you can use jsonlint from a CommonJS module:
var jsonlint = require("jsonlint");
jsonlint.parse('{"creative?": false}');
It returns the parsed object or throws an `Error`.
## Vim Plugins
* [Syntastic](http://www.vim.org/scripts/script.php?script_id=2736)
* [sourcebeautify](http://www.vim.org/scripts/script.php?script_id=4079)
## MIT License
Copyright (C) 2012 Zachary Carter
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,10 +1,6 @@
## Jsonlint v1.6.3 ## jsonlint v1.6.3
Jsonlint installed via npm - source repo: Following files are copied from npm (node_modules):
https://github.com/zaach/jsonlint/blob/v1.6.3/lib/jsonlint.js * jsonlint.js: lib\jsonlint.js
* LICENSE: README.md
If the link doesn't work, it is likely that the npm version and the release versions don't match:
- https://www.npmjs.com/package/jsonlint
- https://github.com/zaach/jsonlint/releases

View File

@ -1,5 +1,5 @@
## less-bundle v0.1.0 ## less-bundle v0.1.0
less-bundle installed via npm - source repo: Following files are copied from npm (node_modules):
https://github.com/openstyles/less-bundle/raw/v0.1.0/dist/less.min.js * less.min.js: dist\less.min.js

View File

@ -1,23 +1,13 @@
http://pieroxy.net/blog/pages/lz-string/index.html DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
https://github.com/pieroxy/lz-string/blob/master/LICENSE.txt Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net> DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
This work is free. You can redistribute it and/or modify it TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
under the terms of the WTFPL, Version 2
For more information see LICENSE.txt or http://www.wtfpl.net/
For more information, the home page: 0. You just DO WHAT THE FUCK YOU WANT TO.
http://pieroxy.net/blog/pages/lz-string/testing.html
LZ-based compression algorithm, version 1.4.4
Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>
This work is free. You can redistribute it and/or modify it
under the terms of the WTFPL, Version 2
For more information see LICENSE.txt or http://www.wtfpl.net/
For more information, the home page:
http://pieroxy.net/blog/pages/lz-string/testing.html
LZ-based compression algorithm, version 1.4.4

View File

@ -1,5 +1,5 @@
## Lz-string-unsafe v1.4.4-fork-1 ## lz-string-unsafe v1.4.4-fork-1
lz-string-unsafe installed via npm - source repo: Following files are copied from npm (node_modules):
https://github.com/openstyles/lz-string-unsafe/blob/v1.4.4-fork-1/lz-string-unsafe.min.js * lz-string-unsafe.min.js

View File

@ -1,8 +1,3 @@
https://github.com/openstyles/semver-bundle
https://github.com/openstyles/semver-bundle/blob/master/LICENSE
The ISC License The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors Copyright (c) Isaac Z. Schlueter and Contributors

View File

@ -1,5 +1,5 @@
## Semver-bundle v0.1.1 ## semver-bundle v0.1.1
semver-bundle installed via npm - source repo: Following files are copied from npm (node_modules):
https://github.com/openstyles/semver-bundle/blob/v0.1.1/dist/semver.js * semver.js: dist\semver.js

View File

@ -1,12 +1,6 @@
https://github.com/stylelint/stylelint
https://github.com/openstyles/stylelint-bundle/tree/v8.0.0
https://github.com/stylelint/stylelint/blob/master/LICENSE
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2015 - present Maxime Thirouin, David Clark & Richard Hallows Copyright (c) 2015 - 2017 Maxime Thirouin, David Clark & Richard Hallows
Permission is hereby granted, free of charge, to any person obtaining a copy of Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in this software and associated documentation files (the "Software"), to deal in

View File

@ -1,5 +1,9 @@
## Stylelint-bundle v8.0.0 ## stylelint-bundle v8.0.0
stylelint-bundle installed via npm - source repo: Following files are downloaded from HTTP:
https://github.com/openstyles/stylelint-bundle/blob/v8.0.0/stylelint-bundle.min.js * LICENSE: https://github.com/stylelint/stylelint/raw/8.0.0/LICENSE
Following files are copied from npm (node_modules):
* stylelint-bundle.min.js

View File

@ -1,11 +1,4 @@
http://stylus-lang.com/ (The MIT License)
https://github.com/stylus/stylus/
https://github.com/openstyles/stylus-lang-bundle
https://github.com/openstyles/stylus-lang-bundle/blob/master/LICENSE
The MIT License
Copyright (c) Automattic <developer.wordpress.com> Copyright (c) Automattic <developer.wordpress.com>

View File

@ -1,5 +1,5 @@
## Stylus-lang-bundle v0.54.5 ## stylus-lang-bundle v0.54.5
stylus-lang-bundle installed via npm - source repo: Following files are copied from npm (node_modules):
https://github.com/openstyles/stylus-lang-bundle/blob/v0.54.5/stylus.min.js * stylus.min.js

View File

@ -1,5 +1,5 @@
## usercss-meta v0.9.0 ## usercss-meta v0.9.0
usercss-meta installed via npm - source repo: Following files are copied from npm (node_modules):
https://unpkg.com/usercss-meta@0.9.0/dist/usercss-meta.min.js * usercss-meta.min.js: dist\usercss-meta.min.js

View File

@ -1,9 +1,6 @@
## uuid v3.3.3 ## uuid v3.4.0
Installed via npm - source code: Following files are downloaded from HTTP:
https://github.com/kelektiv/node-uuid/tree/v3.3.3 * uuid.min.js: https://bundle.run/uuid@3.4.0/v4.js
Bundled code:
https://bundle.run/uuid@3.3.3/v4.js