chore: cleanup

This commit is contained in:
Igor Randjelovic
2020-12-01 19:51:07 +01:00
parent 016ecd19a8
commit 5dad44a8e3
5 changed files with 18 additions and 8 deletions

View File

@ -55,7 +55,7 @@ describe('@nativescript/webpack', () => {
webpack.resolveChainableConfig(); webpack.resolveChainableConfig();
}); });
it('prints plugin name that errored out', () => { it('prints plugin name that has a chain function that throws an error', () => {
webpack.useConfig(false); webpack.useConfig(false);
webpack.setCurrentPlugin('test-plugin'); webpack.setCurrentPlugin('test-plugin');
const chainFn = jest.fn(() => { const chainFn = jest.fn(() => {

View File

@ -1,12 +1,18 @@
import { merge } from 'webpack-merge'; import { merge } from 'webpack-merge';
import { getValue } from './config';
import { getAllDependencies, getDependencyPath } from './dependencies'; import {
getAllDependencies,
hasDependency,
getDependencyPath,
} from './dependencies';
import { determineProjectFlavor } from './flavor'; import { determineProjectFlavor } from './flavor';
import { error, info, warn } from './log'; import { error, info, warn } from './log';
import { getValue } from './config';
import { import {
getAbsoluteDistPath, getAbsoluteDistPath,
getDistPath, getDistPath,
getEntryPath, getEntryPath,
getEntryDirPath,
getPackageJson, getPackageJson,
getPlatform, getPlatform,
getProjectRootPath, getProjectRootPath,
@ -23,6 +29,7 @@ export default {
}, },
dependencies: { dependencies: {
getAllDependencies, getAllDependencies,
hasDependency,
getDependencyPath, getDependencyPath,
}, },
flavor: { flavor: {
@ -37,6 +44,7 @@ export default {
getProjectRootPath, getProjectRootPath,
getAbsoluteDistPath, getAbsoluteDistPath,
getEntryPath, getEntryPath,
getEntryDirPath,
getDistPath, getDistPath,
getPlatform, getPlatform,
getPackageJson, getPackageJson,

View File

@ -1,5 +1,6 @@
import { env, Platform } from '../index';
import { resolve, basename, dirname } from 'path'; import { resolve, basename, dirname } from 'path';
import { env, Platform } from '../index';
import { error } from './log'; import { error } from './log';
export function getProjectRootPath(): string { export function getProjectRootPath(): string {

View File

@ -1,11 +1,12 @@
import { highlight } from 'cli-highlight';
import { merge } from 'webpack-merge'; import { merge } from 'webpack-merge';
import Config from 'webpack-chain'; import Config from 'webpack-chain';
import webpack from 'webpack'; import webpack from 'webpack';
import { highlight } from 'cli-highlight';
import { configs } from './configuration';
import { determineProjectFlavor } from './helpers/flavor';
import { applyExternalConfigs } from './helpers/externalConfigs'; import { applyExternalConfigs } from './helpers/externalConfigs';
import { determineProjectFlavor } from './helpers/flavor';
import { error, info } from './helpers/log'; import { error, info } from './helpers/log';
import { configs } from './configuration';
import helpers from './helpers'; import helpers from './helpers';
export type Platform = 'android' | 'ios' | string; export type Platform = 'android' | 'ios' | string;

View File

@ -1,5 +1,5 @@
import { existsSync } from 'fs';
import { extname, resolve } from 'path'; import { extname, resolve } from 'path';
import { existsSync } from 'fs';
const id = 'PlatformSuffixPlugin'; const id = 'PlatformSuffixPlugin';