Skip to content

Commit

Permalink
feat: use new AdonisJs beta core packages
Browse files Browse the repository at this point in the history
  • Loading branch information
wahyubucil committed Oct 18, 2020
1 parent 79399bd commit 666696a
Show file tree
Hide file tree
Showing 7 changed files with 219 additions and 190 deletions.
4 changes: 2 additions & 2 deletions commands/Mix/Build.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BaseCommand, flags } from '@adonisjs/ace'
import { BaseCommand, flags } from '@adonisjs/core/build/standalone'
import { spawn } from 'child_process'
import { existsSync } from 'fs'
import { join } from 'path'
Expand All @@ -23,7 +23,7 @@ export default class MixBuild extends BaseCommand {
})
public mixConfig: string

public async handle() {
public async run() {
let webpackConfigPath = require.resolve('laravel-mix/setup/webpack.config.js')
if (!existsSync(webpackConfigPath)) {
this.logger.error('Please install Laravel Mix')
Expand Down
4 changes: 2 additions & 2 deletions commands/Mix/Watch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BaseCommand, flags } from '@adonisjs/ace'
import { BaseCommand, flags } from '@adonisjs/core/build/standalone'
import { spawn } from 'child_process'
import { existsSync } from 'fs'
import { join } from 'path'
Expand All @@ -17,7 +17,7 @@ export default class MixWatch extends BaseCommand {
})
public mixConfig: string

public async handle() {
public async run() {
const webpackConfigPath = require.resolve('laravel-mix/setup/webpack.config.js')
if (!existsSync(webpackConfigPath)) {
this.logger.error('Please install Laravel Mix')
Expand Down
4 changes: 2 additions & 2 deletions instructions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export default async function instructions(
) {
const mixConfig = new files.MustacheFile(projectRoot, 'webpack.mix.js', MIX_CONFIG_TEMPLATE_STUB)
if (mixConfig.exists()) {
logger.skip('webpack.mix.js File already exists')
logger.action('create').skipped('webpack.mix.js', 'File already exists')
} else {
mixConfig.apply({}).commit()
logger.create('webpack.mix.js')
logger.action('create').succeeded('webpack.mix.js')
}
}
2 changes: 1 addition & 1 deletion npm-audit.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h5 class="card-title">
<div class="card">
<div class="card-body">
<h5 class="card-title">
October 18th 2020, 3:48:11 pm
October 18th 2020, 4:29:00 pm
</h5>
<p class="card-text">Last updated</p>
</div>
Expand Down
Loading

0 comments on commit 666696a

Please sign in to comment.