Skip to content

Commit

Permalink
chore(util): single path util file
Browse files Browse the repository at this point in the history
single path util file

ISSUES CLOSED: webpack#805
  • Loading branch information
anshumanv committed Mar 30, 2019
1 parent 26fbaae commit 96d325e
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 30 deletions.
2 changes: 1 addition & 1 deletion bin/utils/convert-argv.js
Expand Up @@ -6,7 +6,7 @@ const prepareOptions = require("./prepareOptions");
const webpackConfigurationSchema = require("../config/webpackConfigurationSchema.json");
const validateSchema = require("webpack").validateSchema;
const WebpackOptionsValidationError = require("webpack").WebpackOptionsValidationError;
const { webpackConfigPath } = require("../../packages/utils/webpack-config-path");
const { webpackConfigPath } = require("@webpack-cli/utils/path-utils");

module.exports = function(...args) {
const argv = args[1] || args[0];
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/__tests__/is-local-path.test.ts
@@ -1,7 +1,7 @@
"use strict";

import * as path from "path";
import isLocalPath from "../is-local-path";
import { isLocalPath } from "../path-utils";

describe("is-local-path", () => {
it("returns true for paths beginning in the current directory", () => {
Expand Down
8 changes: 0 additions & 8 deletions packages/utils/find-root.ts

This file was deleted.

17 changes: 0 additions & 17 deletions packages/utils/is-local-path.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/utils/npm-packages-exists.ts
@@ -1,7 +1,7 @@
import chalk from "chalk";

import isLocalPath from "./is-local-path";
import npmExists from "./npm-exists";
import { isLocalPath } from "./path-utils";
import { resolvePackages } from "./resolve-packages";

const WEBPACK_SCAFFOLD_PREFIX = "webpack-scaffold";
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/resolve-packages.ts
@@ -1,10 +1,10 @@
import chalk from "chalk";
import * as path from "path";

import isLocalPath from "./is-local-path";
import modifyConfigHelper from "./modify-config-helper";
import { getPathToGlobalPackages } from "./package-manager";
import { spawnChild } from "./package-manager";
import { isLocalPath } from "./path-utils";

interface IChildProcess {
status: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/scaffold.ts
Expand Up @@ -2,7 +2,7 @@ import chalk from "chalk";
import * as j from "jscodeshift";
import pEachSeries = require("p-each-series");
import * as path from "path";
import { findProjectRoot } from "./find-root";
import { findProjectRoot } from "./path-utils";

import { IError } from "../init/types";
import { IConfig, ITransformConfig } from "./modify-config-helper";
Expand Down

0 comments on commit 96d325e

Please sign in to comment.