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

ya-framework

v0.1.1

Published

Yet another framework

Downloads

11

Readme

Work in progress

Why

Modularity is geat but sometime you just need something that works out of the box.

Goal

  • Removing require functions (so you don't have to memorize things)
  • Forcing a structuration
  • Isomorphic javascript (only for the react components)
  • Monitoring (user, current log, errors, db call ...)
  • Cache
  • Static server (cdn + dev)
  • Hook code integration (event base)
  • Code deploy test (vm.. meteor)
  • jslint
npm install yat

Command line

Create a new project

node node_modules/.bin/yat ```

Launch a project

node node_modules/ya-framework/index.js


+ bootstrap.js  (everything can be set here: route, app, module, model, ...)
+ routes        (group by filename)
+ modules       
+ node_modules/yat
+ models        
+ database      (queries)
+ public        (assets folder)
+ views         (jade only)
+ linter

### [WORKING] Bootstrap example

// DOES NOT NEED ANY REQUIRE

// Optional App.set({ DEBUG: true, // :optional port: 9999, // :optional publicFolder: './public' // :optional ssl: { // active the https server :optional key: './key',
cert: './cert'
} });

// Optional Module.add([ require('yat-varnish'), // TODO require('yat-auth'), // TODO require('yat-rabbitmq'), // TODO require('yat-socketio'), // TODO ])

// Optional Router.get('/', function() { this.render('view_name'); })

// ...


### Router example

// bootstrap.js // no require need

// Use a react component in a view (seo) var reactComponent = require("../../public/js/components/app"); Router.get('/react', function() {

this.render('test', { hello: 'world', partial: this.react(reactComponent) });

});

// Use a partial in a view Router.get('/partial', function() {

this.render('test', { hello: 'world', partial: this.partial('another_view', { foo: 'wooow' }) });

});

// Json response Router.get('/json', function() { this.json({ foo: 'bar' }); });

// Of course async stuff are working Router.get('/async', function() { setTimeout(() => { this.json({ message: 'async works' }) }, 100); });

// If you do want something special // There is still a possibility to use // the request and the response object // sent by node Router.post('/simple/:uid', function(uid) { // console.log('this.req', this.req); this.res.end('uid:\n' + uid); })

// Magical route // There is no limit to the number of parameter // http://localhost:9999/foo/2/toto Router.get('/foo/:uid/:name', function(uid, name) { this.json({ uid: uid, name: name }); });

// Delete Router.del('/things/:fooId', function(fooId){ this.json({ message: thing ${fooId} has been deleted }); })

// Post method // Body will alway be the last parameter Router.post('/partial', function(body) { this.json(body); });

Router.post('/example/:number/:uid/:foo', function(number, uid, foo, body) { this.json(body); });


### View


## Internationalization