progress on migrating to heex templates and font-icons

This commit is contained in:
Adam Piontek 2022-08-13 07:32:36 -04:00
commit 3eff955672
21793 changed files with 2161968 additions and 16895 deletions

View file

@ -0,0 +1,93 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.3.0](https://github.com/webpack/webpack-cli/compare/@webpack-cli/serve@1.2.2...@webpack-cli/serve@1.3.0) (2021-02-02)
### Bug Fixes
- avoid deprecation message ([9d6dbda](https://github.com/webpack/webpack-cli/commit/9d6dbda93da167a1aaad03f599105a4fe7849dc3))
- error message on invalid plugin options ([#2380](https://github.com/webpack/webpack-cli/issues/2380)) ([f9ce1d3](https://github.com/webpack/webpack-cli/commit/f9ce1d30b83bf0e0b4d91498d012c13c208e6e67))
### Features
- entries syntax ([#2369](https://github.com/webpack/webpack-cli/issues/2369)) ([6b31614](https://github.com/webpack/webpack-cli/commit/6b3161479578f572f803f579c7e71073eb797184))
## [1.2.2](https://github.com/webpack/webpack-cli/compare/@webpack-cli/serve@1.2.1...@webpack-cli/serve@1.2.2) (2021-01-19)
### Bug Fixes
- pass all `argv` to configurations when `serve` command used ([#2345](https://github.com/webpack/webpack-cli/issues/2345)) ([5070b9b](https://github.com/webpack/webpack-cli/commit/5070b9bcbd5bdac00088d0c21486ad181a4df000))
- respect `--stats`, `--color` and `--no-color` option for serve c… ([#2312](https://github.com/webpack/webpack-cli/issues/2312)) ([73d3fec](https://github.com/webpack/webpack-cli/commit/73d3feced18b4e3708f958707326a6642a594cf2))
## [1.2.1](https://github.com/webpack/webpack-cli/compare/@webpack-cli/serve@1.2.0...@webpack-cli/serve@1.2.1) (2020-12-31)
### Bug Fixes
- do not apply HotModuleReplacement plugin twice ([#2269](https://github.com/webpack/webpack-cli/issues/2269)) ([bb16d44](https://github.com/webpack/webpack-cli/commit/bb16d4481414a5f3c0cbeb18af690084b2ae4215))
- respect the `output.publicPath` option for the `serve`command ([#2271](https://github.com/webpack/webpack-cli/issues/2271)) ([a3092ef](https://github.com/webpack/webpack-cli/commit/a3092ef2b51ece30221f7dd7b30a686626c1fd7a))
- the `--help` option is working without `webpack-dev-server` ([#2267](https://github.com/webpack/webpack-cli/issues/2267)) ([1dae54d](https://github.com/webpack/webpack-cli/commit/1dae54da94d3220437b9257efe512447023de1d3))
- the `--progress` option with the `serve` command ([#2265](https://github.com/webpack/webpack-cli/issues/2265)) ([952a188](https://github.com/webpack/webpack-cli/commit/952a1883b1a18c4fb38e8eb7bbbdb2aefc7942f4))
# [1.2.0](https://github.com/webpack/webpack-cli/compare/@webpack-cli/serve@1.1.0...@webpack-cli/serve@1.2.0) (2020-12-25)
### Bug Fixes
- respect `--watch-options-stdin` ([2d1e001](https://github.com/webpack/webpack-cli/commit/2d1e001e7f4f560c2b36607bd1b29dfe2aa32066))
- do not default host in webpack-dev-server v4 ([#2141](https://github.com/webpack/webpack-cli/issues/2141)) ([dbbe4d4](https://github.com/webpack/webpack-cli/commit/dbbe4d4bc93ff9147ba43fae2d2352fa3583558d))
- do not default port in webpack-dev-server v4 ([#2126](https://github.com/webpack/webpack-cli/issues/2126)) ([cda3047](https://github.com/webpack/webpack-cli/commit/cda30471f51db4631a0f54b852c553de270f7f64))
- set client port when using default port ([#2147](https://github.com/webpack/webpack-cli/issues/2147)) ([4b97348](https://github.com/webpack/webpack-cli/commit/4b973488a42c4e12d86e0324a4c7051d1380a6fa))
- catch dev server import during webpack serve ([#2070](https://github.com/webpack/webpack-cli/issues/2070)) ([70bf770](https://github.com/webpack/webpack-cli/commit/70bf7708c21dffe6521f1800b9dec2a62d21cfe2))
- respect `--color`/`--no-color` options ([#2042](https://github.com/webpack/webpack-cli/issues/2042)) ([09bd812](https://github.com/webpack/webpack-cli/commit/09bd8126e95c9675b1f6862451f629cd4c439adb))
# [1.1.0](https://github.com/webpack/webpack-cli/compare/@webpack-cli/serve@1.0.1...@webpack-cli/serve@1.1.0) (2020-11-04)
### Bug Fixes
- resolve dev server hot options correctly ([#2022](https://github.com/webpack/webpack-cli/issues/2022)) ([7c5a2ba](https://github.com/webpack/webpack-cli/commit/7c5a2bae49625ee4982d7478b7e741968731cea2))
### Features
- add WEBPACK_SERVE environment variable ([#2027](https://github.com/webpack/webpack-cli/issues/2027)) ([ea369a9](https://github.com/webpack/webpack-cli/commit/ea369a98ea5ec366b688caebcb1276d9fbe0c651))
- export utils from core for other packages ([#2011](https://github.com/webpack/webpack-cli/issues/2011)) ([3004549](https://github.com/webpack/webpack-cli/commit/3004549c06b3fe00708d8e1eecf42419e0f72f66))
## [1.0.1](https://github.com/webpack/webpack-cli/compare/@webpack-cli/serve@1.0.1-rc.1...@webpack-cli/serve@1.0.1) (2020-10-10)
**Note:** Version bump only for package @webpack-cli/serve
## [1.0.1-rc.1](https://github.com/webpack/webpack-cli/compare/@webpack-cli/serve@1.0.1-alpha.5...@webpack-cli/serve@1.0.1-rc.1) (2020-10-06)
### Bug Fixes
- peer dependencies for `webpack serve` ([#1317](https://github.com/webpack/webpack-cli/issues/1317)) ([f8ec203](https://github.com/webpack/webpack-cli/commit/f8ec20382702450134032a65403894573b04be8d))
- **packages:** make packages have correct main paths to index ([#1366](https://github.com/webpack/webpack-cli/issues/1366)) ([5dd7bd6](https://github.com/webpack/webpack-cli/commit/5dd7bd62046568481996e48328b15a335557f8ae))
- **serve:** merge CLI and devServer options correctly ([#1649](https://github.com/webpack/webpack-cli/issues/1649)) ([2cdf5ce](https://github.com/webpack/webpack-cli/commit/2cdf5ce159f63ac65b33f4aca4c82fa1e959fef5))
- **serve:** supplying help or version as an arg should throw error ([#1694](https://github.com/webpack/webpack-cli/issues/1694)) ([6eb7883](https://github.com/webpack/webpack-cli/commit/6eb78833f910135ca798c0c28f8d236ef234a76c))
### Features
- allow multiple targets ([#1799](https://github.com/webpack/webpack-cli/issues/1799)) ([1724ddb](https://github.com/webpack/webpack-cli/commit/1724ddb9067d5c5ba2654d4e5473ee9de5610825))
- serve integration ([#1712](https://github.com/webpack/webpack-cli/issues/1712)) ([d3e2936](https://github.com/webpack/webpack-cli/commit/d3e29368c40ee47e4f7a07c41281714645e20ea7))
## [1.0.1-alpha.5](https://github.com/ematipico/webpack-cli/compare/@webpack-cli/serve@1.0.1-alpha.4...@webpack-cli/serve@1.0.1-alpha.5) (2020-03-02)
**Note:** Version bump only for package @webpack-cli/serve
## [1.0.1-alpha.4](https://github.com/ematipico/webpack-cli/compare/@webpack-cli/serve@1.0.1-alpha.3...@webpack-cli/serve@1.0.1-alpha.4) (2020-02-29)
**Note:** Version bump only for package @webpack-cli/serve
## [1.0.1-alpha.3](https://github.com/ematipico/webpack-cli/compare/@webpack-cli/serve@1.0.1-alpha.2...@webpack-cli/serve@1.0.1-alpha.3) (2020-02-23)
**Note:** Version bump only for package @webpack-cli/serve
## [1.0.1-alpha.2](https://github.com/webpack/webpack-cli/compare/@webpack-cli/serve@1.0.1-alpha.1...@webpack-cli/serve@1.0.1-alpha.2) (2020-02-23)
**Note:** Version bump only for package @webpack-cli/serve
## [1.0.1-alpha.1](https://github.com/webpack/webpack-cli/compare/@webpack-cli/serve@1.0.1-alpha.0...@webpack-cli/serve@1.0.1-alpha.1) (2020-02-23)
### Bug Fixes
- **init:** fix webpack config scaffold ([#1231](https://github.com/webpack/webpack-cli/issues/1231)) ([2dc495a](https://github.com/webpack/webpack-cli/commit/2dc495a8d050d28478c6c2533d7839e9ff78d76c)), closes [#1230](https://github.com/webpack/webpack-cli/issues/1230)

20
assets_old/node_modules/@webpack-cli/serve/LICENSE generated vendored Normal file
View file

@ -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.

26
assets_old/node_modules/@webpack-cli/serve/README.md generated vendored Normal file
View file

@ -0,0 +1,26 @@
# webpack-cli serve
[![NPM Downloads][downloads]][downloads-url]
**This package is used by webpack-cli under-the-hood and is not intended for installation as of v0.2.0**
## Description
This package contains the logic to run [webpack-dev-server](https://github.com/webpack/webpack-dev-server) to serve your webpack app and provide live reloading.
## Installation
```bash
npm i -D webpack-cli @webpack-cli/serve
```
## Usage
### CLI (via `webpack-cli`)
```bash
npx webpack-cli serve
```
[downloads]: https://img.shields.io/npm/dm/@webpack-cli/serve.svg
[downloads-url]: https://www.npmjs.com/package/@webpack-cli/serve

View file

@ -0,0 +1,4 @@
declare class ServeCommand {
apply(cli: any): Promise<void>;
}
export default ServeCommand;

107
assets_old/node_modules/@webpack-cli/serve/lib/index.js generated vendored Normal file
View file

@ -0,0 +1,107 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const startDevServer_1 = __importDefault(require("./startDevServer"));
class ServeCommand {
async apply(cli) {
const { logger } = cli;
await cli.makeCommand({
name: 'serve [entries...]',
alias: 's',
description: 'Run the webpack dev server.',
usage: '[entries...] [options]',
pkg: '@webpack-cli/serve',
dependencies: ['webpack-dev-server'],
}, () => {
let devServerFlags = [];
try {
// eslint-disable-next-line
devServerFlags = require('webpack-dev-server/bin/cli-flags').devServer;
}
catch (error) {
logger.error(`You need to install 'webpack-dev-server' for running 'webpack serve'.\n${error}`);
process.exit(2);
}
const builtInOptions = cli.getBuiltInOptions().filter((option) => option.name !== 'watch');
return [...builtInOptions, ...devServerFlags];
}, async (entries, options) => {
const builtInOptions = cli.getBuiltInOptions();
let devServerFlags = [];
try {
// eslint-disable-next-line
devServerFlags = require('webpack-dev-server/bin/cli-flags').devServer;
}
catch (error) {
// Nothing, to prevent future updates
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const webpackOptions = {};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const devServerOptions = {};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const processors = [];
for (const optionName in options) {
const kebabedOption = cli.utils.toKebabCase(optionName);
// `webpack-dev-server` has own logic for the `--hot` option
const isBuiltInOption = kebabedOption !== 'hot' && builtInOptions.find((builtInOption) => builtInOption.name === kebabedOption);
if (isBuiltInOption) {
webpackOptions[optionName] = options[optionName];
}
else {
const needToProcess = devServerFlags.find((devServerOption) => devServerOption.name === kebabedOption && devServerOption.processor);
if (needToProcess) {
processors.push(needToProcess.processor);
}
devServerOptions[optionName] = options[optionName];
}
}
for (const processor of processors) {
processor(devServerOptions);
}
if (entries.length > 0) {
webpackOptions.entry = [...entries, ...(webpackOptions.entry || [])];
}
webpackOptions.argv = Object.assign(Object.assign({}, options), { env: Object.assign({ WEBPACK_SERVE: true }, options.env) });
const compiler = await cli.createCompiler(webpackOptions);
if (!compiler) {
return;
}
let servers;
if (cli.needWatchStdin(compiler) || devServerOptions.stdin) {
// TODO remove in the next major release
// Compatibility with old `stdin` option for `webpack-dev-server`
// Should be removed for the next major release on both sides
if (devServerOptions.stdin) {
delete devServerOptions.stdin;
}
process.stdin.on('end', () => {
Promise.all(servers.map((server) => {
return new Promise((resolve) => {
server.close(() => {
resolve();
});
});
})).then(() => {
process.exit(0);
});
});
process.stdin.resume();
}
try {
servers = await startDevServer_1.default(compiler, devServerOptions, options, logger);
}
catch (error) {
if (cli.isValidationError(error)) {
logger.error(error.message);
}
else {
logger.error(error);
}
process.exit(2);
}
});
}
}
exports.default = ServeCommand;

View file

@ -0,0 +1,12 @@
/**
*
* Starts the devServer
*
* @param {Object} compiler - a webpack compiler
* @param {Object} devServerCliOptions - dev server CLI options
* @param {Object} cliOptions - CLI options
* @param {Object} logger - logger
*
* @returns {Object[]} array of resulting servers
*/
export default function startDevServer(compiler: any, devServerCliOptions: any, cliOptions: any, logger: any): Promise<object[]>;

View file

@ -0,0 +1,113 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
*
* Starts the devServer
*
* @param {Object} compiler - a webpack compiler
* @param {Object} devServerCliOptions - dev server CLI options
* @param {Object} cliOptions - CLI options
* @param {Object} logger - logger
*
* @returns {Object[]} array of resulting servers
*/
async function startDevServer(compiler, devServerCliOptions, cliOptions, logger) {
let devServerVersion, Server, findPort;
try {
// eslint-disable-next-line node/no-extraneous-require
devServerVersion = require('webpack-dev-server/package.json').version;
// eslint-disable-next-line node/no-extraneous-require
Server = require('webpack-dev-server/lib/Server');
// eslint-disable-next-line node/no-extraneous-require
findPort = require('webpack-dev-server/lib/utils/findPort');
}
catch (err) {
logger.error(`You need to install 'webpack-dev-server' for running 'webpack serve'.\n${err}`);
process.exit(2);
}
const mergeOptions = (devServerOptions, devServerCliOptions) => {
// CLI options should take precedence over devServer options,
// and CLI options should have no default values included
const options = Object.assign(Object.assign({}, devServerOptions), devServerCliOptions);
if (devServerOptions.client && devServerCliOptions.client) {
// the user could set some client options in their devServer config,
// then also specify client options on the CLI
options.client = Object.assign(Object.assign({}, devServerOptions.client), devServerCliOptions.client);
}
return options;
};
const isMultiCompiler = Boolean(compiler.compilers);
let compilersWithDevServerOption;
if (isMultiCompiler) {
compilersWithDevServerOption = compiler.compilers.filter((compiler) => compiler.options.devServer);
// No compilers found with the `devServer` option, let's use first compiler
if (compilersWithDevServerOption.length === 0) {
compilersWithDevServerOption = [compiler.compilers[0]];
}
}
else {
compilersWithDevServerOption = [compiler];
}
const isDevServer4 = devServerVersion.startsWith('4');
const usedPorts = [];
const devServersOptions = [];
for (const compilerWithDevServerOption of compilersWithDevServerOption) {
const options = mergeOptions(compilerWithDevServerOption.options.devServer || {}, devServerCliOptions);
if (isDevServer4) {
options.port = await findPort(options.port);
options.client = options.client || {};
options.client.port = options.client.port || options.port;
}
else {
const getPublicPathOption = () => {
const normalizePublicPath = (publicPath) => typeof publicPath === 'undefined' || publicPath === 'auto' ? '/' : publicPath;
if (cliOptions.outputPublicPath) {
return normalizePublicPath(compilerWithDevServerOption.options.output.publicPath);
}
// webpack-dev-server@3
if (options.publicPath) {
return normalizePublicPath(options.publicPath);
}
// webpack-dev-server@4
if (options.dev && options.dev.publicPath) {
return normalizePublicPath(options.dev.publicPath);
}
return normalizePublicPath(compilerWithDevServerOption.options.output.publicPath);
};
const getStatsOption = () => {
if (cliOptions.stats) {
return compilerWithDevServerOption.options.stats;
}
if (options.stats) {
return options.stats;
}
return compilerWithDevServerOption.options.stats;
};
options.host = options.host || 'localhost';
options.port = options.port || 8080;
options.stats = getStatsOption();
options.publicPath = getPublicPathOption();
}
if (options.port) {
const portNumber = Number(options.port);
if (usedPorts.find((port) => portNumber === port)) {
throw new Error('Unique ports must be specified for each devServer option in your webpack configuration. Alternatively, run only 1 devServer config using the --config-name flag to specify your desired config.');
}
usedPorts.push(portNumber);
}
devServersOptions.push({ compiler, options });
}
const servers = [];
for (const devServerOptions of devServersOptions) {
const { compiler, options } = devServerOptions;
const server = new Server(compiler, options);
server.listen(options.port, options.host, (error) => {
if (error) {
throw error;
}
});
servers.push(server);
}
return servers;
}
exports.default = startDevServer;

View file

@ -0,0 +1,48 @@
export declare type devServerOptionsType = {
bonjour?: boolean;
client?: devServerClientOptions;
compress?: boolean;
dev?: Record<string, any>;
firewall?: boolean | string[];
headers?: object;
historyApiFallback?: boolean | object;
host?: string | null;
hot?: boolean | string;
http2?: boolean;
https?: boolean | object;
injectClient?: boolean | Function;
injectHot?: boolean | Function;
liveReload?: boolean;
onAfterSetupMiddleware?: Function;
onBeforeSetupMiddleware?: Function;
onListening?: Function;
open?: string | boolean | object;
openPage?: string | string[];
overlay?: boolean | object;
port?: number | string | null;
profile?: boolean;
progress?: boolean;
proxy?: object | (object | Function)[];
public?: string;
static?: boolean | string | object | (string | object)[];
transportMode?: object | string;
useLocalIp?: boolean;
publicPath?: string | Function;
stats?: string | boolean;
};
declare type devServerClientOptions = {
host?: string;
path?: string;
port?: string | number | null;
logging?: devServerClientLogging;
progress?: boolean;
};
export declare enum devServerClientLogging {
none = "none",
error = "error",
warn = "warn",
info = "info",
log = "log",
verbose = "verbose"
}
export {};

View file

@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.devServerClientLogging = void 0;
var devServerClientLogging;
(function (devServerClientLogging) {
devServerClientLogging["none"] = "none";
devServerClientLogging["error"] = "error";
devServerClientLogging["warn"] = "warn";
devServerClientLogging["info"] = "info";
devServerClientLogging["log"] = "log";
devServerClientLogging["verbose"] = "verbose";
})(devServerClientLogging = exports.devServerClientLogging || (exports.devServerClientLogging = {}));

View file

@ -0,0 +1,24 @@
{
"name": "@webpack-cli/serve",
"version": "1.3.0",
"description": "",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"keywords": [],
"publishConfig": {
"access": "public"
},
"license": "MIT",
"files": [
"lib"
],
"peerDependencies": {
"webpack-cli": "4.x.x"
},
"peerDependenciesMeta": {
"webpack-dev-server": {
"optional": true
}
},
"gitHead": "3bbda71e9637b7d20f3f49f9e080e27d8d8ae929"
}