GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jacdebug/api-viewer: API viewer can be used as a quick documentation and demo for apis

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
mock
mock
 
 
src
src
 
 
test
test
 
 
.babelrc
.babelrc
 
 
.editorconfig
.editorconfig
 
 
.eslintignore
.eslintignore
 
 
.eslintrc
.eslintrc
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
karma.config.js
karma.config.js
 
 
package.json
package.json
 
 
webpack-karma-warnings-plugin.js
webpack-karma-warnings-plugin.js
 
 
webpack.config.js
webpack.config.js
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

API View

What is it?

API viewer can be used as a quick documentation or demo for apis.

RxJS is used more like a ponyfill for Observable, Observable is part of ES7, hope will be part of standards.

Tooling

The tooling used:

  • webpack to modularise your Javascript code
  • babel to utilise ES6+ and Stage-3 features
  • node-sass to modularise your styling via SASS
  • eslint to make sure your code meets the standards
  • karma, mocha and chai to help you write and run your unit tests in various browsers

Architetture

Heavily inspired by Flux, use a state for webapps and unidirectonal data flow. Catch is not using React or Redux.

Its look like overkill for samll app but definitely payoff as app grows.

Each UI components mainly have three exports,

  • template
  • an observable
  • actions (side effects)

This is more an experimental architecture, on its early stages which needs more refining and testing.

Install

To start developing, fork and clone the project first, then make sure you have Node.js 4.x or higher.

You'll need yarn to install the dependencies we locked in via the yarn.lock checked in to this repo.

You can install yarn if you haven't done so via brew install yarn.

Once you have yarn installed, just run

$ yarn install

from the project folder.

Helpful commands

You'll have the following CLI commands available:

  • yarn run dev running webpack-dev-server and serving the project on localhost
  • yarn run test -- --browsers Chrome,Safari running unit tests via karma e.g. in Chrome and Safari
  • yarn run lint running eslint against your source (and config) files
  • yarn run build running webpack build
  • yarn run serve serving the build/ folder contents

Whilst developing, you'll most likely to run yarn run dev in a terminal window, webpack will take care of everything, bundling your project to an in-memory build/ folder and serving it from there. Also, yarn run test in another terminal window to see your tests running / failing on every file change which comes very handy when doing TDD.

If you'd like to see the output as files, just run yarn run build and the result will be found under a real build/ folder.

TODO

  • Test on real api server
  • Test on many more http methods like post, put, delete etc
  • Finish the test cases
  • Split bundlejs into vendor and app
  • Size of final main.js is now 138K, without 'babel-polyfill' it is 54K, find right config for babel-polyfill to import only what needed or remove babel-polyfill and use corejs to import only ES6 features used.
  • CSS refactor, use colour variables, styled compoments

About

API viewer can be used as a quick documentation and demo for apis

Topics

apiapi-clientapi-documentationapi-restecmascript6rxjsrxjs-observableswebpack

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.