1.1.0 • Published 7 years ago

url-gen v1.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

url-generator

Greenkeeper badge Build Status Coverage Status Dependency styled with prettier License

Generates URL address based on the directory.

NPM

url-gen status

Features

  • cli - Command line interface.
  • custom - Customize .url-gen.yml file.

Install

npm install -g url-gen

Usage

$ url-gen -h

   USAGE

     url-gen [dir]
     url-gen init

   ARGUMENTS

     [dir]      Relative directory path to generate the URL      optional      default: "."

   OPTIONS

     -u, --up <level>      Query <level> parent directory      optional      default: 0

   GLOBAL OPTIONS

     -h, --help         Display help                                      
     -V, --version      Display version                                   
     --no-color         Disable colors                                    
     --quiet            Quiet mode - only displays warn and error messages
     -v, --verbose      Verbose mode - will also output debug messages

Configuration

You need to customize the .url-gen.yml file, the rules configured like this:

version: 1.0               # version number, optional
root: http://127.0.0.1:888 # defines the url root path, optional, default: http://127.0.0.1
path: example              # defines the url path of the current directory, optional

You can run url-gen init to help create.

Example

url-gen            # working in the local directory.
url-gen examples   # working in the `./examples/` directory.
url-gen ~/examples # working in the `~/examples/` directory.

url-gen i          # creates the `.url-gen.yml` file.
url-gen init       # creates the `.url-gen.yml` file.

Environment

  • linux CI pass
  • macOS CI pass
  • windows Not yet tested

Contributing

Welcome to pull requests, report bugs, suggest ideas and discuss url-generator, i would love to hear what you think about url-generator on issues page.

If you like it then you can put a :star: on it.

License

MIT