Skip to content

Commit 20d7e27

Browse files
committed
Use metapensiero.pj master branch instead of fork
Having landed needed syntax
1 parent ccccc32 commit 20d7e27

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
}
2929
```
3030

31-
- Install a Python transpiler (e.g. `pip install --user -r requirements.txt`)
31+
- Install the [Javascripthon](https://gitlab.com/metapensiero/metapensiero.pj) Python transpiler (for now **you'll need the development version** e.g. `pip install -r requirements.txt`).
32+
33+
- Note that Javascripthon requires that you have **Python 3.5** (or better).
3234

3335
## Usage
3436

@@ -48,10 +50,9 @@ class Component:
4850
def __init__(self):
4951
self['data'] = lambda: { 'best_lang': 'Python' }
5052
51-
__all__ = Component()
53+
__default__ = Component()
5254
</script>
5355
```
54-
Note: This syntax requires a specific branch of Javascripthon until patches get merged https://github.com/icarito/metapensiero.pj/tree/default_import - see alternative with `require` at https://github.com/martim00/python-webpack-loader/pull/8#issuecomment-359280782
5556

5657
### Using `.py` files for other nuxt files
5758

@@ -69,7 +70,7 @@ def createStore():
6970
mutations={'increment': increment})
7071

7172

72-
__all__ = createStore
73+
__default__ = createStore
7374
```
7475

7576
`pages/counter.vue`
@@ -83,11 +84,13 @@ __all__ = createStore
8384
## Development
8485

8586
- Clone this repository
86-
- Install dependnecies using `yarn install` or `npm install`
87+
- Install dependencies using `yarn install` or `npm install`
8788
- Start development server using `npm run dev`
8889

8990
## License
9091

9192
[MIT License](./LICENSE)
9293

9394
Copyright (c) Sebastian Silva <[email protected]>
95+
96+
This module was started from the [module-template](https://github.com/nuxt-community/module-template) by Pooya Parsa and relies heavily on [python-webpack-loader](https://github.com/martim00/python-webpack-loader) by Martim Nascimento and [Javascripthon](https://gitlab.com/metapensiero/metapensiero.pj) by Alberto Berti.

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-e git+https://github.com/icarito/metapensiero.pj@default_import#egg=javascripthon
1+
-e git+https://gitlab.com/metapensiero/metapensiero.pj.git#egg=javascripthon

test/fixture/pages/index.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
</template>
66

77
<script lang="py?compiler=pj">
8-
98
class Component:
109
def __init__(self):
1110
self['data'] = lambda: { 'py_works': 'Works!' }
1211
13-
__all__= Component()
12+
__default__= Component()
1413
</script>

0 commit comments

Comments
 (0)