-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hotfix: add watch command to the Bolt build config so there's a consi…
…stent check for tasks that internally need to watch files for changes; addresses non-prod build issues that cropped up during the v2.1.0-beta.0 release. Also add updates to address Jest tests being unable to run till a full Bolt build has completed
- Loading branch information
Showing
12 changed files
with
117 additions
and
35 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const webpackTasks = require('@bolt/build-tools/tasks/webpack-tasks'); | ||
const createWebpackConfig = require('@bolt/build-tools/create-webpack-config'); | ||
const { buildPrep } = require('@bolt/build-tools/tasks/task-collections'); | ||
const { getConfig } = require('@bolt/build-tools/utils/config-store'); | ||
|
||
module.exports = async function() { | ||
try { | ||
let config = await getConfig(); | ||
await buildPrep(); // Generate folders, manifest data, etc needed for Twig renderer | ||
|
||
// don't compile anything in Webpack except for the exported JSON data from Bolt's Design Tokens | ||
config.components.global = ['./packages/core/styles/index.scss']; | ||
config.components.individual = []; | ||
|
||
// Disabling Sourcemaps here technically isn't REQUIRED but this might help speed things along, especially on Travis | ||
config.sourceMaps = false; | ||
|
||
const customWebpackConfig = await createWebpackConfig(config); | ||
|
||
await webpackTasks.compile(customWebpackConfig); | ||
} catch (error) { | ||
console.log(error); | ||
} | ||
}; |
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
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