Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constants Helper #189

Merged
merged 1 commit into from
Mar 2, 2016
Merged

Conversation

StevenLangbroek
Copy link
Contributor

This utility makes creating constants a little less verbose and error-prone. When writing tests for it, I noticed electron-mocha doesn't support (and probably never will support) --watch, see #18, so I added watch as devDependency and a new task for running tests on file changes.

  • Add watch as dependency for TDD, plus 'test:watch' task
  • Add createConstants utility + specs

- Add watch as dependency for TDD, plus 'test:watch' task
- Add createConstants utility + specs
rgbkrk added a commit that referenced this pull request Mar 2, 2016
@rgbkrk rgbkrk merged commit acb7205 into nteract:master Mar 2, 2016
@rgbkrk
Copy link
Member

rgbkrk commented Mar 2, 2016

💥

@rgbkrk
Copy link
Member

rgbkrk commented Mar 2, 2016

That's clean!

@rgbkrk
Copy link
Member

rgbkrk commented Mar 2, 2016

Looks like the app isn't launching after this, digging now.

@rgbkrk rgbkrk mentioned this pull request Mar 2, 2016
'UPDATE_CELL_EXECUTION_COUNT',
'UPDATE_CELL_OUTPUTS',
'UPDATE_CELL_SOURCE'
);
Copy link
Member

Choose a reason for hiding this comment

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

It occurs to me that we no longer get good autocomplete with the constants being generated directly.

If we switch it back to explicit exports, we get named exports to come up complete with type information:

screenshot 2016-03-03 22 38 05

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well it doesn't know the type anymore. Is that important when working with this piece of code?

Copy link
Member

Choose a reason for hiding this comment

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

All about hints and developer experience here. I'm not going to argue either way, I noticed the limitation and pointed it out.

@lock
Copy link

lock bot commented Apr 4, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked and limited conversation to collaborators Apr 4, 2018
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.

None yet

2 participants