Releases: Adedoyin-Emmanuel/methane-cli
Methane-Cli v1.4.9
Methane v1.4.9 🚀
What's new ❓
The latest patch version 1.4.9 introduces a crucial fix that enhances the naming conventions for generated components and Next.js pages. This update ensures hyphenated names are correctly capitalized, providing a more consistent and readable codebase.
Component Capitalization Fix:
When generating components with hyphenated names, Methane-CLI will now correctly capitalize each segment of the name. For instance, creating a component named animated-button will result in a component named AnimatedButton. This ensures that components follow standard PascalCase naming conventions, enhancing code readability and consistency.
Next.js Page Capitalization Fix:
Similarly, generating Next.js pages with hyphenated names will now produce correctly capitalized page names. For example, a page named 2fa-auth will be created as 2FaAuth, user-appointments as UserAppointments, and privacy-policy as PrivacyPolicy. This fix ensures that page names are intuitive and follow common naming practices.
# Generating a React Component
mac@Macs-MBP~/D/react-app$ methane g -c animated-button
# This will create a component named AnimatedButton
# Generating a Next.js Page
mac@Macs-MBP~/D/react-app$ methane g -np user-appointments
# This will create a page named UserAppointments
What's Changed
- V1.4.9 by @Adedoyin-Emmanuel in #42
Full Changelog: v1.4.8...1.4.9
Methane-Cli v1.4.1
What's New ❓
I'm super excited to release a patch version for methane 🚀 Version 1.4.1 aims to fix issues related to the components and pages generation.
- React Components and Pages as well as NextJs Components, Pages name default to
index.jsx
orindex.tsx
if generateFolder configuration is specified. This makes components and pages import cleaner and easier to understand. For example, if you generate a component calledButton
, the generated component path would beButton/index.jsx
orButton/index.tsx
and you can import it like thisimport Button from './components/Button'
. Unlike before where you would have to import it like thisimport Button from './components/Button/Button'
. - Fixed component and page capitalization issues. In previous versions of Methane, if you generate a component called
button
, the file name remainsbutton
but the generated component would bebutton
instead ofButton
. This has been fixed in this version. - Gracefully handled potential errors that might occur when generating pages or components.
- Added a new argument
-d
or--default
tomethane init
command. This allows developers to easily initialize Methane with the default configuration without being prompted to answer questions. This is useful when you want to quickly initialize Methane in a new project. Note You can always update the Methane configuration by runningmethane config
command.
Methane-CLI 1.1.0
What's New ?
Added a new command list-config [ls]
--list-config
or-lc
: Lists all Methane-Cli configurations.
doyin@doyinHpLaptop:~/Desktop/react-app$ methane-cli list-config
All configurations
{
template: 'jsx',
component: 'arrow',
page: 'arrow',
generateStylesheet: 'true',
generateFolder: 'true',
register: 'true',
stylesheetType: 'css'
}