This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade terra-framework to terra-dev-site v7 (#1359)
* upgrade terra-framework to terra-dev-site v7 * remove old dev-site config, fix providers tests * update screenshots for the fusion theme * change log * use terra-dev-site-v7 * fix build * Test fixes * add some style ignores * update clinical theme screens * update to released package
- Loading branch information
Showing
20 changed files
with
121 additions
and
126 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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
Binary file added
BIN
+7.07 KB
...n-fusion-theme/en/chrome_medium/theme-provider-spec/Theme_Provider[default].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.7 KB
...um/theme-provider-spec/Theme_Provider[updated_themed_component_after_click].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-9 Bytes
(100%)
..._/reference/orion-fusion-theme/en/chrome_medium/theme-provider-spec/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3 Bytes
(100%)
...e/en/chrome_medium/theme-provider-spec/updated_themed_component_after_click.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.03 KB
...ion-fusion-theme/en/chrome_tiny/theme-provider-spec/Theme_Provider[default].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.6 KB
...ny/theme-provider-spec/Theme_Provider[updated_themed_component_after_click].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-9 Bytes
(100%)
...s__/reference/orion-fusion-theme/en/chrome_tiny/theme-provider-spec/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-5 Bytes
(100%)
...eme/en/chrome_tiny/theme-provider-spec/updated_themed_component_after_click.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,48 +1,59 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
const { merge } = require('webpack-merge'); | ||
const path = require('path'); | ||
const { merge } = require('webpack-merge'); | ||
const { | ||
TerraDevSite, | ||
TerraDevSiteEntrypoints, | ||
DirectorySwitcherPlugin, | ||
LocalPackageAliasPlugin, | ||
} = require('terra-dev-site'); | ||
} = require('@cerner/terra-dev-site'); | ||
|
||
const WebpackConfigTerra = require('@cerner/webpack-config-terra'); | ||
/** | ||
* Generates the file representing app name configuration. | ||
*/ | ||
const devSiteConfig = (env = {}, argv = { p: false }) => { | ||
const production = argv.p; | ||
const processPath = process.cwd(); | ||
|
||
return { | ||
entry: TerraDevSiteEntrypoints, | ||
plugins: [ | ||
new TerraDevSite({ env }), | ||
], | ||
resolve: { | ||
plugins: [ | ||
new DirectorySwitcherPlugin({ | ||
shouldSwitch: !production, | ||
rootDirectories: [ | ||
processPath, | ||
path.resolve(processPath, 'packages', '*'), | ||
], | ||
}), | ||
new LocalPackageAliasPlugin({ | ||
rootDirectories: [ | ||
processPath, | ||
path.resolve(processPath, 'packages', '*'), | ||
], | ||
}), | ||
const coreConfig = (env = {}) => ({ | ||
plugins: [ | ||
new TerraDevSite({ | ||
defaultLocale: env.defaultLocale, | ||
primaryNavigationItems: [{ | ||
path: '/home', | ||
label: 'Home', | ||
contentExtension: 'home', | ||
additionalContent: [ | ||
{ | ||
title: 'Home', | ||
filePath: path.resolve(process.cwd(), 'README.md'), | ||
}, | ||
], | ||
}, { | ||
path: '/application', | ||
label: 'Application', | ||
contentExtension: 'app', | ||
}, { | ||
path: '/components', | ||
label: 'Components', | ||
contentExtension: 'doc', | ||
}, { | ||
path: '/dev_tools', | ||
label: 'Developer Tools', | ||
contentExtension: 'tool', | ||
}, { | ||
path: '/guides', | ||
label: 'Guides', | ||
contentExtension: 'guide', | ||
}, { | ||
path: '/tests', | ||
label: 'Tests', | ||
contentExtension: 'test', | ||
}, { | ||
path: '/provider', | ||
label: 'Provider', | ||
contentExtension: 'provider', | ||
}], | ||
sideEffectImportFilePaths: [ | ||
path.resolve(process.cwd(), 'initalizeXFC.js'), | ||
], | ||
}, | ||
}; | ||
}; | ||
}), | ||
], | ||
}); | ||
|
||
const webpackConfig = (env, argv) => ( | ||
merge(WebpackConfigTerra(env, argv), devSiteConfig(env, argv)) | ||
const mergedConfig = (env, argv) => ( | ||
merge(WebpackConfigTerra(env, argv), coreConfig()) | ||
); | ||
|
||
module.exports = webpackConfig; | ||
module.exports = mergedConfig; |