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

vue-engine

v2.15.2

Published

Reactive web application framework

Downloads

10

Readme

vue-engine

Reactive web application framework

Changelog

2.15.2:

2.15.1:

2.15.0:

2.14.1:

  • do not override the data in view on render, but just extend

2.14.0:

2.13.2:

  • include cursors in props during init

2.13.1:

  • add mixins to top-level app

2.13.0:

  • inject seed-store into app

2.12.0:

  • include seed-store
  • inject seed-store to components through mixins

2.11.0:

  • add mixins option
  • extend components with mixins

2.10.1:

  • update template to reference latest version

2.10.0:

  • expose client emitter

2.9.0:

  • remove dispatch method
  • refactor emit to have emit from root VM

2.8.0:

  • add emitter method dispatch

2.7.1:

  • update seed-router

2.7.0:

  • make route and ve events compatible with new vue event model

2.6.0:

  • application redirect method
  • include helpers into bundle

2.5.0:

  • let app/ctx redirect rewrite urls

2.4.0:

  • app-wide getters and setters (convenience)

2.3.0:

  • update template to use seedalpha/gulp-connect
  • update template tasks to support socket connections

2.2.1:

  • update template/package.json to refer to the latest version of vue-engine

2.2.0:

  • use observers to track view events

2.1.1:

  • remove hardcoded paths

2.1.0:

  • use gulp-sass to process scss

2.0.1:

  • cli output vue-engine version
  • prefix hash routes
  • remove unused dependencies

2.0.0:

  • update template
  • update project dependencies

1.0.0:

  • Initial release

Installation

$ npm install -g vue-engine

Usage

$ ve [project_name]
$ cd [project_name]
$ npm install
$ npm start

API

// client.js

var VueEngine = require('vue-engine');
var bundle    = require('./bundle');

var store = {};

var app = new VueEngine({
  name: 'user',
  handshake: {
    token: document.body.getAttribute('token')
  },
  el: '#root',
  template: require('./layout.html'),
  bundle: bundle,
  data: {
    user: 'john'
  },
  mixins: [{
    computed: {
      store: function() {
        return store;
      }
    }
  }],
  config: {}
});

var router = app.router();

router.add('/', function(ctx) {
  ctx
    .title('Home Page')
    .render('home', { 
      user: ctx.get('user')
    });
});

router.add('/posts', bundle.controllers.postsCtrl);

app.start();

// server.js

var http      = require('http');
var Driver    = require('seed-driver');
var DRTP      = require('driver-rtp');
var server    = http.createServer();
var driver    = new Driver('user');

driver.use(function(context) {
  context.client = context.locals.client;
  context.session = context.locals.client.handshake;
  context.token = context.session.token;
  context.next();
});

driver.use(function(context) {
  UserToken.findOne({ token: context.token }, function(err, token) {
    if (err || !token) return context.error('not authenticated');
    User.findById(token.user, function(err, user) {
      if (err || !user) return context.error('not authenticated');
      context.user = user;
      context.next();
    });
  });
});

driver.define('getProfile', function(context) {
  var profile = context.user.toJSON();
  delete profile.password;
  delete profile.hash;
  delete profile.salt;
  context.result(profile);
});

var drtp = new DRTP(driver);

drtp.install(server);

server.listen(5000);

Development

$ git clone [email protected]:seedalpha/vue-engine.git
$ cd vue-engine
$ npm install
$ npm test

Author

Vladimir Popov [email protected]

License

©2014 Seedalpha