Skip to content

joakin/protowiki

Repository files navigation

protowiki

A simple wikipedia mobile SPA that loads articles.

Very barebones and meant for prototyping.

Created for Wikimedia's Reading Web team to help on the New readers effort (see mediawiki.org/wiki/Reading/Web/Projects/New_Readers_2016-17_Q2).

Development instructions

Install Node active LTS (>= 6) and npm (>= 3)

npm start

Starts the development server listening on port :3000 and opens a browser.

The page will live reload when the sources change.

You can prefix npm start with the environment variable REACT_APP_PROTOTYPE to force a specific prototype. By default in development all flags are enabled.

See flags.js

Example: REACT_APP_PROTOTYPE=wikilater-1 npm start

npm run build

To build the assets for production on build/.

As with start, you can prefix npm run build too to force a specific prototype, see above.

Example: REACT_APP_PROTOTYPE=wikilater-1 npm run build

This is the mechanism used by the deploy script to generate and deploy all the different variants. Read ahead for more information.

npm run lint

Lint sources for problems and automatically fix errors when possible.

Deployment instructions

Prototypes are compiled and deployed with the script ./scripts/deploy.sh.

You'll need to install surge.sh CLI tool with npm install -g surge before deploying.

It just runs npm run build with the REACT_APP_PROTOTYPE set to each prototype defined on flags.js.

Then it deploys the bundle of static files to surge.sh with the name of the prototype.

If you need to deploy to the existing urls ask for the credentials of the surge account that previously deployed them, or adapt the build script to deploy to a differently prefixed subdomain name or deploy to a different static file hosting service.

About

The simplest wikipedia spa for prototyping UIs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages