
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
把字符串模板解析成render函数依赖一个专门解析xhtml的库:xhtml-engine
| Project | Status | Download | Description |
|---|---|---|---|
| icrush-loader | iCrush的loader | ||
| icrush-style-loader | iCrush的样式loader | ||
| icrush-loader-plug | iCrush打包插件 |
使用的时候遇到任何问题或有好的建议,请点击进入issue!你可以查阅文档获得接口API和入门教程。
首先你需要通过命令行安装iCrush,就像这样:
npm install --save icrush
安装好了以后,在需要的地方引入即可:
import iCrush from 'icrush';
iCrush设计的思想是组件,一个完整的页面由一系列并列或包含的组件拼接而成,但是,根组件只有一个:
// 引入别的组件
// 在这个组件里面,又可以引入组件,这样一层层拼接
// 当然,每次并列引入的组件理论上可以任意多
import App from './App.iCrush';
// 根对象
window.icrush = new iCrush({
// 挂载点
el: document.getElementById('root'),
// 配置启动方法
render: createElement => createElement(App),
// 还可以添加方法或生命周期钩子等
});
你可能会好奇App.iCrush的格式:
<template>
<!-- 页面模板 -->
</template>
<script>
export default {
/*类似控制器的地方*/
};
</script>
<style>
/*写样式的地方*/
</style>
更多细节请查阅文档获得帮助。
首先进入test/webpack例子项目,运行:
npm run debug
在需要调试的地方提前添加“ debugger ”语句,这和普通的web端调试一样,接着,在chrome浏览器地址栏中输入:
chrome://inspect/#devices
接着,请点击“ Open dedicated DevTools for Node ”后进入调试界面。
Copyright (c) 2020 走一步 再走一步
FAQs
📚 一个渐进型的前端小框架。
We found that icrush demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.