Comments (11)
Not that I know of.
But it should be possible to create a similar extension to this one to create Julia files. Or a more generic one to create any type of files.
from jupyterlab-python-file.
Hi @jtpio !
So I forked your project and made an attempt to adapt the code to create .jl
files instead of .py
. I get an error message during the npm run build
. Would you have a look at my modification and edits if needed? This is my first time messing with code for a Jupyterlab extension.
https://github.com/ArcticSnow/jupyterlab-julia-file
Thanks
from jupyterlab-python-file.
That's awesome @ArcticSnow !
The code looks good. Would you mind posting the error you get from npm run build
?
Usually it's good practice to create a new conda environment locally for development:
conda create -n jupyterlab-python-file -c conda-forge jupyterlab nodejs
conda activate jupyterlab-python-file
npm install
npm run build
jupyter labextension install .
from jupyterlab-python-file.
Ok, I tried as you indicated creating a conda VE and run npm, though npm still returns the following error.
~/github/jupyterlab-julia-file$ npm install
> [email protected] prepare /home/arcticsnow/github/jupyterlab-julia-file
> npm run clean && npm run build
> [email protected] clean /home/arcticsnow/github/jupyterlab-julia-file
> rimraf lib
> [email protected] build /home/arcticsnow/github/jupyterlab-julia-file
> tsc
node_modules/@jupyterlab/ui-components/lib/icon/iconregistry.d.ts:1:8 - error TS1259: Module '"/home/arcticsnow/github/jupyterlab-julia-file/node_modules/@types/react/index"' can only be default-imported using the 'esModuleInterop' flag
1 import React from 'react';
~~~~~
node_modules/@types/react/index.d.ts:55:1
55 export = React;
~~~~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
node_modules/@jupyterlab/ui-components/lib/icon/interfaces.d.ts:3:8 - error TS1259: Module '"/home/arcticsnow/github/jupyterlab-julia-file/node_modules/@types/react/index"' can only be default-imported using the 'esModuleInterop' flag
3 import React from 'react';
~~~~~
from jupyterlab-python-file.
Wow, good catch.
There must have been a new version of the ui-components
package that breaks compatibility with the previous tsconfig.
What if you apply the following change to tsconfig.json
? (I'll push the same to this repo)
diff --git a/tsconfig.json b/tsconfig.json
index 4946663..3227f68 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"declaration": true,
+ "esModuleInterop": true,
"lib": ["es2015", "dom"],
"module": "commonjs",
"moduleResolution": "node",
from jupyterlab-python-file.
Should be fixed in: #9
from jupyterlab-python-file.
Wow thanks for the guidance, everything works now!!!
I'll update the readme and media (logos) and then I'll have to figure out how to make the extension available to others :)
from jupyterlab-python-file.
Nice!
To make it available to others, the easiest would be to publish it to npm.
There is a section about this in the JupyterLab documentation: https://jupyterlab.readthedocs.io/en/latest/developer/extension_tutorial.html#publish-your-extension-to-npmjs-org
from jupyterlab-python-file.
Well it is now published on npm following their tutorial.
To install it:
jupyter labextension install @arcticsnow/jupyterlab-julia-file
I simply miss the Julia icon. But most importantly it works as wanted. :)
many thanks!
from jupyterlab-python-file.
Well done!
You might want to have a look at this example to add an icon to the launcher: https://github.com/jtpio/jupyterlab-extension-examples/tree/master/launcher
The same repo contains more examples on various other topics related to JupyterLab extension development, in case you are interested.
from jupyterlab-python-file.
Closing as answered.
Would you like to open a PR to add a link to your extension in a new "Related Projects" section in the README file?
from jupyterlab-python-file.
Related Issues (9)
- npm dependencies failed to install HOT 5
- Is there anyway to do tab completion in this plugin HOT 3
- ValueError: No version of jupyterlab-python-file could be found HOT 1
- does this plugin allow path completion in python files? HOT 2
- Archive the repository? HOT 1
- Add context menu entry
- feature: code folding for python code (def, class, etc) HOT 2
- Can this plugin be used to execute.py files? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jupyterlab-python-file.