@iceworks/dsl2code
TypeScript icon, indicating that this package has built-in type declarations

4.1.2-alpha.0 • Public • Published

搭建协议转源码包

鉴于 iceluna 的 schema 转源码包(iceluna-compiler)功能尚不完善,且是基于旧版搭建协议,因此 iceworks 拷贝 iceluna-compiler 源代码进行修改,未来待 iceluna 的包功能完善后切回 iceluna 包。

Usage

import compile from '@iceworks/dsl2code';
import dsl from './dsl.js'; // 基于 iceluna 搭建协议的 schema
import componentsMap from './componentsMap.js'; // 所有物料的配置信息

/**
 * 返回数据格式
 * [
 *  {
 *    name: 'index.jsx', // 文件名
 *    value: 'import React, {Component} from "react";...' // 文件源码
 *  },
 *  {
 *    ...
 *  }
 * ]
*/
const files = compile(dsl, componentsMap);

Debug

进入 examples 目录

tnpm install
npm start

Publish

tnpm publish

Readme

Keywords

none

Package Sidebar

Install

npm i @iceworks/dsl2code

Weekly Downloads

3

Version

4.1.2-alpha.0

License

none

Unpacked Size

22.6 kB

Total Files

18

Last publish

Collaborators

  • fyangstudio
  • luhengchang228
  • rax-publisher
  • alvinhui
  • empireo
  • sobear
  • yuanyan