npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

paperapp

v1.0.77

Published

deadsimple json-based SPA app-generator for gitlab (static pages)

Downloads

41

Readme

deadsimple json-based SPA app-generator for gitlab (static pages)

Usage

$ npm install paperapp $ paperapp

paperapp init                     <-- inits a directory with a paper app
paperapp dev                      <-- runs development server

How to create a project

$ npm init
$ npm install paperapp --save
$ paperapp init
$ paperapp dev
   _   _   _   _   _   _   _   _  
  / \ / \ / \ / \ / \ / \ / \ / \ 
 ( P | A | P | E | R | A | P | P )
  \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ 

  https://npmjs.org/package/paperapp

Starting up http-server, serving .server
Available on:
  http://127.0.0.1:8080
  http://100.115.92.1:8080
  http://192.168.0.157:8080
Hit CTRL-C to stop the server

Now edit app.json, app.css and app.js in your current dir

$ git add .gitlab-ci.yml app.*
$ git commit -m "1st commit"
$ git push origin master

Voila you have a beautiful offline SPA up and running

Features

Reference

| Feature | Example | Result | Comment | |-|-|-|-| | JSON Reactive store | { "store": { "name":"John" } } | | define default store variables | | | { "name": "${store.name}" } } | | use store-variable as value | | JSON js function | { "format":"div", "value":"${window.Date()}" } | | use function output as div-content | | JSON Webrequest | { "format":"div", "value":"${res/products.html}" } | | use url as div-content | | | { "$ref":"https://f.com/2.json" } | | uses fetched json-result as value | | JS Reactive | $.on('store.name', console.log ) | | reacts to value-change | | | $.set('store.name', "myname") | | updates value | | | $.set('store.name', $.store.name) | | retrigger last value | | Application Events| $.on('/init', console.log ) | | respond to event | | | $.on('/init/done', $.curry(console.log,"done!")) | | respond to event (curried) | | | $.on('/init/done', [alert,console.log]) | | respond to event (auto map) | | | $.on('/menu/change', console.log ) | | respond to event | | | $.trigger('/menu/change', {target:$('#menu select')}) | | trigger event | | | $.off('/menu/change',console.log | | unregister eventhandler | | *JS Forms" | $.createForm( myjsonschema ) | | renders a jsonschema form | | JS DOM | $.Element({format:"li",value:"hi",attr:{"id":"foo"},style:{"color":"#FFF"}}),class:"foo"}) | hi | | | | $('div>li#a') | HTMLElement | like jquery | | | $.all('div>li').map(console.dir) | HTMLElement[] | like jquery | | | $.addClass( $('#foo'),'red') | | | | | $.removeClass( $('#foo'),'red') | | | | JS Utility | $.extend({a:1},{b:2}) | {a:1,b:1} | like lodash | | | $.get($,'store.foo.bar','empty') | value or 'empty' | shorthand function like lodash | | | $.set($,'store.foo.bar',123) | | shorthand function like lodash | | | $.equals(property, a, b) | | example: myarr.find( equals('title', 'foo') ) | | | foo = $.curry(console.log,"foo") | foo() // prints 'foo' | lazy curry | | | $.renderString("hello ${world}",{world:"man"}) | "hello man" | es6 template evaluation to string | | | $.renderVar("${store}) | {...} | es6 template evaluation to object | | | $.mapasync([1,2,3],function(v,i,next){ next() }, alert) | | async iterator | | *JS webrequest | $.require("https://foo.com/1.js","js", alert ) | | require js or css file | | | $.request('PUT','http://f.com/1.json', console.dir) | string with json | will return cached version if offline | | url hash variables | http://foo.com#{"nomenu":true} | | hides menu icon | | | http://foo.com#{"nofooter":true} | | hides footer | | | http://foo.com#{"noheader":true} | | hides header | | | http://foo.com#{"nofullscreen":true} | | hides fullscreen icon | | | http://foo.com#{"card":"Foo"} | | sets 'Foo' as homepage |