Giter Club home page Giter Club logo

offline-wikipedia's Introduction

Offline Wikipedia Demo

Offline Wikipedia is a demo of how a content site such as Wikipedia could offer offline content.

Running locally

Install dependencies:

npm install
npm run update

Run dev server:

npm run serve

Or, run without the offline capabilities:

npm run serve-no-sw

Running without offline capabilities means you get the latest version each time you hit refresh.

offline-wikipedia's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

offline-wikipedia's Issues

Cannot read property 'declareTemporary' of null

Getting the following when I run npm run serve or gulp serve

events.js:85
      throw er; // Unhandled 'error' event
            ^
TypeError: /Users/kevincoyle/development/offline-wikipedia/index.js: Cannot read property 'declareTemporary' of null
    at getOuterFnExpr (/Users/kevincoyle/development/offline-wikipedia/node_modules/regenerator/lib/visit.js:279:35)
    at Context.types.PathVisitor.fromMethodsObject.visitFunction (/Users/kevincoyle/development/offline-wikipedia/node_modules/regenerator/lib/visit.js:108:23)
    at Context.invokeVisitorMethod (/Users/kevincoyle/development/offline-wikipedia/node_modules/regenerator/node_modules/recast/node_modules/ast-types/lib/path-visitor.js:306:43)
    at Visitor.PVp.visitWithoutReset (/Users/kevincoyle/development/offline-wikipedia/node_modules/regenerator/node_modules/recast/node_modules/ast-types/lib/path-visitor.js:180:28)
    at NodePath.each (/Users/kevincoyle/development/offline-wikipedia/node_modules/regenerator/node_modules/recast/node_modules/ast-types/lib/path.js:96:22)
    at visitChildren (/Users/kevincoyle/development/offline-wikipedia/node_modules/regenerator/node_modules/recast/node_modules/ast-types/lib/path-visitor.js:199:14)
    at Visitor.PVp.visitWithoutReset (/Users/kevincoyle/development/offline-wikipedia/node_modules/regenerator/node_modules/recast/node_modules/ast-types/lib/path-visitor.js:188:16)
    at visitChildren (/Users/kevincoyle/development/offline-wikipedia/node_modules/regenerator/node_modules/recast/node_modules/ast-types/lib/path-visitor.js:226:21)
    at Visitor.PVp.visitWithoutReset (/Users/kevincoyle/development/offline-wikipedia/node_modules/regenerator/node_modules/recast/node_modules/ast-types/lib/path-visitor.js:188:16)
    at visitChildren (/Users/kevincoyle/development/offline-wikipedia/node_modules/regenerator/node_modules/recast/node_modules/ast-types/lib/path-visitor.js:226:21)

npm run serve - css error

Hi there,

I had this error when I have tried to run for the first time the npm run serve command:

offline-wikipedia@ serve /home/andrei/projects/personal/offline-wikipedia
gulp serve

[21:38:43] Using gulpfile ~/projects/personal/offline-wikipedia/gulpfile.js
[21:38:43] Starting 'serve'...
[21:38:43] Starting 'clean'...
[21:38:43] Finished 'serve' after 36 ms
[21:38:43] Finished 'clean' after 44 ms
[21:38:43] Starting 'css'...
[21:38:43] 'css' errored after 39 ms
[21:38:43] Error: libsass bindings not found. Try reinstalling node-sass?
at getBinding (/home/andrei/projects/personal/offline-wikipedia/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:22:11)
at Object. (/home/andrei/projects/personal/offline-wikipedia/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:188:23)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/home/andrei/projects/personal/offline-wikipedia/node_modules/gulp-sass/index.js:3:17)
at Module._compile (module.js:434:26)
[21:38:43] Error in plugin 'run-sequence'
Message:
An error occured in task 'css'.

npm ERR! Linux 3.13.0-66-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "serve"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! code ELIFECYCLE
npm ERR! offline-wikipedia@ serve: gulp serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the offline-wikipedia@ serve script 'gulp serve'.
npm ERR! This is most likely a problem with the offline-wikipedia package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp serve
npm ERR! You can get their info via:
npm ERR! npm owner ls offline-wikipedia
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/andrei/projects/personal/offline-wikipedia/npm-debug.log

It seems that this was caused because I am using node 4.0.0 and gulp-sass need to be updated to gulp-sass@2. You can do this using these commands:

npm uninstall --save-dev gulp-sass
npm install --save-dev gulp-sass@2

Unexpected end of input

When I run: "sudo npm run serve" i got this:

grzesieq94@grzesieq94 /v/w/offline-wikipedia> sudo npm run serve
[sudo] password for grzesieq94: 

> offline-wikipedia@ serve /var/www/offline-wikipedia
> gulp serve

[15:18:50] Using gulpfile /var/www/offline-wikipedia/gulpfile.js
[15:18:50] Starting 'serve'...
[15:18:50] Starting 'clean'...
[15:18:51] Finished 'serve' after 298 ms
[15:18:51] Finished 'clean' after 412 ms
[15:18:51] Starting 'css'...
[15:18:51] Starting 'misc'...
[15:18:51] Starting 'html'...
[15:18:51] Starting 'js'...
[15:18:52] Starting 'server:package'...
[15:18:52] Starting 'server:misc'...
[15:18:52] Starting 'server:js'...
[15:18:56] Starting 'server:sharedtemplates'...
[15:18:58] Starting 'server:templates'...
[15:18:59] Finished 'html' after 7.06 s
[15:19:03] Finished 'server:sharedtemplates' after 6.44 s
[15:19:03] Finished 'server:package' after 11 s
^[[1;5C^[[1;5C^[[1;5D[15:19:13] Finished 'server:misc' after 21 s
[15:19:13] Finished 'misc' after 22 s
[15:19:13] Finished 'server:templates' after 15 s
[15:19:21] Finished 'server:js' after 30 s
[15:19:31] Finished 'css' after 40 s
[15:19:53] Finished 'js' after 1.02 min
[15:19:53] Starting 'server:serve'...
[15:19:54] Finished 'server:serve' after 907 ms
[15:19:54] Starting 'watch'...
[15:19:55] Finished 'watch' after 1.1 s
[15:19:55] Development server listening. (PID:27759)
module.js:489
    throw err;
          ^
SyntaxError: /var/www/offline-wikipedia/dist/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json: Unexpected end of input
    at Object.parse (native)
    at Object.Module._extensions..json (module.js:486:27)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/var/www/offline-wikipedia/dist/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js:11:18)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

npm -v: 2.11.3
node -v: v0.12.7

npm run update failed

Hello Jake,

I have an issue with the package's installation

see below the error message

npm ERR! offline-wikipedia@ update: gulp server:package && cd dist && npm install && cd -
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the offline-wikipedia@ update script.
npm ERR! This is most likely a problem with the offline-wikipedia package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp server:package && cd dist && npm install && cd -
npm ERR! You can get their info via:
npm ERR! npm owner ls offline-wikipedia
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run"
"update"
npm ERR! cwd c:\wamp\www\php\offline-wikipedia-master
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! c:\wamp\www\php\offline-wikipedia-master\npm-debug.log
npm ERR! not ok code 0

thank you for your help

Regards

Articles ending in punctuation fail to load

For instance:

https://wiki-offline.jakearchibald.com/wiki/What_Do_You_Care_What_Other_People_Think%3F

should display this article:

https://en.wikipedia.org/wiki/What_Do_You_Care_What_Other_People_Think%3F

But instead shows the error page stating:

Wikipedia does not have an article with this exact name.
Please search for What Do You Care What Other People Think in Wikipedia to check for alternative titles or spellings.

Note the lack of punctuation at the end.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.