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

CMS Agnostic Support / Starter Kit #134

Closed
danleecpi opened this issue Apr 1, 2021 · 6 comments
Closed

CMS Agnostic Support / Starter Kit #134

danleecpi opened this issue Apr 1, 2021 · 6 comments

Comments

@danleecpi
Copy link

Is your feature request related to a problem? Please describe.
Just following on the conversation regarding the "app" starterkit for CraftCMS. @iuscare feel free to add your thoughts below as you seem to have the most experience working with Wingsuit and Craft.

Describe the solution you'd like
Craft CMS allows you to build templates using twig. Craft templates live in the "templates" folder at the root of the install.

craft/templates

If there was an automated process that ported over components on save into a subfolder of a Craft templates folder from Wingsuit that would be amazing. It would then allow utilization of the components to build modular templates more quickly and with instant previewing and debugging in the CMS.

@iuscare might have some insight into how he is doing this currently - but an out-the-box config would be great and allow Craft groupies to get started quickly.

A few thoughts on how this could work

  • Keeping wingsuit design library separate and outside of the Craft folder/ecosystem so it can be built on independently
  • A configurable design library folder containing components. Maybe the default could be: craft/templates/design-library?
  • I have noticed references to Drupal in Wingsuit folder and code. This might be confusing for Craft users or other CMS users. Can we make CMS agnostic?

My Example Local Dev Setup

For context, this is how I have placed Wingsuit and Craft CMS side by side for local development.

Screenshot 2021-04-01 at 14 33 16

@christianwiedemann
Copy link
Contributor

Hi, I added a cms boilerplate https://github.com/christianwiedemann/cms-boilerplate to become a more detailed vision of how a generic CMS build could work. Maybe we should rename this issue to CMS Starter Kit.

Would be great if you can check it out and run

yarn install 
yarn dev:cms 
# OR 
yarn build:cms 

The goal should be a generic app that handles generation assets in a CMS independent

Inside the wingsuit.config.js you can configure paths etc. I used your example as test folder structure.

@danleecpi danleecpi changed the title Craft CMS Support / Starter CMS Agnostic Support / Starter Apr 5, 2021
@danleecpi
Copy link
Author

Hi @christianwiedemann

Sorry for the delay getting back to you on this and THANK YOU for the hard work on this feature - it will help tremendously and I think be of real interest to the Craft CMS Community and any other CMS based on Twig templating. I have just tested it out and it works well. I think it might be worth getting some more eyes on the feature though.

@khalwat might be able to advise further on how this could best work with his Craft CMS Scaffolding. Andrew: this is a Design/Pattern Library called Wingsuit that uses TailwindCSS - this new feature is influenced by your Craft CMS Scaffolding file structure. Components can get generated and transferred into the craft templates folder and a 'dist' folder can be defined to.

@danleecpi
Copy link
Author

Question
In the Wingsuit config for cssMode it is set to extract. Out of interest is there other values this accepts? cssMode: 'extract',

@danleecpi danleecpi changed the title CMS Agnostic Support / Starter CMS Agnostic Support / Starter Kit Apr 9, 2021
@christianwiedemann
Copy link
Contributor

'extract' or 'hot'. Hot is used inside storybook. All CMS I know needs extracted CSS files.

@danleecpi
Copy link
Author

Thanks @christianwiedemann that makes sense.

@christianwiedemann
Copy link
Contributor

Hi @danleecpi. You can now use yarn ws generate-app to generate the app. Will close this issue for now

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