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

wine

v0.9.13

Published

Wiki your codes and Markdown your project each time when you submit your code to svn.

Downloads

100

Readme

Wiki your codes and Markdown your project each time when you submit your code to svn.

将你的代码变成Wiki,将项目文档Markdown化,并且在每次svn提交时自动生成wiki和文档,是开发者最好的伙伴。

The wine system is a great tool for developers, it would lead your for remember your code wrote for what reason, and give you a wiki for the project.

Wine系统可以让你记住代码为什么而写,也可以自动生成项目wiki,避免无聊的文档工作。

it can be:

  • a code mark database of automatic

  • simple wiki for your project

  • hook the svn and update by svn submit

  • 自动化提取代码注释,并且自动生成文档页面

  • 最简约的wiki系统

  • 每次svn提交代码时通过svn钩子进行更新,无需人工参与

Wine is a web application base of k framework , very simple, fast, mvc framework.

Wine 基于 k 框架,简便、快速、MVC框架首选。

Install

npm install wine --save

1. create package.json

{
  "name": "demo",
  "version": "0.0.1",
  "main": "main.js",
  "dependencies": {
    "wine": "latest"
  }
}

the dependencies must have the wine lib.

2. create database

CREATE TABLE `codes` (
     `id` bigint(20) NOT NULL AUTO_INCREMENT,
     `project` varchar(30) NOT NULL,
     `keyword` varchar(30) NOT NULL,
     `filepath` varchar(255) CHARACTER NOT NULL,
     `linenum` int(11) NOT NULL,
     `contents` text,
     PRIMARY KEY (`id`)
   ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;

3. create main.js

const wine = require("wine")
const config = {
    'markdown' : process.cwd() + '/md',
    'mysql': {
        host     : 'localhost',
        user     : 'root',
        password : '123456',
        database : 'test'
    },
    'apptitle' : 'Wiki your code'
}
wine(config).listen(3000)

main.js config the app base:

  • markdown is the markdown dir for the .md file and the .ini file, it can be more pages until become a database.
  • mysql is database setting, link to the codes table above.
  • apptitle is the app title setting, as your like.
  • listen can be some port you set.

4. create md/index.md

## Welcome to Wine system.

5. run

npm install

...

node main.js

then visit http://localhost:3000

Example file

.md file in the config markdown dir, is the markdown page template. it is the normal markdown file.

.ini file in the config markdown dir, is the project setting, for example:

[project]
name=测试
repository=file:///D:/home/testsvn
username=jake
password=123456

[keyword]
myapi=我的API
test=测试
golang=GO语言
aop=AOP

the project area is the project name, svn address, svn username and svn password.

the keyword area would match the key code in your code file.

Please see the example for more details.

Svn hook

Please put the (named test) project hook url http://localhost:3000/hook/test in the post-commit hook.

License

MIT