Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0806625
Package phosphor
jasongrout Apr 17, 2015
aaece9e
Notebook format interfaces
jasongrout Apr 17, 2015
934a2f3
Initial experiment
jasongrout Apr 17, 2015
6a55b99
Get basic typescript generation working with gulp
jasongrout Apr 21, 2015
234523b
Move the nbformat.ts file to the new notebook.
jasongrout Apr 23, 2015
bedc9cf
Upgrade phosphor
jasongrout Apr 23, 2015
75b4e57
More progress on a Notebook phosphor component
jasongrout Apr 23, 2015
11f421f
Revert "Package phosphor"
jasongrout Apr 23, 2015
28d01e5
The metadata format is different, it seems, from the spec
jasongrout Apr 23, 2015
c257c49
Fix reference error.
jasongrout Apr 23, 2015
dfee8de
add cell source to rendered output
jasongrout Apr 23, 2015
3f2793d
Add basic codemirror support for inputs
jasongrout Apr 24, 2015
b682efa
Add gitignore
jasongrout Apr 24, 2015
435e46e
Make cell metadata optional, as specified in json schema
jasongrout Apr 24, 2015
af91de8
Add markdown cell rendering
jasongrout Apr 24, 2015
7ea80db
Add *very* rudimentary mathjax support.
jasongrout Apr 24, 2015
2bf79b3
Import the current jupyter_notebook mathjaxutils file from jupyter_no…
jasongrout Apr 28, 2015
a5baebd
Convert mathjaxutils.ts to valid typescript
jasongrout Apr 28, 2015
030bb14
Get markdown cells to work well with mathjax.
jasongrout Apr 28, 2015
9743785
jupyter notebook multiline strings are actually strings in the in-mem…
jasongrout Apr 28, 2015
a145c6d
Use custom markdown renderer to implement external links
jasongrout May 7, 2015
f83e7b2
The session js object doesn't need a handle to the notebook object, j…
jasongrout May 8, 2015
4b2a59f
More changes...
jasongrout Jun 16, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jupyter_notebook/static/notebook/js/notebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,7 @@ define(function (require) {
notebook_path: this.notebook_path,
notebook_name: this.notebook_name,
kernel_name: kernel_name,
notebook: this
events: this.events
};

var success = $.proxy(this._session_started, this);
Expand Down
3 changes: 3 additions & 0 deletions jupyter_notebook/static/phosphor-notebook/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory" : "components"
}
2 changes: 2 additions & 0 deletions jupyter_notebook/static/phosphor-notebook/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
components
typings
26 changes: 26 additions & 0 deletions jupyter_notebook/static/phosphor-notebook/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "phosphor-notebook",
"main": "index.js",
"version": "0.0.1",
"authors": [
"Jason Grout <[email protected]>"
],
"description": "Phosphor-based IPython notebook",
"moduleType": [
"amd"
],
"license": "BSD",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"jupyter_notebook/static/components",
"test",
"tests"
],
"dependencies": {
"phosphor": "~0.2.0",
"codemirror": "~5.2.0",
"marked": "~0.3.3"
}
}
69 changes: 69 additions & 0 deletions jupyter_notebook/static/phosphor-notebook/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// based on Chris Colbert's gulpfile.js at https://github.com/phosphorjs/phosphor/blob/master/gulpfile.js
// (which is licensed BSD 3-clause)

"use strict";
var gulp = require("gulp");
var typescript = require("gulp-typescript");
var concat = require('gulp-concat');
var header = require('gulp-header');
var stream = require('event-stream');
var rename = require('gulp-rename');
var del = require('del');


var typings = ["./typings/tsd.d.ts", "./components/phosphor/dist/phosphor.d.ts"];

var tsSources = [
"index",
"app",
"NotebookComponent",
"nbformat",
"demodata",
"mathjaxutils",
].map(function(name) {return "./src/" + name + ".ts"; });


gulp.task('clean', function(cb) {
del(['./dist'], cb);
});


gulp.task('src', function() {
var project = typescript.createProject({
declarationFiles: true,
noImplicitAny: true,
target: 'ES5',
module: 'amd'
});

var src = gulp.src(typings.concat(tsSources))
.pipe(typescript(project));

var dts = src.dts.pipe(concat('phosphor-notebook.d.ts'))
.pipe(gulp.dest('./dist'));

var js = src//.pipe(concat('phosphor-notebook.js'))
.pipe(header('"use strict";\n'))
.pipe(gulp.dest('./dist'));

return stream.merge(dts, js);
});


gulp.task('build', ['src']);


gulp.task('dist', ['build'], function() {
return gulp.src('./dist/phosphor-notebook.js')
//.pipe(uglify())
.pipe(rename('phosphor-notebook.min.js'))
.pipe(gulp.dest('./dist'));
});


gulp.task('watch', function() {
gulp.watch(tsSources, ['src']);
});


gulp.task('default', ['dist']);
45 changes: 45 additions & 0 deletions jupyter_notebook/static/phosphor-notebook/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<script src="components/codemirror/lib/codemirror.js"></script>
<script src="components/codemirror/mode/python/python.js"></script>
<link rel="stylesheet" href="components/codemirror/lib/codemirror.css">
<script src="components/marked/marked.min.js"></script>
<script src="/static/components/requirejs/require.js"></script>
<script src="/static/components/MathJax/MathJax.js?config=TeX-AMS_HTML-full,Safe&delayStartupUntil=configured"></script>
<link href="components/phosphor/dist/phosphor.css" rel="stylesheet" type="text/css">
<!--<link href="build/index.css" rel="stylesheet" type="text/css">-->
<script src="components/phosphor/dist/phosphor.js"></script>


<script>
require.config({
baseURL: '/static'
paths: {
session: 'services/sessions/session',

kernelspecs : '/kernelspecs',
jquery: 'components/jquery/jquery.min',
},
}
});
</script>


<script>
require(["./dist/index.js"], function(ind) {
console.log("finished initialization");
ind.main();
});
</script>
<style>
#test {border: 1px solid red;}
.ipy-input {border: 1px solid blue; margin: 5px;}
.ipy-input .CodeMirror {height: auto;}

</style>
</head>
<body>
<div id="test"></div>
</body>
</html>
37 changes: 37 additions & 0 deletions jupyter_notebook/static/phosphor-notebook/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "phosphor-notebook",
"version": "0.1.0",
"description": "Jupyter Notebook nodejs dependencies",
"author": "Jupyter Developers",
"license": "BSD-3-Clause",
"repository": {
"type": "git",
"url": "https://github.com/jupyter/jupyter_notebook.git"
},
"devDependencies": {
"bower": "*",
"gulp": "^3.8.11",
"gulp-less": "^3.0.3",
"gulp-minify-css": "^1.1.1",
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^1.5.2",
"less": "~2",
"source-map": "^0.4.2"
},
"bugs": {
"url": "https://github.com/jupyter/jupyter_notebook/issues"
},
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"gulp": "~3.8.11",
"gulp-concat": "~2.5.2",
"gulp-header": "~1.2.2",
"event-stream": "~3.3.1",
"gulp-rename": "~1.2.2",
"del": "~1.1.1",
"gulp-typescript": "~2.7.3"
}
}
Loading