-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(task-manager): use Listr directly
rather than a custom wrapper, we can use the Listr API directly to peel off layers of abstraction, reduce custom code, and benefit from the library’s types.
- Loading branch information
Showing
50 changed files
with
747 additions
and
650 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
const copy = require('./copy.js'); | ||
const inlineSVGs = require('../inline-svgs/index.js'); | ||
|
||
/** @type {import('listr2').ListrTask} */ | ||
const task = { | ||
description: 'Compile assets for template rendering in Play', | ||
task: [ | ||
// prettier: multi-line | ||
copy, | ||
inlineSVGs, | ||
], | ||
title: 'Compile assets for template rendering in Play', | ||
task: (ctx, task) => | ||
task.newListr( | ||
[ | ||
// prettier: multi-line | ||
copy, | ||
inlineSVGs, | ||
], | ||
{ concurrent: false }, | ||
), | ||
}; | ||
|
||
module.exports = task; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,51 @@ | ||
const compile = require('../../../compile-css'); | ||
|
||
/** @type {import('listr2').ListrTask} */ | ||
const task = { | ||
description: 'Compile Sass', | ||
task: [ | ||
{ | ||
description: 'Old IE', | ||
task: () => | ||
compile('old-ie.*.scss', { | ||
browsers: 'Explorer 8', | ||
remify: false, | ||
}), | ||
}, | ||
{ | ||
description: 'IE9', | ||
task: () => | ||
compile('ie9.*.scss', { | ||
browsers: 'Explorer 9', | ||
}), | ||
}, | ||
{ | ||
description: 'Email', | ||
task: () => | ||
compile('head.email-{article,front}.scss', { | ||
remify: false, | ||
}), | ||
}, | ||
{ | ||
description: 'Modern', | ||
task: () => | ||
compile('!(_|ie9|old-ie|*email-article|*email-front)*.scss'), | ||
}, | ||
{ | ||
description: 'Inline', | ||
task: () => compile('inline/*.scss'), | ||
}, | ||
{ | ||
description: 'Atoms', | ||
task: () => compile('atoms/*.scss'), | ||
}, | ||
], | ||
concurrent: true, | ||
title: 'Compile Sass', | ||
task: (ctx, task) => | ||
task.newListr( | ||
[ | ||
{ | ||
title: 'Old IE', | ||
task: () => | ||
compile('old-ie.*.scss', { | ||
browsers: 'Explorer 8', | ||
remify: false, | ||
}), | ||
}, | ||
{ | ||
title: 'IE9', | ||
task: () => | ||
compile('ie9.*.scss', { | ||
browsers: 'Explorer 9', | ||
}), | ||
}, | ||
{ | ||
title: 'Email', | ||
task: () => | ||
compile('head.email-{article,front}.scss', { | ||
remify: false, | ||
}), | ||
}, | ||
{ | ||
title: 'Modern', | ||
task: () => | ||
compile( | ||
'!(_|ie9|old-ie|*email-article|*email-front)*.scss', | ||
), | ||
}, | ||
{ | ||
title: 'Inline', | ||
task: () => compile('inline/*.scss'), | ||
}, | ||
{ | ||
title: 'Atoms', | ||
task: () => compile('atoms/*.scss'), | ||
}, | ||
], | ||
{ concurrent: !!ctx.verbose ? false : true }, | ||
), | ||
}; | ||
|
||
module.exports = task; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.