Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alfredjs

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alfredjs

Alfred is a command line tool, a suite of helper commands for react developers ## Installation Install globally and use anywhere :

  • 0.2.0
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Alfred

Alfred is a command line tool, a suite of helper commands for react developers

Installation

Install globally and use anywhere :

npm i alfredjs -g

or

Install locally to your project and use from npm scripts :

npm i alfredjs 

Add an npm script in your package.json

"scripts":{"alfredjs":"alfredjs"}

Usage

Run globally installed alfredjs in project folder :

$ cd my-project
$ alfred
Configuration

You can configure alfred in 3 ways :

  • Pass a configuration path
  • Use a configuration file .alfredrc
  • Zero configuration with default config
Pass configuration

Run alfred with alfred --config <CONFIG_PATH> to pass a configuration file path. You can use this if you don't want your alfred configuration in your version control.

Configuration file

Alfred will use .alfredrc in the root folder, which command is executed in, by default. If there is no .alfredrc file then alfred falls back to it's default configuration options. You can show default alfred configuration by running show:config after running alfred. You can also create a premade .alfredrc by running init command in alfred.

Default config

Default alfred config is : (beware this might not be up to date with source code lib/Utils.js)

{
    dirs: {
        component: 'src/javascript/components',
        reducer: 'src/javascript/reducers',
        action: 'src/javascript/actions',
        shared: 'src/javascript/shared',
        view: 'src/javascript/views',
        root: '.alfred',
    }

}
Commands
  Commands:

    help [command...]                      Provides help for a given command.
    exit                                   Exits application.
    new:component <name> [reduxEnabled]    Creates a new component
    new:components <names...>              Creates multiple components at once without redux
    new:view <name> [reduxEnabled]         Creates a new view
    new:action <actionCreatorName> <name>  Creates a new action creator
    create:routes                          Creates a simple react-router-dom entry in root folder
    create:store                           Creates a redux store in root folder
    show:config                            Shows current config options
    init                                   Creates an .alfredrc file with all the defaults

Environment Variables

$ALFRED_VERBOSE : If environment variables is set, alfred stouts processes as they happen

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

TODO: Write history

Credits

TODO: Write credits

License

FAQs

Package last updated on 31 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc