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();
});
it('prints plugin name that errored out', () => {
it('prints plugin name that has a chain function that throws an error', () => {
webpack.useConfig(false);
webpack.setCurrentPlugin('test-plugin');
const chainFn = jest.fn(() => {

View File

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

View File

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

View File

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

View File

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