diff --git a/src/commands/app/clean-build.js b/src/commands/app/clean.js similarity index 92% rename from src/commands/app/clean-build.js rename to src/commands/app/clean.js index 725e8603..d6c0bc6c 100644 --- a/src/commands/app/clean-build.js +++ b/src/commands/app/clean.js @@ -16,12 +16,12 @@ const fs = require('fs-extra') const path = require('path') const BaseCommand = require('../../BaseCommand') -const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:clean-build', { provider: 'debug' }) +const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:clean', { provider: 'debug' }) const { LAST_BUILT_ACTIONS_FILENAME, LAST_DEPLOYED_ACTIONS_FILENAME } = require('../../lib/defaults') -class CleanBuild extends BaseCommand { +class Clean extends BaseCommand { async run () { - const { flags } = await this.parse(CleanBuild) + const { flags } = await this.parse(Clean) const configs = await this.getAppExtConfigs(flags) const spinner = ora() @@ -94,7 +94,7 @@ class CleanBuild extends BaseCommand { } } -CleanBuild.description = `Remove all build artifacts from the local machine +Clean.description = `Remove all build artifacts from the local machine This command completely cleans all build artifacts from the dist directory including: - Action build files - Web assets (both production and development) @@ -103,8 +103,8 @@ This command completely cleans all build artifacts from the dist directory inclu Note that this will require a full rebuild on your next build command.` -CleanBuild.flags = { +Clean.flags = { ...BaseCommand.flags } -module.exports = CleanBuild +module.exports = Clean diff --git a/test/commands/app/clean-build.test.js b/test/commands/app/clean.test.js similarity index 98% rename from test/commands/app/clean-build.test.js rename to test/commands/app/clean.test.js index 2ed27d50..7b8d90c9 100644 --- a/test/commands/app/clean-build.test.js +++ b/test/commands/app/clean.test.js @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ -const CleanBuild = require('../../../src/commands/app/clean-build') +const Clean = require('../../../src/commands/app/clean') const fs = require('fs-extra') const ora = require('ora') const chalk = require('chalk') @@ -22,7 +22,7 @@ jest.mock('fs-extra') jest.mock('ora', () => jest.fn()) jest.mock('@adobe/aio-lib-core-logging', () => jest.fn().mockReturnValue({ debug: jest.fn(), error: jest.fn() })) -describe('CleanBuild Command', () => { +describe('Clean Command', () => { let cmd, spinner beforeEach(() => { @@ -45,7 +45,7 @@ describe('CleanBuild Command', () => { ora.mockReturnValue(spinner) // Instantiate command - cmd = new CleanBuild([]) + cmd = new Clean([]) cmd.parse = jest.fn().mockResolvedValue({ flags: {} }) cmd.getAppExtConfigs = jest.fn().mockResolvedValue({}) cmd.log = jest.fn()