From d64bb5e7a25f14601f920216ff92e6ef01bbbca4 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 18 Oct 2024 23:20:01 -0400 Subject: [PATCH] Readme addtiions --- Readme.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/Readme.md b/Readme.md index a8c5f6f..57f40fd 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,12 @@ # DS2 Core +## Requirements +The requirements for ds2-core are pretty light. You'll want to be able to process [PugJS](https://pugjs.org/api/getting-started.html) (formerly Jade) and [SCSS](https://sass-lang.com/documentation/) -- and that's about it. + +For our own design system, we use ds2-core with [Prepros](https://prepros.io) (which you can use the Free Unlimited Trial for, but why not splurge and spend the $30USD to support the developer). On MacOS, you could also use [CodeKit](https://codekitapp.com/). + +Alternatively, if you have pre-processor pipelines for Pug and SCSS, which you can install using npm, or any other language you decide to pull in, you can use those to compile if that ends up being easier for you. The framework isn't too picky, so long as things go into the right place. + ## "Installation" File | Processes to @@ -11,20 +18,23 @@ src/pg/core/download.php.pug | public All other pug files should compile to from src/pg/ to a relative path of public/* - ## Running the core -functions +### Callback functions +Callback functions can be used in -beforeArticleLoad - called before any patterns are started to load -success - called when loading a pattern is successful if the result is an HTTP 200 -afterArticleLoad - called after any patterns are started to load -done - called when the ajax for any pattern is done, whether successful or not. This is a useful place to load any javascript initializations that pattern. +- beforeArticleLoad - called before any patterns have started to load +- success - called when loading a pattern is successful if the result is an HTTP 200 +- afterArticleLoad - called after any patterns have started to load +- done - called when the ajax for any pattern is done, whether successful or not. This is a useful place to load any javascript initializations that pattern. -## About the content variable +## Creating an item -The content variable in \_config.pug defines your array of patterns. It is made up of the following attributes: + +## The content object + +The content variable in \/src\/pg\/_config.pug defines your array of patterns. It is made up of the following attributes: - name - the hypenated name of the pattern - status - this should be one of the statuses from your status array - display - (optional) if present this will be displayed, as is, instead of the name @@ -49,6 +59,11 @@ In your design system implementation, This will ensure that the .pug file will get processed and the .pp file will be handled as text will get compiled, but they should display correctly and remain in sync while maintaining the minimum number of files. +## Using core code with your own pattern documentation. +Using + +## Troubleshooting + ## Credits This framework includes [PrismJS](https://prismjs.com/) for code syntax highlighting. PrismJS is released under the [MIT license](https://opensource.org/licenses/MIT)>