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

magic-cli

v1.2.4

Published

A tools to help you easily develop react(vue) project

Downloads

22

Readme

magic-cli

A tools to help you easily develop react(vue) project

Build Status npm package node version deps package npm download npm package PRs Welcome

中文文档

install

With npm do:

 $ npm install -g magic-cli

With yarn do:

 $ yarn global add magic-cli

commands

new

Init a project base on templates

options:

    > -c, --clone   # Use git clone to download template
    > -r, --remote  # Download remote template even if the local has a cache  

note: We render file use Handlebars.js. You can see it to write template

alias

Add an alias to the template

options:

    > -l, --list        # List all alias 
    > -a, --absolute    # If local add absolute path  
    > -d, --desc [desc] # Add some description for alias  

unalias:

Delete an alias to the template

g/generate:

Generate files base on blueprint

options:

    > -l, --list        # list all blueprints
    > -c, --cwd [path]  # Assign  generate start path(work dir)
    > -f, --force       # overwrite the exsits file instead of ask  

example:

if you set a blueprint like this

    └── route            
      ├── index.js
      └── files
        └── __name__  
          ├── __name__Containers.js
          ├── __name__Components.js
          └── __name__Reducers.js

then use magic g

$ magic g route home

you will get result like this:

    └── home
      ├── homeContainers.js
      ├── homeComponents.js
      └── homeReducers.js

note Formats:

  • __name.cap__ or __name.capitalize__ => home to Home
  • __name.low__ or __name.lowercase__ => Home to home
  • __name.up__ or __name.uppercase__ => home to HOME
  • __name.dash__ or __name.dashcase__ => homeName to home-name

The files content also render by this rule , so you can write __name__ will be replaced

Contents

Templates :

Not finish, wait a moment, you can use vue-cli template first, we has the same api like it.

Blueprints :

|Name|Description| |---|---| |magic g blueprint <name>|generates a blueprint template file|

License

MIT