GithubHelp home page GithubHelp logo

jockjs's Introduction

JOCKJS - An Smart JavaScript Library

简介

安居客自主研发的JS前端框架,特点是模块按需载入,代码精简,高性能,使用非常灵活,模块依赖处理更智能,适合对性能要求较高的网站使用。

运行环境

  • Linux last edition
  • NodeJs v0.8.10

安装使用

下载官方最新稳定版 NodeJs , 编译安装

安装 uglify-js modules , 进入 NodeJs 安装目录,执行以下命令

npm install uglify-js

克隆项目文件

git clone git://github.com/jockhu/jockjs.git

运行服务,进入 jockjs 目录,执行以下命令

node server.js

完成安装,访问 http://127.0.0.1:8000/base/20120927001.js 测试是否完成

(127.0.0.1)可以替换成你指定的域名

服务启动配置项

node service.js [[[[port]  debug]  compress]  version]
  • 监听端口号: port 可选:默认监听8000端口
  • 是否启动调试: debug 可选
  • 是否启用压缩: compress 可选
  • 指定版本号: version 可选:指定某一特定版本

如何使用

<script type="text/javascript" src="http://127.0.0.1:8000/base/20120927001.js"></script>
<div id="T"></div>

<script type="text/javascript">

(function(){

    var T = J.g('T');
    T.html('DOM 操作完成');
    T.setStyle({border:'1px solid red', width:'200px'});
    J.on(T, 'click', function(){
        T.html('DOM 事件操作完成');
    });

}.require(['dom.normal','event.on']));

</script>

问题反馈

邮件:<[email protected]>

jockjs's People

Contributors

jockhu avatar

Watchers

 avatar

Forkers

david-git jgcao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.