diff --git a/tools/build-vendor.js b/tools/build-vendor.js index 69c867f8..ad3f6f9a 100644 --- a/tools/build-vendor.js +++ b/tools/build-vendor.js @@ -27,10 +27,16 @@ const files = { 'addon/search/matchesonscrollbar.*', 'addon/search/searchcursor.js', 'addon/selection/active-line.js', - 'theme' + 'keymap/*', + 'lib/*', + 'mode/css', + 'mode/javascript', + 'mode/stylus', + 'theme/*' ], 'jsonlint': [ - 'lib/jsonlint.js → jsonlint.js' + 'lib/jsonlint.js → jsonlint.js', + 'README.md → LICENSE' ], 'less-bundle': [ 'dist/less.min.js → less.min.js' @@ -42,7 +48,8 @@ const files = { 'dist/semver.js → semver.js' ], 'stylelint-bundle': [ - 'stylelint-bundle.min.js' + 'stylelint-bundle.min.js', + 'https://github.com/stylelint/stylelint/raw/{VERSION}/LICENSE → LICENSE' ], 'stylus-lang-bundle': [ 'stylus.min.js' @@ -68,7 +75,7 @@ async function main() { // README await fse.outputFile(`vendor/${pkg}/README.md`, generateReadme(pkg, fetched, copied)); // 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...'); await fse.outputFile('edit/codemirror-themes.js', await generateThemeList()); @@ -88,6 +95,20 @@ async function generateThemeList() { `.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) { const fetchedFiles = []; const copiedFiles = []; @@ -96,14 +117,14 @@ async function buildFiles(pkg, patterns) { const [src, dest] = pattern.split(/\s*→\s*/); if (src.startsWith('http')) { const content = await (await fetch(src)).text(); - fse.outputFile(`vendor/${pkg}/${dest}`, content); + await fse.outputFile(`vendor/${pkg}/${dest}`, content); fetchedFiles.push([src, dest]); } else { - for (const file of glob(`node_modules/${pkg}/${src}`)) { - if (!dest) { - await fse.copy(file, path.join('vendor', path.relative('node_modules', file))); + for (const file of await glob(`node_modules/${pkg}/${src}`)) { + if (dest) { + await fse.copy(file, `vendor/${pkg}/${dest}`); } 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]); } diff --git a/vendor/codemirror/LICENSE b/vendor/codemirror/LICENSE index 60c90dc4..ff7db4b9 100644 --- a/vendor/codemirror/LICENSE +++ b/vendor/codemirror/LICENSE @@ -1,8 +1,3 @@ -https://codemirror.net/ - -https://github.com/codemirror/CodeMirror/blob/master/LICENSE - - MIT License Copyright (C) 2017 by Marijn Haverbeke and others diff --git a/vendor/codemirror/README.md b/vendor/codemirror/README.md index 8144ea4e..1d07a8fa 100644 --- a/vendor/codemirror/README.md +++ b/vendor/codemirror/README.md @@ -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 diff --git a/vendor/db-to-cloud/README.md b/vendor/db-to-cloud/README.md index 49b759a1..bab08836 100644 --- a/vendor/db-to-cloud/README.md +++ b/vendor/db-to-cloud/README.md @@ -1,9 +1,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 - -Bundled code: - -https://unpkg.com/db-to-cloud@0.4.5/dist/db-to-cloud.min.js +* db-to-cloud.min.js: dist\db-to-cloud.min.js diff --git a/vendor/jsonlint/LICENSE b/vendor/jsonlint/LICENSE index c8673112..58a1aa16 100644 --- a/vendor/jsonlint/LICENSE +++ b/vendor/jsonlint/LICENSE @@ -1,13 +1,64 @@ -https://github.com/zaach/jison -https://github.com/zaach/jsonlint - - -Copyright (c) 2009-2014 Zachary Carter - -MIT LICENSE - -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. +JSON Lint +========= + +A pure [JavaScript version](http://zaach.github.com/jsonlint/) of the service provided at [jsonlint.com](http://jsonlint.com). + +## Command line interface +Install jsonlint with npm to use the command line interface: + + npm install jsonlint -g + +Validate a file like so: + + 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. diff --git a/vendor/jsonlint/README.md b/vendor/jsonlint/README.md index 1a6770c2..514a292b 100644 --- a/vendor/jsonlint/README.md +++ b/vendor/jsonlint/README.md @@ -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 - -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 +* jsonlint.js: lib\jsonlint.js +* LICENSE: README.md diff --git a/vendor/less-bundle/README.md b/vendor/less-bundle/README.md index 6694300d..8c399f99 100644 --- a/vendor/less-bundle/README.md +++ b/vendor/less-bundle/README.md @@ -1,5 +1,5 @@ ## 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 diff --git a/vendor/lz-string-unsafe/LICENSE b/vendor/lz-string-unsafe/LICENSE index a54cec2e..082c994f 100644 --- a/vendor/lz-string-unsafe/LICENSE +++ b/vendor/lz-string-unsafe/LICENSE @@ -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 + 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 -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/ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -For more information, the home page: -http://pieroxy.net/blog/pages/lz-string/testing.html - -LZ-based compression algorithm, version 1.4.4 -Copyright (c) 2013 Pieroxy -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 + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/vendor/lz-string-unsafe/README.md b/vendor/lz-string-unsafe/README.md index f5a15bf1..121225d2 100644 --- a/vendor/lz-string-unsafe/README.md +++ b/vendor/lz-string-unsafe/README.md @@ -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 diff --git a/vendor/semver-bundle/LICENSE b/vendor/semver-bundle/LICENSE index 123857d8..19129e31 100644 --- a/vendor/semver-bundle/LICENSE +++ b/vendor/semver-bundle/LICENSE @@ -1,8 +1,3 @@ -https://github.com/openstyles/semver-bundle - -https://github.com/openstyles/semver-bundle/blob/master/LICENSE - - The ISC License Copyright (c) Isaac Z. Schlueter and Contributors diff --git a/vendor/semver-bundle/README.md b/vendor/semver-bundle/README.md index b06e7c83..92441f95 100644 --- a/vendor/semver-bundle/README.md +++ b/vendor/semver-bundle/README.md @@ -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 diff --git a/vendor/stylelint-bundle/LICENSE b/vendor/stylelint-bundle/LICENSE index e379fd67..2d1d9a05 100644 --- a/vendor/stylelint-bundle/LICENSE +++ b/vendor/stylelint-bundle/LICENSE @@ -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) -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 this software and associated documentation files (the "Software"), to deal in diff --git a/vendor/stylelint-bundle/README.md b/vendor/stylelint-bundle/README.md index a2b4b90c..9cffd6f9 100644 --- a/vendor/stylelint-bundle/README.md +++ b/vendor/stylelint-bundle/README.md @@ -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 diff --git a/vendor/stylus-lang-bundle/LICENSE b/vendor/stylus-lang-bundle/LICENSE index ce962fc4..74c027f4 100644 --- a/vendor/stylus-lang-bundle/LICENSE +++ b/vendor/stylus-lang-bundle/LICENSE @@ -1,11 +1,4 @@ -http://stylus-lang.com/ -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 +(The MIT License) Copyright (c) Automattic diff --git a/vendor/stylus-lang-bundle/README.md b/vendor/stylus-lang-bundle/README.md index ae97c89e..ede4337e 100644 --- a/vendor/stylus-lang-bundle/README.md +++ b/vendor/stylus-lang-bundle/README.md @@ -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 diff --git a/vendor/usercss-meta/README.md b/vendor/usercss-meta/README.md index c3384a3d..c8625d32 100644 --- a/vendor/usercss-meta/README.md +++ b/vendor/usercss-meta/README.md @@ -1,5 +1,5 @@ ## 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 diff --git a/vendor/uuid/README.md b/vendor/uuid/README.md index b8a9a51e..aa913050 100644 --- a/vendor/uuid/README.md +++ b/vendor/uuid/README.md @@ -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