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

Structure ideas #1

Open
Benny739 opened this issue Jul 20, 2022 · 1 comment
Open

Structure ideas #1

Benny739 opened this issue Jul 20, 2022 · 1 comment

Comments

@Benny739
Copy link
Collaborator

Benny739 commented Jul 20, 2022

  • apps

    • angular-notitap
    • react-notitap <- Tiptap.tsx goes here
    • vue-notitap
  • libs

    • tiptap

      • extensions

        • media-resize (if framework specific nodes, 1 library per framework)

          • angular -> These can be publishable libraries
          • vue
          • react
          • core -> Framework agnostic part goes here, framework specific libs import agnostic code
            • e.g. import from react library:
            • import { mediaResize } from '@notitap/tiptap/extensions/media-resize/core
        • traling-nodes -> if framework agnostic no subfolders / libs

      • ui

        • menus
          • slash-menu
            • angular
            • vue
            • react
            • core
      • utils

    • shared

      • util

tags: framework: angular,vue,react,shared

Example rules to prevent wrong imports:

{
  "sourceTag": "framework:angular",
  "onlyDependOnLibsWithTags": [
    "framework:angular",
    "framework:shared",
  ]
},
{
  "sourceTag": "framework:react",
  "onlyDependOnLibsWithTags": [
    "framework:react",
    "framework:shared",
  ]
},

Example commands to create different libraries
nx g @nrwl/workspace:library media-resize --directory tiptap/extensions/shared --tags framework:shared
https://nx.dev/packages/workspace/generators/library
nx g @nrwl/react:library media-resize --directory tiptap/extensions/shared --tags framework:react
https://nx.dev/packages/react/generators/library
nx g @nrwl/angular:library media-resize --directory tiptap/extensions/shared --tags framework:react

Ressources:

@sereneinserenade
Copy link
Member

@Benny739 To me this seems perfect, looks like you're created a solid structure. I'd say let's move forward with this. ⚡

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

No branches or pull requests

2 participants