Web
Automatic
To create a new hypen web app, you can use the hypen CLI command:
shell
npm install @hypen-lang/hypen-cli@0.1.0
npm hypen create myappThis will create a new directory called myapp with a basic hypen web app.
Manual
To use hypen in your website, you can run the following to install the hypen web adapter:
shell
npm install @hypen-lang/hypen-render-web@0.1.0Then, you can use it in your website by creating a hypenapp in your index.html file like this:
html
<div id="hypenapp"></div>and calling hypen.start() in your index.js file:
javascript
hypen.start({
target: document.getElementById('hypenapp'),
props: {
url: 'app.hypen'// if your hypen app is hosted on a server, you can put the url here
}
});