Skip to content
Merged
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
4 changes: 3 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { globalIgnores, defineConfig } from "eslint/config";
import { defineConfig, globalIgnores } from "eslint/config";
import config from "eslint-config-webpack";
import configs from "eslint-config-webpack/configs.js";

Expand All @@ -23,6 +23,7 @@ export default defineConfig([
// We are CLI, so using `console.log` is normal
"no-console": "off",
strict: "off",
"n/no-process-exit": "off",
},
},
{
Expand All @@ -31,6 +32,7 @@ export default defineConfig([
rules: {
// We are CLI, so using `console.log` is normal
"no-console": "off",
"n/no-process-exit": "off",
},
},
]);
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
{
"name": "webpack-cli-monorepo",
"description": "CLI for webpack & friends",
"license": "MIT",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/webpack/webpack-cli.git"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"engines": {
"node": ">=18.12.0"
},
"description": "CLI for webpack & friends",
"keywords": [
"webpack",
"cli",
Expand All @@ -22,6 +10,15 @@
"bundler",
"web"
],
"repository": {
"type": "git",
"url": "https://github.com/webpack/webpack-cli.git"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"license": "MIT",
"workspaces": [
"./packages/*"
],
Expand Down Expand Up @@ -52,9 +49,6 @@
"update:docs": "node ./scripts/update-docs",
"prepare": "husky"
},
"peerDependencies": {
"webpack": "5.x.x"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.2",
Expand All @@ -74,7 +68,7 @@
"css-loader": "^7.1.2",
"del-cli": "^6.0.0",
"eslint": "^9.29.0",
"eslint-config-webpack": "^4.1.4",
"eslint-config-webpack": "^4.2.2",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-jest": "^29.0.1",
Expand Down Expand Up @@ -106,5 +100,11 @@
"webpack": "^5.99.1",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-dev-server": "^5.1.0"
},
"peerDependencies": {
"webpack": "5.x.x"
},
"engines": {
"node": ">=18.12.0"
}
}
20 changes: 10 additions & 10 deletions packages/configtest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
"name": "@webpack-cli/configtest",
"version": "3.0.1",
"description": "Validate a webpack configuration.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"license": "MIT",
"engines": {
"node": ">=18.12.0"
},
"publishConfig": {
"access": "public"
},
"homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/configtest",
"repository": {
"type": "git",
"url": "https://github.com/webpack/webpack-cli.git"
},
"homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/configtest",
"license": "MIT",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib"
],
"peerDependencies": {
"webpack": "^5.82.0",
"webpack-cli": "6.x.x"
},
"engines": {
"node": ">=18.12.0"
},
"publishConfig": {
"access": "public"
}
}
42 changes: 21 additions & 21 deletions packages/create-webpack-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,42 @@
"name": "create-new-webpack-app",
"version": "1.1.1",
"description": "CLI for scaffolding webpack projects using default config, framework templates, loader or plugins templates",
"license": "MIT",
"keywords": [
"webpack",
"cli",
"scaffolding",
"module",
"bundler",
"web",
"frameworks"
],
"homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/create-webpack-app",
"bugs": "https://github.com/webpack/webpack-cli/issues",
"repository": {
"type": "git",
"url": "https://github.com/webpack-cli/create-webpack-app.git"
},
"homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/create-webpack-app",
"bugs": "https://github.com/webpack/webpack-cli/issues",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"bin": {
"create-webpack-app": "./bin/cli.js"
},
"license": "MIT",
"type": "module",
"main": "./lib/index.js",
"scripts": {
"build": "tsc --build",
"watch": "tsc --watch"
},
"engines": {
"node": ">=18.12.0"
"bin": {
"create-webpack-app": "./bin/cli.js"
},
"keywords": [
"webpack",
"cli",
"scaffolding",
"module",
"bundler",
"web",
"frameworks"
],
"files": [
"bin",
"lib",
"templates",
"!**/*__tests__",
"!**/*.d.ts"
],
"scripts": {
"build": "tsc --build",
"watch": "tsc --watch"
},
"dependencies": {
"@inquirer/expand": "^4.0.3",
"@inquirer/select": "^4.0.3",
Expand All @@ -53,5 +50,8 @@
"devDependencies": {
"@types/cross-spawn": "^6.0.6",
"@types/ejs": "^3.1.5"
},
"engines": {
"node": ">=18.12.0"
}
}
4 changes: 2 additions & 2 deletions packages/create-webpack-app/src/generators/init/default.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type Answers, type ActionType, type FileRecord } from "../../types.js";
import { type NodePlopAPI, type DynamicActionsFunction } from "node-plop";
import { dirname, join, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { type DynamicActionsFunction, type NodePlopAPI } from "node-plop";
import { type ActionType, type Answers, type FileRecord } from "../../types.js";

export default async function defaultInitGenerator(plop: NodePlopAPI) {
const __dirname = dirname(fileURLToPath(import.meta.url));
Expand Down
6 changes: 3 additions & 3 deletions packages/create-webpack-app/src/generators/init/react.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type Answers, type ActionType, type FileRecord } from "../../types.js";
import { type NodePlopAPI, type DynamicActionsFunction } from "node-plop";
import { dirname, resolve, join } from "node:path";
import { dirname, join, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { type DynamicActionsFunction, type NodePlopAPI } from "node-plop";
import { type ActionType, type Answers, type FileRecord } from "../../types.js";

export default async function reactInitGenerator(plop: NodePlopAPI) {
const __dirname = dirname(fileURLToPath(import.meta.url));
Expand Down
4 changes: 2 additions & 2 deletions packages/create-webpack-app/src/generators/init/svelte.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type Answers, type ActionType, type FileRecord } from "../../types.js";
import { type NodePlopAPI, type DynamicActionsFunction } from "node-plop";
import { dirname, join, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { type DynamicActionsFunction, type NodePlopAPI } from "node-plop";
import { type ActionType, type Answers, type FileRecord } from "../../types.js";

export default async function svelteInitGenerator(plop: NodePlopAPI) {
const __dirname = dirname(fileURLToPath(import.meta.url));
Expand Down
4 changes: 2 additions & 2 deletions packages/create-webpack-app/src/generators/init/vue.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type Answers, type ActionType, type FileRecord } from "../../types.js";
import { type NodePlopAPI, type DynamicActionsFunction } from "node-plop";
import { dirname, join, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { type DynamicActionsFunction, type NodePlopAPI } from "node-plop";
import { type ActionType, type Answers, type FileRecord } from "../../types.js";

export default async function vueInitGenerator(plop: NodePlopAPI) {
const __dirname = dirname(fileURLToPath(import.meta.url));
Expand Down
4 changes: 2 additions & 2 deletions packages/create-webpack-app/src/generators/loader/default.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type LoaderAnswers, type ActionType, type FileRecord } from "../../types.js";
import { type NodePlopAPI, type DynamicActionsFunction } from "node-plop";
import { dirname, join, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { type DynamicActionsFunction, type NodePlopAPI } from "node-plop";
import { type ActionType, type FileRecord, type LoaderAnswers } from "../../types.js";
import { logger } from "../../utils/logger.js";

export default async function loaderGenerator(plop: NodePlopAPI) {
Expand Down
4 changes: 2 additions & 2 deletions packages/create-webpack-app/src/generators/plugin/default.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type ActionType, type FileRecord, PluginAnswers } from "../../types.js";
import { type NodePlopAPI, type DynamicActionsFunction } from "node-plop";
import { dirname, join, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { type DynamicActionsFunction, type NodePlopAPI } from "node-plop";
import { type ActionType, type FileRecord, PluginAnswers } from "../../types.js";
import { logger } from "../../utils/logger.js";

export default async function pluginGenerator(plop: NodePlopAPI) {
Expand Down
8 changes: 4 additions & 4 deletions packages/create-webpack-app/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Command } from "commander";
import { resolve, dirname } from "node:path";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import select from "@inquirer/select";
import { Command } from "commander";
import nodePlop, { type PlopGenerator } from "node-plop";
import { fileURLToPath } from "node:url";

import { onSuccessHandler, onFailureHandler, logger } from "./utils/logger.js";
import { type Answers, type InitOptions, type LoaderOptions, type PluginOptions } from "./types.js";
import { logger, onFailureHandler, onSuccessHandler } from "./utils/logger.js";

const __dirname = dirname(fileURLToPath(import.meta.url));

Expand Down
8 changes: 4 additions & 4 deletions packages/create-webpack-app/src/utils/generate-files.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as fs from "node:fs/promises";
import * as ejs from "ejs";
import expand from "@inquirer/expand";
import { spawn, sync } from "cross-spawn";
import * as path from "node:path";
import { fileURLToPath } from "node:url";
import { logger } from "./logger.js";
import expand from "@inquirer/expand";
import { spawn, sync } from "cross-spawn";
import * as ejs from "ejs";
import { type NodePlopAPI } from "node-plop";
import { type Answers } from "../types.js";
import { logger } from "./logger.js";

export interface AddConfig {
type: string; // Type of action
Expand Down
6 changes: 3 additions & 3 deletions packages/create-webpack-app/src/utils/install-dependencies.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { type NodePlopAPI } from "node-plop";
import { dirname, resolve } from "node:path";
import { spawn } from "cross-spawn";
import {
type ChildProcess,
type SpawnOptionsWithStdioTuple,
type StdioNull,
type StdioPipe,
} from "node:child_process";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { spawn } from "cross-spawn";
import { type NodePlopAPI } from "node-plop";

export default async function installDependencies(plop: NodePlopAPI) {
const __dirname = dirname(fileURLToPath(import.meta.url));
Expand Down
6 changes: 3 additions & 3 deletions packages/create-webpack-app/src/utils/logger.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { green, yellow, type Color, red, cyan, blue, blueBright, greenBright } from "colorette";
import { normalize, relative } from "node:path";
import { type Color, blue, blueBright, cyan, green, greenBright, red, yellow } from "colorette";
import {
type Logger,
type PlopActionHooksChanges,
type PlopActionHooksFailures,
} from "../types.js";
import { relative, normalize } from "node:path";

const prefix: string = blueBright("create-webpack");
const getLogger = (): Logger => ({
Expand Down Expand Up @@ -51,4 +51,4 @@ function onFailureHandler(failure: PlopActionHooksFailures): void {
throw new Error(failure.error);
}

export { logger, onSuccessHandler, onFailureHandler };
export { logger, onFailureHandler, onSuccessHandler };
24 changes: 12 additions & 12 deletions packages/info/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
"name": "@webpack-cli/info",
"version": "3.0.1",
"description": "Outputs info about system and webpack config",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"license": "MIT",
"engines": {
"node": ">=18.12.0"
},
"publishConfig": {
"access": "public"
},
"homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/info",
"repository": {
"type": "git",
"url": "https://github.com/webpack/webpack-cli.git"
},
"homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/info",
"license": "MIT",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib"
],
"gitHead": "fb50f766851f500ca12867a2aa9de81fa6e368f9",
"peerDependencies": {
"webpack": "^5.82.0",
"webpack-cli": "6.x.x"
}
},
"engines": {
"node": ">=18.12.0"
},
"publishConfig": {
"access": "public"
},
"gitHead": "fb50f766851f500ca12867a2aa9de81fa6e368f9"
}
Loading