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

gitsvn

v0.0.1

Published

Proxy for synchronizing repositories between git and Subversion.

Downloads

8

Readme

Gsproxy

Build Status Dependecies Status

Warning: experiment

Gsproxy is currently for internal use. It has some exclusive code for renren, so can not be use widely. If you intrest, fork the repository and make some changes for your own project.

Intro

Gsproxy is a repo synchronizer for frontend developer. It encourages using multiple repositories(Git recommend) for development and one repository for production to make code clean. Multiple repositories make project granulate, which is especially great for frontend. Gsproxy allow static resource files(like javascript and css files) combining across repositories, so everyone can work independently and share the great ideas. More importantly, multiple repositories can be easly integrated with other tools like JIRA and Phabraicator, which is very suitable for agile development.

Gsproxy uses VCS hooks(pre-commit) to integrate lint and unit tests, besides it support coffee and less autocompiling.

Installation

Gsproxy has two daemon server program, one is normally installed in server for synchronizing files from development repositories to production repository, the other is installed in local where programmer coding for generating temple files based on static resource requst, and more, it can accomplish some tasks like lint and unit tests before commiting changes.

First, install the application with: npm install -g gsproxy.

The server part

  1. The server part use gspadmin command.
  2. Make a directory contains two files: repos.json and members.json.
  3. Run gspadmin start on directory above to start a daemon for synchronizing repositories.

repos.json

{
    development: [
        [email protected]:renrenfed/d1.git,
        [email protected]:renrenfed/d2.git
    ],
    production: [email protected]:renrenfed/p.git
}

members.json

{
    administrator: ['viclm'],
    users: {
        viclm: 'password'
    }
}

The client part

  1. Run gsp pull in a new directory(path/to/workspace, for example) to clone all the development repositories.
  2. Run gsp start on directory above to start a local server for static resource requst
  3. Config a webserver(nginx/apache/lighttpd) and start

Configs for nginx

# Gsproxy use gsproxy.com for connectting server and clients, you need to specify a proxy for this.
server {
    listen       80;
    server_name  gsproxy.com;

    location / {
        # The port of server server is 7071
        proxy_pass http://server:7071;
    }
}
# Local static resource request prioxy.
server {
    listen       80;
    server_name  customdomain.com;
    charset utf-8;
    autoindex       on;
    autoindex_exact_size    on;

    rewrite ^/a?([0-9])+/(.*)$ /$2 last;
    rewrite (.*)\.[0-9]+\.css /$1.css;
    rewrite (.*)\.[0-9]+\.js /$1.js;

    location / {
        index   index.html index.htm;
    }

    location ~* /.+\.(css|js)$ {
        proxy_set_header x-request-filename $request_filename;
        # The port of local server is 7070
        proxy_pass http://127.0.0.1:7070;
    }
}

Repository configuration

Every development repository should contain a .gspconfig file.

{
  "id" : "project_id",
  "publish_dir" : "dist",
  "lint": {
    "js": {
      "engine": "eslint",
      "config": "eslint.json"
    },
    "css": {
      "engine": "csslint",
      "config": "csslint.json"
    }
  }
}

Commands

  1. Run with --help or -h for options.
  2. gsp start - Start a local server
  3. gsp pull - Clone/pull all development repositories
  4. gsp lint - Lint on changed files
  5. gsp test - Run unit tests on changed files
  6. gsp init - Project scaffolding
  7. gsp publish - Ask server to synchronize repositories
  8. gspadmin start - Start a server daemon
  9. gspadmin init - Init setting, add new repositories

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

License

Copyright (c) 2014 viclm Licensed under the MIT license.