Skip to content

Commit

Permalink
Merge pull request #2554 from boltdesignsystem/feature/DS-867-remove-…
Browse files Browse the repository at this point in the history
…image-task--build

DS-867 (Part 1 of 2) Remove Image task
  • Loading branch information
colbytcook committed Oct 6, 2022
2 parents 8aca644 + 7031ab9 commit 28cfc71
Show file tree
Hide file tree
Showing 14 changed files with 409 additions and 1,708 deletions.
4 changes: 4 additions & 0 deletions docs-site/.boltrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ const config = deepmerge(baseConfig, {
individual: [],
},
copy: [
{
from: `src/assets/images`,
to: path.join(__dirname, '../www/images'),
},
{
from: path.join(
path.dirname(require.resolve(`@bolt/components-typeahead`)),
Expand Down
9 changes: 0 additions & 9 deletions packages/build-tools/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,6 @@ Environment: ${config.prod ? 'Production' : 'Development'}
await updateConfig(options, program);
});

program
.command('img')
.alias('images')
.description('Image process')
.action(async options => {
await updateConfig(options, program);
require('./tasks/task-collections').images();
});

program
.command('webpack')
.alias('wp')
Expand Down
5 changes: 0 additions & 5 deletions packages/build-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"babel-loader": "^8.0.6",
"better-opn": "^1.0.0",
"browser-sync": "^2.26.7",
"cacache": "^14.0.0",
"cache-loader": "^4.1.0",
"camelcase": "^5.3.1",
"chalk": "^3.0.0",
Expand All @@ -68,9 +67,6 @@
"glob-promise": "^3.4.0",
"globby": "^11.0.0",
"hard-source-webpack-plugin-patch": "^0.13.3",
"image-size": "^0.8.3",
"imagemin": "^7.0.1",
"imagemin-gifsicle": "^7.0.0",
"incache": "^7.2.1",
"json-loader": "^0.5.7",
"json-schema-ref-parser": "^7.1.3",
Expand All @@ -96,7 +92,6 @@
"sassdoc": "^2.7.1",
"sassdoc-theme-default": "^2.8.3",
"semver": "^7.1.2",
"sharp": "^0.24.0",
"shelljs": "^0.8.4",
"string-replace-loader": "^2.2.0",
"style-loader": "^1.1.3",
Expand Down
249 changes: 0 additions & 249 deletions packages/build-tools/tasks/image-tasks.js

This file was deleted.

14 changes: 0 additions & 14 deletions packages/build-tools/tasks/task-collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const events = require('@bolt/build-utils/events');
const webpackTasks = require('./webpack-tasks');
// const criticalcssTasks = require('./criticalcss-tasks');
const internalTasks = require('./internal-tasks');
const imageTasks = require('./image-tasks');
const iconComponentTasks = require('./icon-component-tasks');
const iconTasks = require('./icon-tasks');

Expand Down Expand Up @@ -163,14 +162,6 @@ async function serve(buildTime = timer.start()) {
// }
// }

async function images() {
try {
await imageTasks.processImages();
} catch (error) {
log.errorAndExit('Images failed', error);
}
}

async function buildPrep(cleanAll = false) {
config = config || (await getConfig());
try {
Expand Down Expand Up @@ -209,10 +200,6 @@ async function build(shouldReturnTime = false) {
}

config.prod || config.watch === false ? await webpackTasks.compile() : '';
await images().catch(error => {
console.log(error);
// log.errorAndExit('Image task failed', error);
});

config.prod || config.watch === false
? await Promise.all(await compileBasedOnEnvironment())
Expand Down Expand Up @@ -284,7 +271,6 @@ async function start() {
module.exports = {
serve,
start,
images,
build,
buildPrep,
watch,
Expand Down

0 comments on commit 28cfc71

Please sign in to comment.