Skip to content

Adding global block constants file. - #86

Merged
dcooney merged 3 commits into
feature/block-2.0from
feature/constants
Aug 27, 2020
Merged

dcooney merged 3 commits into
feature/block-2.0from
feature/constants

Conversation

@dcooney

@dcooney dcooney commented Aug 26, 2020 •

Copy link
Copy Markdown
Contributor

DESCRIPTION

Adds a constant.js that holds global constants that can be accessed by all blocks in the library.

SCREENSHOTS

Screen Shot 2020-08-26 at 4 19 55 PM

OTHER

  • Is this issue accessible? (Section 508/WCAG 2.0AA)
  • Does this issue pass linting? (ESLint)

STEPS TO VERIFY

Include constants as required.

Import { PREFIX } from '../../utils/contstants';
console.log(PREFIX); // wdsblocks

DOCUMENTATION

Will this pull request require updating the WDS Blocks wiki?
Yes, it should

@gregrickaby

Copy link
Copy Markdown
Contributor

@dcooney I fixed the spacing errors. Prettier (on Buddy) no longer barks.

@dcooney

dcooney commented Aug 27, 2020

Copy link
Copy Markdown
Contributor Author

Thank you @gregrickaby Appears that my local prettier config is taking precedence over the project settings. Need to investigate this.

@dcooney
dcooney requested a review from ravewebdev August 27, 2020 12:49
@dcooney
dcooney marked this pull request as ready for review August 27, 2020 12:49
@dcooney
dcooney requested a review from gregrickaby August 27, 2020 12:49

@gregrickaby gregrickaby left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@dcooney This looks good to me. 👍🏻

I would prefer the file be named config.js, because that's how I run my personal JS based projects. I'll defer to the group though and am fine with constants.js 😄

@dcooney

dcooney commented Aug 27, 2020

Copy link
Copy Markdown
Contributor Author

@gregrickaby I like config.js as well. I borrowed constants.js name from the NextJS WP starter.

@ravewebdev ravewebdev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! I also like config.js, FWIW.

@gregrickaby

Copy link
Copy Markdown
Contributor

@dcooney Cool, we're all in agreement. Can you rename the file? Then we can merge this in.

@dcooney

dcooney commented Aug 27, 2020

Copy link
Copy Markdown
Contributor Author

@gregrickaby File renamed.

@dcooney
dcooney merged commit 04ab4b9 into feature/block-2.0 Aug 27, 2020
@dcooney
dcooney deleted the feature/constants branch August 27, 2020 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants