Skip to content

Commit 203fd14

Browse files
author
Pranjal Pandey
authored
Update README.md
1 parent a9eb6f6 commit 203fd14

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,32 @@ function click()
7474
This was designed to convert php scripts to javascript code , this might not work with full blown php classes !
7575
You can call javascript functions like console.log etc right from your php code and it will work as expected in the browser.
7676
This compiler does not support magic variables and magic functions of PHP.
77+
78+
79+
### Changelog
80+
81+
##### v0.2.0
82+
- Added support for import : `include 'test'` now converts to `import test from './test.js'`
83+
You can also use import_from() php function to define path of module.
84+
Example:
85+
```php
86+
import_from('test','./component/test.js');
87+
```
88+
will compile to
89+
```js
90+
import test from './component/test.js';
91+
```
92+
93+
- Added support for async function declaration via comment:
94+
```php
95+
// @async
96+
function abc(){
97+
return 'hi';
98+
}
99+
```
100+
will compile to
101+
```js
102+
async function abc(){
103+
return 'hi';
104+
}
105+
```

0 commit comments

Comments
 (0)