RESTLint is a web based application that reads in a RESTful API design specification (i.e. Swagger2), and checks the design against HTTP standards, AT&T standards and best practices, and some security checks.
You can load the website in the following way:
Download the repo locally. You can either download a zip file from the repo or you can clone the repo onto your local machine. Once downloaded onto your local machine, you can host the files through a local web server, and use your browser to navigate to the local web server. For example, if you have python installed, you can run this command in the root of the repo directory to serve the files:
Python2
python -m SimpleHTTPServer 8080 # assuming port 8080 is not used already.
Python3
python -m http.server 8080 # assuming port 8080 is not used already.
Then you can navigate your browser to localhost:8080/dist/
- Minified CSS with
htmlmin
to reduce file size - Minified JS with
uglify-js
to reduce file size - Inlined CSS to avoid another round trip with
inline-source
- Inlined JS to avoid another round trip with
inline-source
- Added
async
to the map request to stop blocking - Moved javascript to end of body to minimize blocking
Used Gulp to automate the building and common tasks of the website. Includes the following:
- minification of javascript using
uglify
- minification of HTML and CSS using
htmlmin
- inlining CSS using
inline source
- Javascript linting using
eslint
- CSS linting using
csslint
- moves all assets under the
dist/
directory
Gulp dependencies are in the package.json
file
You need to install nodejs/npm and gulp first.
To generate distribution, run the following in the root directory of the repo
Install Dependencies
npm install
Generate Distribution
gulp main
You can run individual tasks by replacing main
with either html
, css
,js
or img
The resulting files for distribution will be in the dist/
directory
- knockoutjs library - used as a MVVM framework, and has 2 way bindings to allow the data to stay in sync. Also used to create template for listview.
- JQuery - Javascript library that simplifies javascript routines.
- Knockout Util Functions - adapted an example from this page to implement a ko computed observable.
- knockout tips - used tips from here in my code.
- Google Page Speed Insights - tool to measure web page performance
- Chrome Dev Tools tips-and-tricks
- Optimizing Performance
- gulp - build/task tool to automate common tasks (i.e. minifications, inlining)
- gulp-htmlmin - tool to minimize the HTML and CSS
- gulp-uglify - tool to minimize the Javascript files
- gulp-inline-source - Tools to inline CSS into the HTML page from gulp
- gulp-csslint - tool to check syntax of CSS from Gulp
- gulp-jshint - tool to check syntax of javascript files from Gulp
This project is licensed under the terms of the MIT license. (See LICENSE.md)
Copyright (c) 2018 Brett Schwarz