Skip to content

Commit

Permalink
fix: accept files and fix flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ismay committed May 1, 2024
1 parent d622051 commit 7692507
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/commands/types/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ exports.builder = (yargs) =>
})

exports.handler = (argv, callback) => {
console.log(argv)
if (
!argv.config.patterns ||
(argv.config.patterns && !argv.config.patterns.css)
Expand Down
7 changes: 5 additions & 2 deletions src/tools/stylelint.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
const { bin } = require('@dhis2/cli-helpers-engine').exec
const { PACKAGE_ROOT } = require('../utils/paths.js')

exports.stylelint = ({ callback }) => {
exports.stylelint = ({ files = [], apply = false, callback }) => {
const cmd = 'stylelint'
const cwd = PACKAGE_ROOT
const args = []
const args = [
...(apply ? ['--fix'] : []),
...files,
]

bin(cmd, { args, cwd }, callback)
}

0 comments on commit 7692507

Please sign in to comment.