qkorbit / IFstruct-parser

Parse IFstruct into executable code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IFstruct parser

The parser is used to parse IFstruct into executable code. Different parsers generate different code projects for the same IFstruct, and developers can use the generated projects directly or customize them for secondary development.

Official parser

The official team currently provides three sets of interpreters and basic CLI command-line tools for Web, applets and Flutter, which can be used with the iofod extension IFstruct Synchronization to support parsing IFstruct into the source code of corresponding technology stack projects.

Editor

Editor means the editor of iofod, the official website is www.iofod.com and the editor url is fx.iofod.com

Using the parser

After downloading or cloning a project from Github and entering the project directory, first execute the command to install the CLI globally.

npm run cli:install

Once the installation is complete, you can execute the iofod command from the command line.

Web Parser

Web parser can be used to parse IFstruct into Web project source code, which officially uses Vue as the Web project framework.

  1. Create iofod command to create a Web project template.
iofod create --temp web --dir MyWebProject
  1. Go to the project directory and add the IFstruct listener:
cd MyWebProject && iofod listen --port 3001
  1. Start iofod extension IFstruct sync extension, configure the sync source option to ws://127.0.0.1:3001, then turn on start sync to listen to the current project content changes and sync IFstruct incrementally to the listener to generate the project code automatically.

  2. Execute the dependency installation in the project directory, and run the npm script to preview the development after the installation is complete.

npm run dev

Preview debugging in the browser: ``bash npm run dev

mini-app parser

IFstruct can be parsed into mini-app project source code by mini-app parser, which officially uses Taro as mini-app project framework. (Support WeChat mini-app, Jingdong mini-app, Baidu mini-app, Alipay mini-app, Byte Jump mini-app, QQ light mini-app and fast mini-app)

  1. create iofod command to create mini-app project template.
iofod create --temp mp --dir MyMpProject
  1. Go to the project directory and add the IFstruct listener:
cd MyMpProject && iofod listen --port 3002
  1. Add ws://127.0.0.1:3002 to the sync source configuration of the IFstruct sync expansion, and restart the sync to synchronize the listener to generate the project code.

  2. Execute the dependency installation in the project directory, and run the npm script for development preview after the installation is complete: ``bash

npm run dev:weapp

Preview debugging under WeChat developer tools: ``bash npm run dev:weapp

Flutter parser

IFstruct can be parsed into Flutter project source code by Flutter parser, which officially adopts Flutter as the mobile application engineering framework.

  1. Create iofod command to create Flutter project template.
iofod create --temp flutter --dir MyFlutterProject
  1. Go to the project directory and add the IFstruct listener:
cd MyFlutterProject && iofod listen --port 3003
  1. Add ws://127.0.0.1:3003 to the sync source configuration of the IFstruct sync extension, and restart sync to sync the listener to generate project code.

  2. Execute the dependency installation in the project directory, and after the installation is completed and the environment is configured, click the IDE debug button for development preview:

Or execute the flutter command for development preview: !

flutter run -d <deviceId>

To preview debugging under the simulator.

拓展开发模板

The iofod SDK provides developers with the ability to interact with the main iofod interface within the Web worker, enabling rapid development of iofod extensions through the SDK. The IFstruct command line tool integrates the iofod extension development template:

iofod create --temp extension --dir MyExtensionProject

For detailed documentation on extension development please read official documentation.

IFstruct Synchronization Extensions

You can refer to: Interface Guide - Using Extensions, search IFstruct Sync in the Add Extensions panel, click the search result to enter the extension details page, go back to the extension management panel after installing the extension, set Quick Launch for the extension and then you can see the extension icon in the After installing the extension, go back to the extension management panel and set Quick Launch for the extension.

Click Launch extension, fill in the sync source address (separated by carriage return), and turn on Start Sync to push IFstruct to the target address.

Custom parsers

The official parser covers most of the mainstream application development forms, developers only need to fine-tune the parser template to adapt to most of the business needs, if the official parser does not meet the needs, developers can use their own creativity, need to change or rewrite a more appropriate parser.

About

Parse IFstruct into executable code.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 35.4%Language:CSS 25.7%Language:Dart 16.1%Language:TypeScript 12.6%Language:Vue 3.2%Language:C++ 2.4%Language:CMake 2.0%Language:Less 1.4%Language:HTML 0.9%Language:Swift 0.2%Language:C 0.2%Language:Objective-C 0.0%