MCPcopy
hub / github.com/ampproject/amphtml / copyCss

Function copyCss

build-system/tasks/css/index.js:74–87  ·  view source on GitHub ↗

* Copies the css from the build folder to the dist folder * @return {Promise }

()

Source from the content-addressed store, hash-verified

72 * @return {Promise<void>}
73 */
74async function copyCss() {
75 const startTime = Date.now();
76 await fs.ensureDir('dist/v0');
77 for (const {outCss} of cssEntryPoints) {
78 await fs.copy(`build/css/${outCss}`, `dist/${outCss}`);
79 }
80 const cssFiles = await fastGlob('build/css/*.css');
81 await Promise.all(
82 cssFiles.map((cssFile) => {
83 return fs.copy(cssFile, `dist/v0/${path.basename(cssFile)}`);
84 })
85 );
86 endBuildStep('Copied', 'build/css/*.css to dist/v0/*.css', startTime);
87}
88
89/**
90 * Writes CSS to build folder

Callers 1

runPreDistStepsFunction · 0.85

Calls 2

endBuildStepFunction · 0.85
nowMethod · 0.80

Tested by

no test coverage detected