1.0.0-alpha.3 • Published 10 months ago
@nativescript-community/xml-ui-compiler v1.0.0-alpha.3
@nativescript-community/xml-ui-compiler
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);
1.0.0-alpha.3
10 months ago
1.0.0-alpha.2
10 months ago
1.0.0-alpha.1
10 months ago
1.0.0-alpha.0
10 months ago