Coder Social home page Coder Social logo

hhuwc / wxml-parser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wxmlfile/wxml-parser

0.0 0.0 0.0 67 KB

A fast and tolerant wxml parser

Home Page: https://wxmlfile.github.io/explorer

License: MIT License

Shell 0.08% JavaScript 58.92% TypeScript 40.99%

wxml-parser's Introduction

@wxml/parser

npm version CI Status GitHub license PRs Welcome Twitter Follow Author

A fast and tolerant wxml parser

Installation

## npm
$ npm install @wxml/parser --save-dev
## pnpm
$ pnpm add -D @wxml/parser
## yarn
$ yarn add @wxml/parser --dev
## cnpm (for china user)
$ cnpm install @wxml/parser --save-dev

AST docs

Wanna try high level usage, check our AST docs first !

AST explorer

Basic Usage

const { parse } = require("@wxml/parser");
const AST = parse(`
  <view class="search-contianer">
    <view class="search" style="height:{{navHeight}}px;padding-top:{{navTop}}px">
      <view class="search-title" src="../../images/actLogo/ytlogo.png">
        {{mallName}}
      </view>
      <input
        placeholder-class="search-placeholder"
        type="text"
        placeholder="please enter keyword for search"
        disabled
        value="{{name}}"
        bindinput="bindinput"
        bindtap="goSearch">
      </input>
    </view>
  </view>
`);
console.log("AST structure: ", AST);

Try Play Online

Open RunKit , and then happy coding !

wxml-parser's People

Contributors

ichenlei avatar dhlolo avatar

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.