posify
Convert your webpage to platformOS one
Last updated 4 days ago by pavelloz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install posify 
SYNC missed versions from official npm registry.

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: 15] 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

See code: src/commands/urls.js

Current Tags

  • 0.1.4                                ...           latest (4 days ago)

8 Versions

  • 0.1.4                                ...           4 days ago
  • 0.1.3                                ...           a month ago
  • 0.1.2                                ...           a month ago
  • 0.1.1                                ...           a month ago
  • 0.1.0                                ...           a month ago
  • 0.0.4                                ...           2 months ago
  • 0.0.3                                ...           2 months ago
  • 0.0.2                                ...           2 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 8
Last Day 0
Last Week 8
Last Month 81
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |