README.md in ariadne_view_components-0.0.59-aarch64-linux vs README.md in ariadne_view_components-0.0.64

- old
+ new

@@ -1,15 +1,17 @@ # Ariadne ViewComponents -This repository contains the Ruby view components for the Ariadne design system. It is composed of several projects: +This repository contains [View Components](https://viewcomponent.org) used by [Yetto.app](https://yetto.app) which we incorporate into a design system called Ariadne. We were frustrated by the lack of quality View Components which make use of [TailwindCSS](https://tailwindcss.com) and [Stimulus](https://stimulus.hotwired.dev). So we contracted [EvilMartians](https://evilmartians.com) to build a system, which we then extracted. +These Ariadne view components are composed of several projects: + - [Tailwind CSS](https://tailwindcss.com) - [Heroicons](https://heroicons.com) - [ViewComponents](https://viewcomponent.org) - [StimulusJS](https://stimulus.hotwired.dev) -This project is basically a fork and rewrite of [Primer's ViewComponents](https://primer.style/view-components/), except instead of Primer, it uses an open source stack we've found useful. **Our eternal gratitude to GitHub's design team for open sourcing that repo.** +Our eternal gratitude to GitHub's design team for open sourcing [Primer View Components](https://github.com/primer/view_components); we were inspired by a lot of their development tooling and foundational work. ## Installation Like [tailwindcss-rails](https://github.com/rails/tailwindcss-rails), this gem also wraps [the standalone executable version](https://tailwindcss.com/blog/standalone-cli) of the Tailwind CSS v3 framework. These executables are platform specific, so there are actually separate underlying gems per platform, but the correct gem will automatically be picked for your platform. Supported platforms are Linux x64, macOS arm64, macOS x64, and Windows x64. (Note that due to this setup, you must install the actual gems – you can't pin your gem to the GitHub repo.) @@ -32,32 +34,78 @@ end ``` document schemes, fetch_or_raise, all that +```css +@import '@ariadne/stylesheets/ariadne_view_components.css'; +``` + +``` +@import "tailwindcss/base"; + +@import "scrollbar.css"; +@import "@ariadne/stylesheets/ariadne_view_components.css"; + +@tailwind components; +@tailwind utilities; +``` + +```js +const ariadneAssetsPath = process.env.ARIADNE_ASSETS_PATH || ""; + +export default defineConfig({ + plugins: [ + # ... + ], + resolve: { + alias: { + "@ariadne": ariadneAssetsPath, + }, + }, +}); +``` + ## remove @tailwind base; this resets styles applied by ariadne, which already resets styles!! ### Incorporating Rubocop and other linters This gem comes with some standard linters to keep your code fresh and consistent. Refer to [the documentation](./docs/content/linting.md) for more information. ## Getting started with development -So, you just cloned the repo, huh? Great. In addition to Ruby 3.x, install [Overmind](https://github.com/DarthSim/overmind) and Node/NPM. Then, run the following script to set up your local environment: +So, you just cloned the repo, huh? Great. In addition to Ruby, install [Overmind](https://github.com/DarthSim/overmind) and Node/NPM. Then, run the following script to set up your local environment: ``` script/setup ``` This will install all the necessary dependencies, plus get you ready for viewing the components and generating the documentation. If you then run `script/server`, this will build and run both the documentation site and launch Lookbook. +4000 lookbook +4100 vite + ### Adding new components -See [the documentation on adding new components](./docs/content/adding_components.md). +There is a generator set up to produce new components: + +```bash +thor generate_view_component ComponentName [attribute] [attribute] +``` + +For example: + +```bash +thor generate_view_component Profile name age +``` + +This creates a component called `Ariadne::UI::Profile::Component`, with two optional attributes (`name` and `age`). It also creates Lookbook preview files, tests, and factories. + +See more details on this generator at `rakelib/generators/view_component/USAGE`. ### Running tests See [the documentation on testing](./docs/content/testing.md).