npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

atomic-design-cli

v0.1.3

Published

An opinionated app structure using typescript,atomic design,redux and many more

Downloads

4

Readme

ad

ad is a cli tool to generate application structure & components using typescript, redux, enzyme and more.

The following guide is strictly followed for creation of application strucuture; https://github.com/Microsoft/TypeScript-React-Starter

Features

  • Atomic design application structure
  • Typescript
  • Generate atom, molecule, organism, template & pages
  • Redux is enabled by default
  • Generate container components
  • Generate store

Default app template

The default app template of ad cli is the following;

test-app
├── ad-cli.config.default.json
├── ad-cli.config.json
├── config
│   ├── aliases.js
│   ├── env.js
│   ├── jest
│   │   ├── cssTransform.js
│   │   ├── fileTransform.js
│   │   └── typescriptTransform.js
│   ├── paths.js
│   ├── polyfills.js
│   ├── webpack.config.dev.js
│   ├── webpack.config.prod.js
│   └── webpackDevServer.config.js
├── images.d.ts
├── package.json
├── package-lock.json
├── public
│   ├── favicon.ico
│   ├── index.html
│   └── manifest.json
├── README.md
├── scripts
│   ├── build.js
│   ├── start.js
│   └── test.js
├── src
│   ├── components
│   │   ├── App.tsx
│   │   ├── atoms
│   │   ├── index.ts
│   │   ├── molecules
│   │   ├── organisms
│   │   ├── pages
│   │   └── templates
│   ├── containers
│   ├── index.css
│   ├── index.tsx
│   ├── logo.svg
│   ├── registerServiceWorker.ts
│   └── store
│       ├── index.ts
│       └── utils.ts
├── __tests__
│   ├── components
│   │   └── App.test.tsx
│   ├── setupTests.js
│   └── utils.ts
├── tsconfig.json
├── tsconfig.prod.json
├── tsconfig.test.json
└── tslint.json

15 directories, 37 files

The template is basically an ejected create react app with a few folders created

Getting started

Install ad-cli package globally $ npm install -g atomic-design-cli

You can also clone and link locally

$ git clone [email protected]:oplog/ad-cli.git
$ cd ad-cli
$ npm install
$ npm run build
$ npm link

Create a new app $ ad new <appName>

What is atomic design

Atomic design is a new frontend app structure which scales specifically for larger projects. You can read the following learn more; http://bradfrost.com/blog/post/atomic-web-design/

Atom

  • Atoms are the basic building blocks of any app. Applied to web interfaces, atoms are our HTML tags, such as a form label, an input or a button.
  • To generate an atom;
$ ad generate:atom Button
or
$ ad g:atom Button

This command would generate an atom component in your application atom folder

Molecule

  • Molecules are groups of atoms bonded together and are the smallest fundamental units of a compound
  • For example, a form label, input or button aren’t too useful by themselves, but combine them together as a form and now they can actually do something together.
  • To generate a molecule;
$ ad generate:molecule FormInput
or
$ ad g:molecule FormInput

Organism

  • Molecules give us some building blocks to work with, and we can now combine them together to form organisms.
  • Organisms are groups of molecules joined together to form a relatively complex, distinct section of an interface.
  • Organisms can consist of similar and/or different molecule types. For example, a masthead organism might consist of diverse components like a logo, primary navigation, search form, and list of social media channels
  • To generate an organism;
$ ad generate:organism LoginForm
or
$ ad g:organism LoginForm

Template

  • Templates consist mostly of groups of organisms stitched together to form pages
  • To generate a template;
$ ad generate:template GuestPageTemplate
or
$ ad g:template GuestPageTemplate

Page

  • Pages are simply instances of templates
  • They are the highest level of fidelity and because they’re the most tangible, it’s typically where most people in the process spend most of their time and what most reviews revolve around.
  • To generate a page;
$ ad generate:page Login
or 
$ ad g:page Login

Store

  • Store folder resides in src/store. It is for redux store items namely constants, actions, selectors, types, reducer & saga
  • To generate a store folder;
$ ad generate:store user
or
$ ad g:store user

NOTE: Currently, store generation is mostly code with comments. It is planned to generate stores better in the upcoming releases

Containers

  • Containers are the bridge between redux store & pure components. They are meant to connect pure components into redux stores
  • To generate a container folder;
$ ad generate:container User
or 
$ ad g:container User

NOTE: Currently, container generation is mostly code with comments. It is planned to generate containers better in the upcoming releases