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

soyie

v2.3.46

Published

a web mvvm framework

Downloads

22

Readme

Soyie Component Framework

soyie是一套针对移动端开发的高性能MVVM前端框架,类似angular vue reactjs avalon 。soyie集合来这些框架的优势,具有全组件,高性能的有点。特别是组件的制作(component)非常方便,您可以通过JSON化配置组件,也可以使用class extends来继承基本组件类扩展您的组件。

除此之外,她兼容最新的IOS9。非常方便的如同搭积木一样拼装您的项目。

Installtion

NPM 安装

$ npm install soyie

内部安装

$ so install soyie

Useage

var Soyie = require('soyie');
Soyie.ready(function(){
    var vm = Soyie.app('example');
    vm.init(scope);
    scop.baz = 'foo';
    ......
});

或者你也可以这样使用:

var Soyie = require('soyie');
Soyie.ready(function(){
    Soyie.bootstrap('example', scope, function(){
        this.baz = 'foo';
        ...
    });
});

soyie.bootstrap方法有以下几种使用情况:

// 只有初始数据,静态赋值
Soyie.bootstrap('example', scope);
// 没有初始值,直接使用动态赋值
Soyie.bootstrap('example', function(){
    this.baz = 'foo';
    ...
});

API

文档教程正在整理中,敬请期待!

components 演示

我们在angular官网常见一个任务系统,我们将演示如果使用soyie来创建这个component系统。

Soyie.component('task', {
    props: {
        tasks: {
            type: ['Array'],
            required: true
        }
    },
    handle: function(scope){
        scope.remind = function(){
            var i = scope.tasks.length, j = i;
            while (i--){
                if ( scope.tasks[i].state == '1' ){
                    j--;
                }
            }
            return j;
        };
        scope.newtask = '';
        scope.addtask = function(){
            scope.tasks.push({
                name: scope.newtask,
                state: 0
            });
            scope.newtask = '';
        }
    },
    template: '<p>你还有{{remind()}}个任务没完成</p>'
    +           '<ul>'
    +                   '<li so-repeat="{{tasks}}">'
    +                       '<input type="checkbox" so-binding="state" so-unchecked="0" value="1">'
    +                       '<span class="{{state == \'1\' ? \'line\': \'\'}}">{{name}}</span>'
    +                   '</li>'
    +           '</ul>'
    +           '<input type="text" so-binding="newtask" placeholder="input your task..." />'
    +           '<button so-on="click:addtask">add</button>'
});

对应的HTML代码如下:

<task tasks="{{tasks}}"></task>

我们只要传入tasks对应的数据参数标签(表单式)即可得到与angular一样的任务系统。