1.0.5 • Published 3 years ago

aacm v1.0.5

Weekly downloads
15
License
MIT
Repository
github
Last release
3 years ago

aacm

aacm makes components and styles for you.

Installation

aacm is meant to be installed globally, then used from your app's src/ directory (or equivalent).

$ sudo npm i -g aacm


Syntax

aacm [flags] <ComponentName>

For example,

aacm ItemDetail

gives you...

./components/ItemDetail/ItemDetail.jsx

import React from 'react';

import './ItemDetail.scss';

function ItemDetail() {
  return (
    <div className="ItemDetail">

    </div>
  );
}

export default ItemDetail;

and

./components/ItemDetail/ItemDetail.scss

.ItemDetail {
    
}

Now multiply that by every component you'll ever create and you've saved yourself some time. =)


Multiple Components

You can pass in multiple component names at once, like so...

aacm Thing1 Thing2 Thing3

This creates...

./components/Thing1/Thing1.jsx
./components/Thing1/Thing1.scss
./components/Thing2/Thing2.jsx
./components/Thing2/Thing2.scss
./components/Thing3/Thing3.jsx
./components/Thing3/Thing3.scss

according to the flags.


Flags

FlagEffect
-c, --classGenerates class components
Uses modern syntax
-f, --functionalGenerates functional components
This is the default
-h, --helpShows available flags
-i, --asiConfidence Mode
Use Automatic Semicolon Insertion
-k, --kebabMakes the generated directories
and file names use kebab-case
-V, --versionShows version number
--cssGenerates CSS
(default is SCSS)
--old-classGenerates class components
Uses classic syntax
--featuresOutputs to features/
(default is components/)

Any of these may be combined.

For example, aacm ItemDetail -ik generates

./components/item-detail/item-detail.scss

and

./components/item-detail/item-detail.jsx (semicolon free).

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago