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

conf: direct file imports (globally unique file names) #467

Merged
merged 1 commit into from
Oct 29, 2020

Conversation

ealush
Copy link
Owner

@ealush ealush commented Oct 25, 2020

Q A
Bug fix?
New feature?
Breaking change?
Deprecations?
Documentation?
Tests added?

Absolute import and src file naming

All the files under src are unique, and their imports are aliased for absolute imports so you can import the a module using only its filename:

import state from 'state';

Instead of

import state from '../../state';

IDE support

Most modern IDEs will support those aliases using the jsconfig.json file in the project root. If you move files around, or create new files during local development, you can run yarn dev to watch your changes and automatically generate the jsconfig file.

@ealush ealush force-pushed the 2020-10-25-global-filenames branch 16 times, most recently from b8bcba9 to ce83950 Compare October 29, 2020 23:20
@ealush ealush marked this pull request as ready for review October 29, 2020 23:27
@ealush ealush force-pushed the 2020-10-25-global-filenames branch from ce83950 to af62f4c Compare October 29, 2020 23:44
@ealush ealush force-pushed the 2020-10-25-global-filenames branch from af62f4c to 1470f5d Compare October 29, 2020 23:50
@ealush ealush changed the title WIP - Global File Names conf: direct file imports (globally unique file names) Oct 29, 2020
@ealush ealush merged commit a10ae8a into latest Oct 29, 2020
@ealush ealush deleted the 2020-10-25-global-filenames branch October 29, 2020 23:54
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.

None yet

1 participant