Get Started with ClearlyJS
Last updated
Last updated
ClearlyJS is a simple and open source JavaScript library, made for making small-scale apps in no time - and without learning a new language! ClearlyJS uses the latest JavaScript features (Such as ), combined with the legacy HTML and Vanilla JS to make the best of both worlds. ClearlyJS contains functions for DOM elements, URLs, cookies, XML elements and more, and even has tools and add-ins to help you build stable and fast apps!
ClearlyJS lets you write your page in multiple ways - or to do it in your way!
To start using ClearlyJS, open a new HTML page and add this line as the first line of your head tag:
It is recommended to use ClearlyDebug:
That's it! your project is now connected to ClearlyJS!
You can also import ClearlyJS directly from your JavaScript files - just type:
Important: This method will only work if you import your JavaScript file as a module:
This method to import ClearlyJS will be available soon
After downloading, go to your terminal and type:
(this will download Babel and the React JSX plugin)
That's it!
On Windows
You can use an automated tool to start compiling faster:
Download the zip file below, extract it and drag the .bat file to your project's folder and run it. you'll be asked to specify the folder with the jsx files and the output folder. Closing the window will stop the compilation. You can edit the batch file to match your needs.
On any other OS (including Windows ;)
First, extract the zip file below and put the .babelrc file in your project.
Open your terminal and type:
(replace the JSX-FILE-OR-FOLDER and OUTPUT-FOLDER parameters with your directories)
Closing the terminal window will stop the compilation.
We'll now make a simple Hello World app.
Start a new project with two files: index.html and index.js (or index.jsx).
In the index.js we'll write:
Try running the HTML file.
lets you write HTML code - and use it in React and in ClearlyJS! JSX files need to be compiled by a JavaScript compiler named in order to use them.
In the index.html file - we'll then import our script as defer: