Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
3fa882a4
Commit
3fa882a4
authored
Jul 14, 2018
by
MMesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jlabext that defines ihaskell codemirror mode
parent
fbd91afb
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1636 additions
and
0 deletions
+1636
-0
.gitignore
ihaskell_labextension/.gitignore
+5
-0
README.md
ihaskell_labextension/README.md
+32
-0
package-lock.json
ihaskell_labextension/package-lock.json
+850
-0
package.json
ihaskell_labextension/package.json
+46
-0
codemirror-ihaskell.ts
ihaskell_labextension/src/codemirror-ihaskell.ts
+26
-0
index.ts
ihaskell_labextension/src/index.ts
+28
-0
index.css
ihaskell_labextension/style/index.css
+0
-0
tsconfig.json
ihaskell_labextension/tsconfig.json
+16
-0
yarn.lock
ihaskell_labextension/yarn.lock
+633
-0
No files found.
ihaskell_labextension/.gitignore
0 → 100644
View file @
3fa882a4
*.bundle.*
lib/
node_modules/
*.egg-info/
.ipynb_checkpoints
ihaskell_labextension/README.md
0 → 100644
View file @
3fa882a4
# ihaskell_labextension
Haskell Syntax Highlighting in Jupyterlab
## Prerequisites
*
JupyterLab
## Installation
```
bash
jupyter labextension
install
ihaskell_labextension
```
## Development
For a development install (requires npm version 4 or later), do the following in the repository directory:
```
bash
npm
install
npm run build
jupyter labextension
link
.
```
To rebuild the package and the JupyterLab app:
```
bash
npm run build
jupyter lab build
```
ihaskell_labextension/package-lock.json
0 → 100644
View file @
3fa882a4
This diff is collapsed.
Click to expand it.
ihaskell_labextension/package.json
0 → 100644
View file @
3fa882a4
{
"name"
:
"ihaskell_jupyterlab"
,
"version"
:
"0.0.1"
,
"description"
:
"JupyterLab extension"
,
"keywords"
:
[
"jupyter"
,
"jupyterlab"
,
"jupyterlab-extension"
],
"homepage"
:
"https://github.com/xxx"
,
"bugs"
:
{
"url"
:
"https://github.com/xxx/issues"
},
"license"
:
"BSD-3-Clause"
,
"author"
:
"MMesch"
,
"files"
:
[
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}"
,
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
],
"main"
:
"lib/index.js"
,
"types"
:
"lib/index.d.ts"
,
"repository"
:
{
"type"
:
"git"
,
"url"
:
"https://github.com/xxx/jupyterlab-sos.git"
},
"scripts"
:
{
"build"
:
"tsc"
,
"clean"
:
"rimraf lib"
,
"watch"
:
"tsc -w"
},
"dependencies"
:
{
"@jupyterlab/application"
:
"^0.16.1"
,
"@jupyterlab/apputils"
:
"^0.16.2"
,
"@jupyterlab/docregistry"
:
"^0.16.1"
,
"@jupyterlab/notebook"
:
"^0.16.1"
,
"@jupyterlab/services"
:
"^2.0.1"
,
"@phosphor/disposable"
:
"^1.1.2"
},
"devDependencies"
:
{
"rimraf"
:
"^2.6.1"
,
"typescript"
:
"~2.6.0"
},
"jupyterlab"
:
{
"extension"
:
true
}
}
ihaskell_labextension/src/codemirror-ihaskell.ts
0 → 100644
View file @
3fa882a4
import
*
as
CodeMirror
from
'codemirror'
;
import
'codemirror/lib/codemirror'
;
import
'codemirror/mode/haskell/haskell'
;
CodeMirror
.
defineMode
(
"ihaskell"
,
(
config
)
=>
{
let
hmode
=
CodeMirror
.
getMode
(
config
,
"haskell"
);
return
CodeMirror
.
multiplexingMode
(
hmode
,
{
open
:
/:
(?=
!
)
/
,
// Matches : followed by !, but doesn't consume !
close
:
/^
(?!
!
)
/
,
// Matches start of line not followed by !, doesn't consume character
mode
:
CodeMirror
.
getMode
(
config
,
"text/plain"
),
delimStyle
:
"delimit"
}
);
});
CodeMirror
.
defineMIME
(
"text/x-ihaskell"
,
"ihaskell"
);
CodeMirror
.
modeInfo
.
push
({
ext
:
[
'hs'
],
mime
:
"text/x-ihaskell"
,
mode
:
'ihaskell'
,
name
:
'ihaskell'
});
ihaskell_labextension/src/index.ts
0 → 100644
View file @
3fa882a4
import
{
JupyterLab
,
JupyterLabPlugin
}
from
'@jupyterlab/application'
;
import
'./codemirror-ihaskell'
;
import
'../style/index.css'
;
/**
* Initialization data for the extension1 extension.
*/
const
extension
:
JupyterLabPlugin
<
void
>
=
{
id
:
'ihaskell'
,
autoStart
:
true
,
requires
:
[],
activate
:
(
app
:
JupyterLab
)
=>
{
app
.
serviceManager
.
ready
.
then
(()
=>
{
defineIHaskell
()});
}
};
function
defineIHaskell
()
{
console
.
log
(
'ihaskell codemirror activated'
);
}
export
default
extension
;
ihaskell_labextension/style/index.css
0 → 100644
View file @
3fa882a4
ihaskell_labextension/tsconfig.json
0 → 100644
View file @
3fa882a4
{
"compilerOptions"
:
{
"declaration"
:
true
,
"noImplicitAny"
:
false
,
"noEmitOnError"
:
true
,
"noUnusedLocals"
:
true
,
"allowSyntheticDefaultImports"
:
true
,
"module"
:
"commonjs"
,
"moduleResolution"
:
"node"
,
"target"
:
"es2015"
,
"outDir"
:
"./lib"
,
"lib"
:
[
"dom"
,
"es2015"
],
"types"
:
[]
},
"include"
:
[
"src/*"
]
}
ihaskell_labextension/yarn.lock
0 → 100644
View file @
3fa882a4
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment