Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
fixtures
compiled
49 changes: 46 additions & 3 deletions packages/toolkit/bin/10up-toolkit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
/**
* Internal dependencies
*/
const { getNodeArgsFromCLI, spawnScript, getPackageVersion } = require('../utils');
const { getNodeArgsFromCLI, getPackageVersion, hasArgInCLI } = require('../utils');
const { exit } = require('../utils/process');

const { scriptName, scriptArgs, nodeArgs } = getNodeArgsFromCLI();
const build = require('../scripts/build');
const checkEngines = require('../scripts/check-engines');
const lintJs = require('../scripts/lint-js');
const lintStyle = require('../scripts/lint-style');
const start = require('../scripts/start');
const testUnitJest = require('../scripts/test-unit-jest');
const formatJs = require('../scripts/format-js');

const { scriptName, scriptArgs } = getNodeArgsFromCLI();

// disable webpack 5 deprecation warnings as some plugins still need to catch up
process.env.NODE_OPTIONS = '--no-deprecation';
Expand All @@ -19,5 +27,40 @@ process.env.NODE_OPTIONS = '--no-deprecation';
exit(0);
}

spawnScript(scriptName, scriptArgs, nodeArgs);
// spawnScript(scriptName, scriptArgs, nodeArgs);
process.argv = [process.argv[0], scriptName, ...scriptArgs];

switch (scriptName) {
case 'build':
if (hasArgInCLI('--watch')) {
start();
} else {
build();
}

break;
case 'start':
case 'watch':
start();
break;
case 'check-engines':
checkEngines();
break;
case 'format-js':
formatJs();
break;
case 'lint-js':
lintJs();
break;
case 'lint-style':
lintStyle();
break;
case 'test-unit-jest':
case 'test-unit-js':
testUnitJest();
break;
default:
start();
break;
}
})();
75 changes: 75 additions & 0 deletions packages/toolkit/compiled/@svgr-webpack/.svgo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# replace default config

# multipass: true
# full: true

plugins:

# - name
#
# or:
# - name: false
# - name: true
#
# or:
# - name:
# param1: 1
# param2: 2

- removeDoctype
- removeXMLProcInst
- removeComments
- removeMetadata
- removeXMLNS
- removeEditorsNSData
- cleanupAttrs
- inlineStyles
- minifyStyles
- convertStyleToAttrs
- cleanupIDs
- prefixIds
- removeRasterImages
- removeUselessDefs
- cleanupNumericValues
- cleanupListOfValues
- convertColors
- removeUnknownsAndDefaults
- removeNonInheritableGroupAttrs
- removeUselessStrokeAndFill
- removeViewBox
- cleanupEnableBackground
- removeHiddenElems
- removeEmptyText
- convertShapeToPath
- convertEllipseToCircle
- moveElemsAttrsToGroup
- moveGroupAttrsToElems
- collapseGroups
- convertPathData
- convertTransform
- removeEmptyAttrs
- removeEmptyContainers
- mergePaths
- removeUnusedNS
- sortAttrs
- sortDefsChildren
- removeTitle
- removeDesc
- removeDimensions
- removeAttrs
- removeAttributesBySelector
- removeElementsByAttr
- addClassesToSVGElement
- removeStyleElement
- removeScriptElement
- addAttributesToSVGElement
- removeOffCanvasPaths
- reusePaths

# configure the indent (default 4 spaces) used by `--pretty` here:
#
# @see https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options
#
# js2svg:
# pretty: true
# indent: ' '
2,205 changes: 2,205 additions & 0 deletions packages/toolkit/compiled/@svgr-webpack/index.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions packages/toolkit/compiled/@svgr/webpack/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2017 Smooth Code

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.
1 change: 1 addition & 0 deletions packages/toolkit/compiled/@svgr/webpack/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"@svgr/webpack","main":"index.js","author":{"name":"Greg Bergé","email":"berge.greg@gmail.com"},"license":"MIT"}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,910 changes: 1,910 additions & 0 deletions packages/toolkit/compiled/babel-loader/index.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions packages/toolkit/compiled/camelcase/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)

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.
1 change: 1 addition & 0 deletions packages/toolkit/compiled/camelcase/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/toolkit/compiled/camelcase/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"camelcase","main":"index.js","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT"}
20 changes: 20 additions & 0 deletions packages/toolkit/compiled/copy-webpack-plugin/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright JS Foundation and other contributors

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.
56 changes: 56 additions & 0 deletions packages/toolkit/compiled/copy-webpack-plugin/cjs.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/toolkit/compiled/copy-webpack-plugin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"copy-webpack-plugin","main":"cjs.js","author":{"name":"Len Boyette"},"license":"MIT"}
Loading