Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions src/commands/app/clean-build.js → src/commands/app/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const BaseCommand = require('../../BaseCommand')
const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-app:clean-build', { 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()
Expand Down Expand Up @@ -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)
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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(() => {
Expand All @@ -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()
Expand Down