You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 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).
32
34
33
35
## Usage
34
36
@@ -48,10 +50,9 @@ class Component:
48
50
def __init__(self):
49
51
self['data'] = lambda: { 'best_lang':'Python' }
50
52
51
-
__all__=Component()
53
+
__default__=Component()
52
54
</script>
53
55
```
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
55
56
56
57
### Using `.py` files for other nuxt files
57
58
@@ -69,7 +70,7 @@ def createStore():
69
70
mutations={'increment': increment})
70
71
71
72
72
-
__all__= createStore
73
+
__default__= createStore
73
74
```
74
75
75
76
`pages/counter.vue`
@@ -83,11 +84,13 @@ __all__ = createStore
83
84
## Development
84
85
85
86
- Clone this repository
86
-
- Install dependnecies using `yarn install` or `npm install`
87
+
- Install dependencies using `yarn install` or `npm install`
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.
0 commit comments