@nativescript-community/xml-ui-compiler
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-alpha.3 • Public • Published

@nativescript-community/xml-ui-compiler

npm npm

A Node compiler that converts NativeScript XML view content to AST.

Installation

npm install @nativescript-community/xml-ui-compiler --save-dev

Usage

import fs from 'fs';
import generate from '@babel/generator';
import { compile } from '@nativescript-community/xml-ui-compiler';

const filePath = 'views/home/home.xml';
const content = fs.readFileSync(filePath, 'utf8');

const { output } = compile(content, filePath, 'android');

// Convert AST to JS and print
console.log(generate(output).code);

Package Sidebar

Install

npm i @nativescript-community/xml-ui-compiler

Weekly Downloads

1

Version

1.0.0-alpha.3

License

Apache-2.0

Unpacked Size

152 kB

Total Files

24

Last publish

Collaborators

  • ammarahm-ed
  • dgmachado
  • classicoldsong
  • mayerlench
  • jcassidyav
  • sebjean
  • cjohn001
  • edusperoni
  • asharghi
  • farfromrefuge
  • triniwiz
  • eddyverbruggen
  • rigor789
  • walkerrunpdx
  • dnr
  • keerl
  • cvietor
  • bradmartin
  • rdlabo
  • tralves