Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

add ability to run deploy on static client #30

Merged
merged 11 commits into from
Feb 6, 2019

Conversation

Blackbaud-TimPepper
Copy link
Contributor

No description provided.

lib/assets.js Outdated

if (isStaticClient) {
// This should just return the single project bundle
const bundle = glob.sync(path.join(dist, 'bundles', '*.js'));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of our bundles definitely have multiple files (regular vs minified). I would adjust this to publish anything *.* inside the bundles folder.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we want all the files? Currently the following logic receives a single path. What would be the best path forward for handling multiple files?

lib/assets.js Outdated
if (isStaticClient) {
return glob.sync(path.join(dist, 'bundles', '*.js'))
.map(bundle => {
const bundlePath = bundle.split('/');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest using path.getbasename() method instead. https://nodejs.org/api/path.html#path_path_basename_path_ext

@Blackbaud-TimPepper Blackbaud-TimPepper changed the base branch from add-logSkyuxVersion-prop to master January 25, 2019 15:43
@codecov-io
Copy link

codecov-io commented Jan 25, 2019

Codecov Report

Merging #30 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #30   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           7      7           
  Lines         148    162   +14     
  Branches       15     19    +4     
=====================================
+ Hits          148    162   +14
Impacted Files Coverage Δ
lib/utils.js 100% <ø> (ø) ⬆️
lib/assets.js 100% <100%> (ø) ⬆️
lib/settings.js 100% <100%> (ø) ⬆️
lib/deploy.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e872b7...4927226. Read the comment docs.

lib/assets.js Outdated
let metadataPath = path.join(dist, 'metadata.json');

if (isStaticClient) {
return glob.sync(path.join(dist, 'bundles', '*.js'))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good to me @Blackbaud-TimPepper. I think I have one small last change, I would go ahead and add a line (around line 12) like const bundlesDist = path.join(dist, 'bundles') and use that here and line 73. That way if we ever change the folder, it's only in one spot.

Copy link

@Blackbaud-BobbyEarl Blackbaud-BobbyEarl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work. Thanks @Blackbaud-TimPepper!

@Blackbaud-BobbyEarl Blackbaud-BobbyEarl merged commit 03d85b8 into master Feb 6, 2019
@Blackbaud-BobbyEarl Blackbaud-BobbyEarl deleted the add-static-client-flag branch February 6, 2019 01:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants