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

Discussion: Using Svelte for a CMS #10

Open
saibotsivad opened this Issue Jul 14, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@saibotsivad
Owner

saibotsivad commented Jul 14, 2017

I'm going to be leaving notes here as people ask me questions about this article.

If you have general discussion points, find spelling errors, or anything else, feel free to either open a new issue or leave it as a comment here.

Thanks! ❤️

@saibotsivad

This comment has been minimized.

Show comment
Hide comment
@saibotsivad

saibotsivad Jul 14, 2017

Owner

The folder structure for the components looks something like this:

component/
  |-form/
  |  |-element
  |  |  |-Alert.html
  |  |  |-AlertDismissable.html
  |  |  |-ContentUtilityBar.html
  |  |   \RelatedContentLinks.html
  |  |-field
  |  |  |-Checkbox.html
  |  |  |-Integer.html
  |  |   \Text.html
  |   \special
  |      |-ThingOne.html
  |       \ThingTwo.html
  |-ModalDialog.html
   \PageTitle.html

When a component is imported, it's usually import FormFieldInteger from... or import FormElementAlert from... or import ModalDialog from... where the naming isn't enforced, it's just that way by convention.

Sometimes that gets wordy:

import FormElementContentUtilityBar from 'path/component/form/element/ContentUtilityBar.html'

So in practice I am only really consistent on the "form field" components, since things like FormFieldInteger aren't very long. For the utility bar, I'd write import ContentUtilityBar from... instead.

Owner

saibotsivad commented Jul 14, 2017

The folder structure for the components looks something like this:

component/
  |-form/
  |  |-element
  |  |  |-Alert.html
  |  |  |-AlertDismissable.html
  |  |  |-ContentUtilityBar.html
  |  |   \RelatedContentLinks.html
  |  |-field
  |  |  |-Checkbox.html
  |  |  |-Integer.html
  |  |   \Text.html
  |   \special
  |      |-ThingOne.html
  |       \ThingTwo.html
  |-ModalDialog.html
   \PageTitle.html

When a component is imported, it's usually import FormFieldInteger from... or import FormElementAlert from... or import ModalDialog from... where the naming isn't enforced, it's just that way by convention.

Sometimes that gets wordy:

import FormElementContentUtilityBar from 'path/component/form/element/ContentUtilityBar.html'

So in practice I am only really consistent on the "form field" components, since things like FormFieldInteger aren't very long. For the utility bar, I'd write import ContentUtilityBar from... instead.

@tomcon

This comment has been minimized.

Show comment
Hide comment
@tomcon

tomcon Mar 18, 2018

Thanks for the time you put into this and also the original app tutorial at https://github.com/saibotsivad/svelte-app-tutorial
good work! 👍

tomcon commented Mar 18, 2018

Thanks for the time you put into this and also the original app tutorial at https://github.com/saibotsivad/svelte-app-tutorial
good work! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment