MCPcopy Index your code
hub / github.com/baidu/san

github.com/baidu/san @3.15.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release 3.15.5 ↗ · + Follow
500 symbols 1,281 edges 203 files 155 documented · 31% updated 5mo ago3.15.5 · 2026-01-01★ 4,7408 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<a href="https://baidu.github.io/san/">
    <img src="https://baidu.github.io/san/img/logo-colorful.svg" alt="Logo" height="220">
</a>

SAN

一个快速、轻量、灵活的 JavaScript 组件框架

A fast, portable, flexible JavaScript component framework.

NPM version License Build Status Coverage Status Issues

HomePage 网站

安装(Install)

NPM:

$ npm i san

CDN:

<script src="https://unpkg.com/san@latest"></script>

发布文件说明(Dist Files Information)

快速开始(Quick Start)

<!DOCTYPE html>
<html>

<head>
    <title>Quick Start</title>
    <script src="https://unpkg.com/san@latest"></script>
</head>

<body>
    <script>
        const MyApp = san.defineComponent({
            template: `



                    <input type="text" value="{=name=}">


Hello {{name}}!





            `
        });

        let myApp = new MyApp({
            data: {
                name: 'San'
            }
        });
        myApp.attach(document.body);
    </script>
</body>

</html>

示例(Examples)

文档(Document)

周边(Companions)

说明(Description)
san-devtools 调试应用的工具和扩展

Development tools for debugging applications | | san-router | 支持 hash 和 html5 模式的 Router

SPA/MPA Router | | san-store | 应用状态管理套件

Application States Management | | san-update | Immutable的对象更新库

Immutable Data Update | | san-composition | 组合式 API

Composition API | | san-ssr | 服务端渲染框架与工具库

SSR framework and utils | | santd | Ant Design 风格的组件库

Components Library following the Ant Design specification | | san-mui | Material Design 风格的组件库

Material Design Components Library | | san-xui | 百度云控制台风格的组件库

A Set of UI Components that widely used on Baidu Cloud Console | | sanny | VSCode 插件

VSCode extension for SAN | | san-cli | 帮助快速搭建应用的命令行工具

A CLI tooling for rapid development | | san-loader | 支持 sfc 的 Webpack loader

Webpack loader for single-file components | | san-factory | 组件工厂能帮助你在不同环境下更灵活的装配组件

Component register and instantiation | | san-anode-utils | ANode 处理工具库

Util Functions for ANode | | san-test-utils | 单元测试工具库

The unit testing utility library |

变更历史(ChangeLog)

Please visit document ChangeLog

License

San is MIT licensed.

特别感谢(Special Thanks)

文心快码源力计划标志

Extension points exported contracts — how you extend this code

TemplateComponentDefineOptions (Interface)
(no doc) [7 implementers]
types/index.d.ts
ClickerOptions (Interface)
(no doc) [1 implementers]
types/test/define-component.ts
data (Interface)
(no doc)
example/todos-ts/src/data.ts
Component (Interface)
(no doc)
types/index.d.ts
ClickerOptions (Interface)
(no doc) [1 implementers]
types/test/clicker-def.ts
CategoryMap (Interface)
(no doc)
example/todos-ts/src/service.ts
TemplateComponent (Interface)
(no doc)
types/index.d.ts
ClickerOptions (Interface)
(no doc) [1 implementers]
types/test/extend-component.ts

Core symbols most depended-on inside this repo

attach
called by 657
types/index.d.ts
dispose
called by 633
types/index.d.ts
nextTick
called by 525
types/index.d.ts
done
called by 482
src/view/component-loader.js
evalExpr
called by 61
src/runtime/eval-expr.js
is
called by 60
types/index.d.ts
ref
called by 54
types/index.d.ts
fire
called by 36
types/index.d.ts

Shape

Function 306
Interface 88
Method 77
Class 26
Enum 3

Languages

TypeScript100%

Modules by API surface

types/index.d.ts115 symbols
test/lib/esl.js48 symbols
example/todos-ts/src/todo/form.ts23 symbols
example/todos-ts/src/ui/time-picker.ts15 symbols
example/todos-ts/src/ui/calendar.ts15 symbols
src/util/data-types.js12 symbols
test/transition.spec.js11 symbols
example/todos-ts/src/service.ts11 symbols
example/todos-esnext/src/service.js11 symbols
types/test/extend-component.ts10 symbols
src/view/element-own-attached.js10 symbols
types/test/define-component.ts6 symbols

Dependencies from manifests, versioned

@babel/core7.0.0 · 1×
@babel/polyfill7.0.0 · 1×
@babel/preset-env7.0.0 · 1×
@types/jquery3.5.9 · 1×
@wdio/cli6.6.6 · 1×
@wdio/jasmine-framework6.6.6 · 1×
@wdio/sauce-service8.3.10 · 1×
@wdio/spec-reporter6.6.6 · 1×
art-template4.10.2 · 1×
babel-loader8.0.6 · 1×
colors1.0.3 · 1×
coveralls3.0.1 · 1×

For agents

$ claude mcp add san \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact