New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

icrush

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

icrush

📚 一个渐进型的前端小框架。

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
1
Created
Source

iCrush 📚 🚧 🎮 一个渐进型的前端小框架

把字符串模板解析成render函数依赖一个专门解析xhtml的库:xhtml-engine

Downloads Version License

ProjectStatusDownloadDescription
icrush-loadericrush-loader-statusicrush-loader-download-statusiCrush的loader
icrush-style-loadericrush-style-loader-statusicrush-style-loader-download-statusiCrush的样式loader
icrush-loader-plugicrush-loader-plug-statusicrush-loader-plug-download-statusiCrush打包插件

Issues

使用的时候遇到任何问题或有好的建议,请点击进入issue!你可以查阅文档获得接口API和入门教程。

How to use?

首先你需要通过命令行安装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>

更多细节请查阅文档获得帮助。

如何调试loader?

首先进入test/webpack例子项目,运行:

npm run debug

在需要调试的地方提前添加“ debugger ”语句,这和普通的web端调试一样,接着,在chrome浏览器地址栏中输入:

chrome://inspect/#devices

接着,请点击“ Open dedicated DevTools for Node ”后进入调试界面。

License

MIT

Copyright (c) 2020 走一步 再走一步

Keywords

framework

FAQs

Package last updated on 13 Oct 2020

Did you know?

Socket

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.

Install

Related posts