This content originally appeared on DEV Community and was authored by Nitzan Hen
The third minor version of Agrippa, the React component CLI, is finally out!
Since v1.2.0 came out, Agrippa has seen tremendous growth - counting the difference in stars on the GitHub repo, for example, we've grown by 120% (154 stars) over the course of just over 40 days!
More issues are also being opened (and closed!) on GitHub, too.
This is a good opportunity to say that I'm truly grateful for everyone who have tried Agrippa out and joined the community; I'm delighted to see Agrippa growing and being used, and I'm super excited for it to grow and improve further in the future.
So, thanks everyone!
If you're not using Agrippa, join us! Get started here.
As for the new version, this one was in the works for longer than the previous two; integration tests, in particular, were a challenge to implement.
Version 1.3.0 brings the following changes:
The separate-index scheme: Agrippa's default component directories structure now separates the main component file, which contains the component's declaration and logic, from the
index
file, which is the component directory's entry point. Previously, Agrippa placed the component logic under theindex
file, which resulted in less files overall - but made it harder to distinguish between components in IDEs, which hurt the developer experience. Generated components should be easier to work with now! Many thanks to @wickedpuppy for suggesting this feature.
For more info, check outseparate-index
on Agrippa's docs.Support for React Native: Agrippa now supports React Native projects!
Furthermore, it can auto-detect a react native project by having thereact-native
dependency in itspackage.json
,so you don't really need to configure anything in a typical project! Of course, styling with React Native'sStyleSheets
is also supported (and, for React Native projects, also enforced).
For more info, check outreactNative
on Agrippa's docs.Agrippa is now covered by integration tests, as well as more unit tests.
Integration tests were a challenge - since Agrippa is all about reading and writing files automatically, testing it effectively requires setting up and running in a completely isolated environment! We ended up combining Docker, Jest and some custom code to create a pretty sophisticated solution, and it works quite well.
More tests are on the way, but the tool already has pretty good coverage.-
Tweaks & Bug fixes:
-
props
=ts
can no longer be used without thetypescript
flag; additionally, thetypescript
flag now implies thatprops
=ts
(of course, this is overridden by any value set by the user). - The
allowOutsideBase
check is now skipped ifbaseDir
is not specified. - Fixed a bug where
--children
would generate<div>children</div>
instead of<div>{children}</div>
in the JSX template.
-
Your thoughts and feedback, as always, are most welcome.
If you've found a bug with this release, or want to suggest a new feature, please submit an issue.
Have a great week!
This content originally appeared on DEV Community and was authored by Nitzan Hen
Nitzan Hen | Sciencx (2021-12-04T21:46:55+00:00) Agrippa 1.3 is out πππ. Retrieved from https://www.scien.cx/2021/12/04/agrippa-1-3-is-out-%f0%9f%8e%89%f0%9f%8e%89%f0%9f%8e%89/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.