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

posify

v0.3.4

Published

Convert your webpage to platformOS one

Downloads

1

Readme

posify

Convert your webpage to platformOS one

This CLI consists of commands that are performing single operations on a webpage.

Process

This is the order they should be run on:

  1. posify download -u url (after download is complete, go into the directory, cd <domain>)
  2. posify urls
  3. posify forms

Optionally, if not sure that assets are correctly optimized (usually they are not):

  1. posify optimize:css
  2. posify optimize:js
  3. posify optimize:images

Case sensitive paths

All paths are lowercased to guarantee compatibility. Some webpages were using methods incompatible with mac OS.

So path https://example.com/IMAGES/bg.jpg will become a file app/assets/images/bg.jpg

Some pages have both: Images/bg.jpg and images/avatar.jpg on the same page, but because Images and images directories cannot coexist in the same place on mac OS, it caused some assets to be in the wrong place.

Installation

$ npm install -g posify

Help usage

$ posify help [COMMAND]

$ posify (-v|--version|version)

Example:

$ posify help

$ posify help download
$ posify -v
posify/0.1.1 darwin-x64 node-v12.16.1

Commands

posify download --url http://example.com

Download a complete webpage with assets

USAGE
  $ posify download --url http://example.com

OPTIONS
  -c, --concurrency=concurrency  [default: 5] Max concurrent connections
  -u, --url=url                  (required) URL of webpage to download

DESCRIPTION
  Downloads resources needed to display a webpage.
  It will download files only within the same root domain.

  For example, if you download https://my.example.site.example.com,
  only files within example.com will be downloaded.

EXAMPLES
  posify download -c 25 -u http://example.com

See code: src/commands/download.js

posify forms

Installs Simpleform module

USAGE
  $ posify forms

DESCRIPTION
  Install Simpleform module. It sends email to the app owner when form is submitted.
  This command will create modules/ directory in current directory.
  You should run this command in root directory of the project (where you see app/)

See code: src/commands/forms.js

posify help [COMMAND]

display help for posify

USAGE
  $ posify help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

posify optimize:css

Minify CSS files

USAGE
  $ posify optimize:css

DESCRIPTION
  Makes your CSS files smaller and production ready
  Ignores files that end with .min.css

See code: src/commands/optimize/css.js

posify optimize:images

Optimize images to make them smaller - mac OS only

USAGE
  $ posify optimize:images

OPTIONS
  -q, --quality=quality  [default: 70-85] Quality range

DESCRIPTION
  Optimize jpeg/jpg, png, gif, svg and webp files to make them web-ready
  Requires ImageOptim to be installed in the system.

  Install via brew: "brew update && brew cask install imageoptim"
  Install with GUI: https://imageoptim.com/mac

See code: src/commands/optimize/images.js

posify optimize:js

Minify JS code

USAGE
  $ posify optimize:js

DESCRIPTION
  Makes your JS files smaller and production ready
  Ignores files that end with .min.js

See code: src/commands/optimize/js.js

posify urls

Update relative paths to use platformOS CDN

USAGE
  $ posify urls

DESCRIPTION
  Find and replace urls in html files, mostly needed for assets and forms.
  It will also remove any onsubmit attributes from forms.

See code: src/commands/urls.js