Skip to content

Commit

Permalink
Remove content build (#17121)
Browse files Browse the repository at this point in the history
* Remove content build again

* Fix appRegistryPath

* Comment old CopyPlugin

* Update landing page template
  • Loading branch information
theodur authored May 7, 2021
1 parent 0eadde9 commit 704b3bb
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
44 changes: 22 additions & 22 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,16 @@ module.exports = (env = {}) => {
}

// Copy over image assets for when metalsmith is removed
// baseConfig.plugins.push(
// new CopyPlugin({
// patterns: [
// {
// from: 'src/site/assets',
// to: path.join(outputPath, '..', ''),
// },
// ],
// }),
// );
baseConfig.plugins.push(
new CopyPlugin({
patterns: [
{
from: 'src/site/assets',
to: path.join(outputPath, '..', ''),
},
],
}),
);

// Optionally generate landing pages in the absence of a content build.
if (buildOptions.scaffold) {
Expand Down Expand Up @@ -347,7 +347,7 @@ module.exports = (env = {}) => {
}, [])
.join('');

const appRegistryPath = 'src/applications/registry.json';
const appRegistryPath = '../content-build/src/applications/registry.json';
let appRegistry;

if (fs.existsSync(appRegistryPath)) {
Expand Down Expand Up @@ -378,7 +378,7 @@ module.exports = (env = {}) => {
widgetType,
widgetTemplate,
facilitySidebar,

rootUrl,
// Default template metadata.
breadcrumbs_override: [], // eslint-disable-line camelcase
includeBreadcrumbs: false,
Expand Down Expand Up @@ -407,16 +407,16 @@ module.exports = (env = {}) => {
);

// Copy over image assets to fill in the header and other content.
baseConfig.plugins.push(
new CopyPlugin({
patterns: [
{
from: 'src/site/assets/img',
to: path.join(outputPath, '..', 'img'),
},
],
}),
);
// baseConfig.plugins.push(
// new CopyPlugin({
// patterns: [
// {
// from: 'src/site/assets/img',
// to: path.join(outputPath, '..', 'img'),
// },
// ],
// }),
// );

// Open the browser to either --env.openTo or one of the root URLs of the
// apps we're scaffolding
Expand Down
2 changes: 1 addition & 1 deletion jenkins/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ done
# exit code. In this case, if the build command fails, the tee
# command won't trick Jenkins into thinking the step passed.
set -o pipefail
npm --no-color run build -- --verbose --buildtype="$envName" --asset-source="$assetSource" --drupal-address="$drupalAddress" --drupal-max-parallel-requests="$drupalMaxParallelRequests" "$omitdebug" "$pullDrupal" "$noDrupalProxy" 2>&1 | tee "$buildLog"
npm --no-color run build -- --verbose --scaffold --buildtype="$envName" --asset-source="$assetSource" --drupal-address="$drupalAddress" --drupal-max-parallel-requests="$drupalMaxParallelRequests" "$omitdebug" "$pullDrupal" "$noDrupalProxy" 2>&1 | tee "$buildLog"

exit $?
8 changes: 4 additions & 4 deletions script/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ else
fi

# Build the content
if [ -n "${forceContentBuild}" ] || [ "${buildtype}" != "vagovdev" ]
then
yarn build:content $args
fi
# if [ -n "${forceContentBuild}" ] || [ "${buildtype}" != "vagovdev" ]
# then
# yarn build:content $args
# fi
2 changes: 1 addition & 1 deletion src/platform/landing-pages/dev-template.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
<% if (widgetType) { %>
<% if (widgetTemplate == 'navigation/facility_sidebar_nav') { %>
<script nonce="**CSP_NONCE**" type="text/javascript">
window.sideNav = <%= JSON.stringify(facilitySidebar) %>;
window.sideNav = <%= JSON.stringify({rootPath: rootUrl, data: facilitySidebar}) %>;
</script>
<nav data-template="navigation/facility_sidebar_nav" aria-label="secondary" data-widget-type="side-nav"></nav>
<% } %>
Expand Down

0 comments on commit 704b3bb

Please sign in to comment.