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

@hyhello/geo-cli

v1.0.0

Published

Engineering tool based on geojson performance optimization.

Downloads

19

Readme

@hyhello/geo-cli

Engineering tool based on GeoJson performance optimization.

Read this document in: 简体中文.

Installation

While you can install Geo CLI globally on your machine, it's much better to install it locally project by project.

There are two primary reasons for this.

  1. Different projects on the same machine can depend on different versions of Geo allowing you to update them individually.
  2. Not having an implicit dependency on the environment you are working in makes your project far more portable and easier to setup.

We can install Geo CLI locally by running:

npm install --save-dev @hyhello/geo-cli

Note: If you do not have a package.json, create one before installing. This will ensure proper interaction with the npx command.

After that finishes installing, your package.json file should include:

{
    "devDependencies": {
+       "@hyhello/geo-cli": "^0.0.4"
    }
}

Examples (Run it and see it)

Check out the examples/ folder for code and interface examples.

node examples/demo.json
# etc...

Usage

Note: Please install @hyhello/geo-cli first before npx geo, you can also drop it inside of an npm run script or you may instead execute with the relative path instead. ./node_modules/.bin/geo

npx geo demo.json

compile

Compile the file demo.json and overwrite the source file.

npx geo demo.json
# overwrite demo.json

If you would like to input to a file or dir, you may use --input or -i.

npx geo --input demo.json

If you would like to output to a file or dir, you may use --output or -o.

npx geo demo.json --output other.json

pretty

Beautify JSON files you may use --pretty or -p [number|boolean]

npx geo demo.json --pretty

above indentation is 2

If you want to customize the indentation, you can --pretty=[number]

npx geo demo.json --pretty=4

recursive

If you --input is a folder, and you want to recursively find all .json files in the folder, you can use --recursive or -r

npx geo --input examples --recursive

relative

If you --output is a folder, and you don't want to keep the previous directory structure, you can use --no-relative

npx geo --input examples --on-relative

emptyDir

If you --output is a folder, and you want to empty it before you compile

npx geo --input examples -o output --empty-dir

exclude

Exclude files that match the regular expression pattern

--exclude or -e

npx geo examples --exclude examples/other.json

Custom config path

Custom configuration file. only supported .js file

--config-file or -c

npx geo demo.json --config-file geo.config.js

If you don't know how to configure it, you can exec geo --init

npx geo --init

help

--help or -h

npx geo --help

version

--version or -v

npx geo --version