Drupal Design Themes - NCIOCPL/cgov-digital-platform GitHub Wiki
Theme Design
- profiles
- custom
- cgov_base
- themes
- cgov_common - Theme common to all CancerGov Digital Platform sites
-
dist - The build process places the built css & js files into this folder for use in library configuration. This directory is untracked by source control.
-
js -
- article.js
- ...
-
css -
- article.css
- ...
-
js -
-
src - Pre-built files. This should be removed from the final deployment artifact. (So if you need anything from here, it better get placed in dist.
-
main - Top-level publishable CSS and JS files. These are the "entry points" defined in the webpack config.
-
article - The Article content type.
-
article.js
- The Page Level JS file -
article.scss
- The Page Level CSS file
-
- ...
-
article - The Article content type.
-
modules - Reusable & shared modules
-
accordion - Accordion module
_accordion.scss
accordion.js
- ...
-
accordion - Accordion module
-
main - Top-level publishable CSS and JS files. These are the "entry points" defined in the webpack config.
- templates - Drupal templates
cgov_common.info.yml
-
webpack.js
- Main webpack
-
dist - The build process places the built css & js files into this folder for use in library configuration. This directory is untracked by source control.
- cgov_common - Theme common to all CancerGov Digital Platform sites
- themes
- www_profile - www.cancer.gov specific profile??
- themes
- cgov_www - www.cancer.gov theme
-
dist - The build process places the built css & js files into this folder for use in library configuration. This directory is untracked by source control.
-
js
- article.js
- pdq_summary.js
- ...
-
css
- article.css
- pdq_summary.css
- ...
-
js
-
src - Pre-built files. This should be removed from the final deployment artifact. (So if you need anything from here, it better get placed in dist.
-
main - Top-level publishable CSS and JS files. These are the "entry points" defined in the webpack config. This should only contain those entry points unique to this theme.
-
pdq_summary - The Article content type.
-
pdq_summary.js
- -
pdq_summary.scss
-
-
-
pdq_summary - The Article content type.
-
modules - Reusable & shared modules
- ...
-
main - Top-level publishable CSS and JS files. These are the "entry points" defined in the webpack config. This should only contain those entry points unique to this theme.
- templates - Drupal templates
cgov_www.info.yml
-
webpack.config.js
- www webpack
-
dist - The build process places the built css & js files into this folder for use in library configuration. This directory is untracked by source control.
- cgov_www - www.cancer.gov theme
- themes
- cgov_base
- custom
module.exports = {
context: path.resolve(__dirname, "src"),
entry: {
'article': path.resolve(__dirname, 'src/main/article'),
},
resolve: {
modules: [
//Assumption that the paths will have absolute paths if
//modules array were inspected.
path.resolve(__dirname, 'src/modules'),
path.resolve(__dirname, 'src/main'),
path.resolve(__dirname, 'node_modules')
]
}
}
const parentConfig = require(path.join(__dirname, '../../../cgov_base/themes/cgov_common/webpack.config.js'));
module.exports = {
context: path.resolve(__dirname, "src"),
entry: {
...parentConfig.exports.entry,
'pdq_summary': './src/main/pdq_summary'
},
resolve: {
modules: [
...parentConfig.resolve.modules,
path.resolve(__dirname, 'src/modules'),
path.resolve(__dirname, 'src/main'),
path.resolve(__dirname, 'node_modules'),
]
}
}