clean up paths for server and server-dist, remove cors #96
This commit is contained in:
parent
dc64e4bd7f
commit
974a061b44
7 changed files with 9 additions and 154 deletions
|
|
@ -137,6 +137,8 @@ const s3 = s3Upload({
|
|||
const uploadSources = [
|
||||
'dist/**',
|
||||
'!dist/**/*.map',
|
||||
'!dist/images/**/*',
|
||||
'!dist/fonts/**/*',
|
||||
];
|
||||
const upload = () => src(uploadSources, { base: './dist', encoding: false })
|
||||
.pipe(s3({
|
||||
|
|
@ -167,6 +169,9 @@ const uploadImages = () => src(imageSources, { base: './server', encoding: false
|
|||
}),
|
||||
);
|
||||
|
||||
const copyImageSources = () => src(imageSources, { base: './server', encoding: false })
|
||||
.pipe(dest('./dist'));
|
||||
|
||||
const invalidate = () => cloudfront.send(new CreateInvalidationCommand({
|
||||
DistributionId: process.env.DISTRIBUTION_ID,
|
||||
InvalidationBatch: {
|
||||
|
|
@ -184,7 +189,7 @@ const buildPlaylist = async () => {
|
|||
return file('playlist.json', JSON.stringify(playlist)).pipe(dest('./dist'));
|
||||
};
|
||||
|
||||
const buildDist = series(clean, parallel(buildJs, compressJsData, compressJsVendor, copyCss, compressHtml, copyOtherFiles, buildPlaylist));
|
||||
const buildDist = series(clean, parallel(buildJs, compressJsData, compressJsVendor, copyCss, compressHtml, copyOtherFiles, buildPlaylist, copyImageSources));
|
||||
|
||||
// upload_images could be in parallel with upload, but _images logs a lot and has little changes
|
||||
// by running upload last the majority of the changes will be at the bottom of the log for easy viewing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue