Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Optimize the page for making faster
JavaScript Shell
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
cov
examples/src
lib-cov
lib
node_modules
test
.gitignore
.travis.yml
README.md
cov.sh
feo.json
package.json

README.md

Automatically optimize the web page faster!!

Supports

Now, Windows and Ubuntu not supported because of node-iconv cant install on these OS.

Optimize principle

Manual optimizing front end is very sucks. I want to simplify that. only one command.

  • Concat and minify script and css files on the page
  • Encode image files to base64 on the page( Off course! You need set Content-Encoding:gzip )
  • Minify html

Install

npm install -g feo

Simple to use

1.Prepare feo.json

{
    "url":"examples/src",
    "dist" : "examples/dist",
    "js" : {
        "compressor" : "yui-js",
        "ignore":[
          "ignore.js"
        ],
        "inline":false,
        "root" : "examples/src"
    },
    "css" : {
        "compressor" : "yui-css",
        "ignore":[
          "ignore.css"
        ],
        "inline":true,
        "root" : "examples/src"
    },
    "backgroundImage" : {
        "base64" : true,
    },
    "image" : {
        "base64" : true,
        "root" : "examples/src"
    }
}

2.Execute feo. Feo generates html, js and css files to dist directory.

feo

Why output script, css files name contains hash?

  • You can set long expire time of contents.

Next

  • For the page which is not UTF-8 encoding
  • Resolve CSS Import
  • Contents Lazy load

Dependencies with amazing library

Awesome article

Something went wrong with that request. Please try again.