►
Description
JupyterLab Sprint Week 2016, 3rd Party Extensions Overview by Steve, September 20, 2016
A
Okay,
just
to
verify,
can
everyone
still
see
you
on
Chrome
window
next,
and
so
what
we're
looking
at
here
is
a
documentation
for
the
extension
builder.
This
right
now
is
the
entry
point
for
someone
who
wants
to
build
an
extension
for
Jupiter
lab.
We
will
eventually
have
a
cookie
cutter
that
automates
some
of
this
and
you
just
fire
that
thing
up
and
you're
ready
to
roll,
but
we're
not
quite
at
that
point
yet.
But
we'll
start
here
at
the
documentation
for
the
extension
Builder
repo,
that's
in
Jupiter.
A
A
What
it
comes
down
to
for
an
extension
author
is
they're
going
to
use
a
script
that
we
provide
called
build
extension
that
takes
a
set
of
options
and
you
give
it
an
entry
point
which
is
a
JavaScript
file
in
in
commonjs
format,
so
module
exports
style
format
that,
where
the
default
export
is
a
a
phosphor
plug-in
that
is
tailored
to
a
Jupiter
lab
shell
jublia
application
that
has
a
jupiter
lab
shell
in
it.
So
if
you
look
at
our
example
here,
modular
exports
is
just
and
I
plug-in
interface,
we're
at
a
minimum.
A
It
needs
and
ID,
which
is
a
name
and
an
activate
function
that
takes
the
actual
jupiter
lab
application.
Here,
I'm
just
showing
it.
We
have
access
to
the
command
registry
in
the
application,
and
we
can.
We
can
require
other
plugins
here
we
can
provide
an
interface
and
we
can
add
things
to
the
shell
here.
I
mean
the
world's
your
oyster.
This
is
just
the
entry
point,
and
this
particular
extension
only
provides
one
entry
point,
but
this
can
be
an
array
of
plugins
that
you're
providing
as
your
third
party
extension.
A
So
it
can
either
be
a
single
object
or
an
array
of
objects,
but
it's
preferred
to
be
in
a
rate
as
a
type,
but
we
can
accept
a
singular
object,
so
the
author
would
would
create
their
extension
and
then
at
their
entry
point
file,
would
we
have
this
type
of
export
of
their
plugin?
That
consumes
a
logic
that
may
be
in
other
files,
but
that's.
This
is
just
a
way
to
get
into
that
logic.
A
So
this
is
the
just
that
I
plug
in
object
itself
and
then,
when
they're
ready
to
build,
they
use
the
build
extension
script
that
we
provide.
So
this
is
just
a
JavaScript
file
and
again
this
this
would
be
template
it
as
part
of
a
cookie
cutter,
so
they
wouldn't
have
to
just
necessarily
start
writing
into
a
node
file
themselves.
As
both
both
the
the
sample
file
and
a
more
simple
script
to
run,
it
will
be
provided
as
part
of
the
cookie
cutter
can.
A
The
activate
function
so
I
want
this.
This
will
actually
be
a
link
to
what
a
way
and
I'm
plugging
in
is
in
class
word
and
but
the
Yaak
and
I
kept
in
a
window,
but
the
activate
function
returns
either
a
promise
or
value,
and
in
this
case
we
haven't
said
that
we
provide
a
an
interface.
So
what
we're?
What
this
is
expected
to
return
is
either
board
or
promise
on
board,
because
we
haven't
declared
that
we
provide
them
in
the
face.
A
But
that's
a
separate
discussion,
but
yes,
they
may
be
a
link
that
takes
you
do
what,
if
Foster
plugin
is
close
that
loop,
so
the
at
a
basic
level.
What
we
need
to
provide
the
extension
builder
is
the
the
name
of
the
plugin,
the
path,
the
relative
or
absolute
path
through
the
entry
point
file
that
exports
the
plug-in
objects
and
an
output
directory
where
the
build
artifact
should
go.
A
So
if
you
run
this
script
as
using
node
to
run
the
JavaScript
file,
the
the
output
way
at
the
very
least
will
have
two
files
in
that
bill.
Directory
it'll
have
the
name
of
the
extension
JavaScript,
which
is
the
main
bundle
and
then
a
manifest
file
that
describes
the
bundle.
The
manifest
file
is
an
implementation
detail
that
this
server
uses
in
order
to
figure
out
what
the
from
the
build
artifacts.
Where,
where
are
my
entry
point,
bundles
and
within
those
bundles?
Where
is
the
entry
point?
A
Module,
though
most
the
extension
author
doesn't
need
to
know
anything
about
the
interface,
but
we
will
document
that
basically
ABI
that
doesn't
exist
yet
so
we'll
keep
going
here
once
they've
built
the
artifacts,
they
will
ship
them
either
as
a
either
as
a
as
as
a
Python
package.
That's
wrapped
in
the
way
we
distribute
notebook
extensions
generally.
A
These
days
isn't
a
Python
package
that
contains
JavaScript
artifacts
or
it
could
be
just
an
NPM
package
that
gets
installed
without
using
the
Python
mechanism,
but
either
way
it
still
goes
through
the
stupider
lab
extension,
which
actually
right
now
exists
in
Jupiter
lab
itself
under
it.
So
it's
Jupiter
lab
I'm,
bringing
one
up.
Obviously,
no
talking
about
again
there'll
be
a
link
to
that
with
documentation.
That
should
exist
here.
A
So
lab
extensions
is
part
of
the
Jupiter
lab
Python
package
and
that
provides
the
command
line
script
to
both
install
and
enable/disable
and
uninstall
lab
extensions
that
it
moves
the
build
file
artifacts
to
a
known
location.
So
some
Jupiter
path,
slash
lab
extensions
and
then
the
name
of
the
plug
in
that
folder
will
contain
the
build
artifacts
of
which
there
will
be
at
least
the
main
entry
point.
And
it's
manifest
along
with
any
other
files
that
are
produced
by
the
build.
B
A
A
So
yes,
this,
this
will
be
changing
the
the
semantics
of
the
live
extension.
Definitely
for
the
better
something
it's
still
that
still
a
work
in
progress,
but
for
right
now
you
can
use
this
live
extension
command,
don't
find
I'm,
not
sharing
that
particular
screen.
I
won't
go
there,
but
it
from
the
command
line.
You
can
type
Jupiter
live
extension
dash,
H
and
it'll.
Give
you
the
options
there.
So
it's
very
much
like
the
existing
notebook
extension
mechanism.
A
So
it's
very
explicit
which
module
we're
talking
about
here
and
then,
when
we
the
required
functions,
so
the
web
pack
will
will
stamp
in
a
module
ID
when
he
requires
just
a
number
we're
placing
that
number
with
a
cember
mangled
fully
qualified
path
to
what
was
actually
being
required.
So
in
this
case
we
wanted
something
from
the
foster
library.
Our
package.json
said
that
foster.
We
wanted
a
phosphor,
that's
minor
version,
six
or
anywhere
in
that
minor
version
and
and
this
particular
path.
A
And
what
that
enables
us
to
do
is
to
the
best
of
our
ability
only
have
one
version
of
each
module
on
the
page,
which
allows
us
to
the
two
benefits
of
Adar.
You
can
use
instance
of
because
it's
the
same
class
or
prototype
that
you've
instantiating,
which
is
a
mechanism
for
instance,
that
foster
uses
to
do
enable
drag
drop
across
different
containers.
It
checks
to
see
if
it's
an
instance
of
a
widget
before
allowing
you
to
actually
drop
into
a
dock
panel.
A
So
if
you
require
a
module,
it's
expected
that
that
module
has
already
been
defined
and
loaded
on
the
page,
which
means
that
you
must
have
loaded
the
bundle
containing
that
defined
module.
And
so
we
have
an
entry
point
called
ensure
bundle,
so
that
can
be
used
to
dynamically
load,
these
bundles
on
the
page
and
then
be
able
to
require
modules
within
them
and
so
that
this
this
is
a
mechanism
that
could
be
used
later
for
a
dynamic,
plug-in
loader
to
load
bundles
after
the
fact.
A
But
as
of
right
now,
we
are
not
actually
using
that
mechanism,
because
the
server
is
looking
at
which
lab
extensions
have
been
enabled
and
installed
and
is
actually
just
adding
those
as
script
tags
to
the
page
that
its
templating
said
to
serve
the
lab
extension.
The
the
slash
lab
entry
point
handler.
A
The
build
extension
function
we've
only
we've
only
given
the
default
options
here.
By
default,
we
are
providing
some
web
pack
configuration
for
the
end
user.
We
are
extracting
all
CSS
into
a
separate
file.
So
if
this,
if
this
any
of
the
code
used
by
this
extension,
has
CSS
in
it
a
my
cool
extension
dot,
CSS
file
would
be
created.
That
has
all
of
that
and
that's
using
the
extract
text.
Web
pack
plug-in
under
the
covers.
A
We
also
by
default,
provide
all
of
the
loaders
that
are
used
by
Jupiter
lab
itself,
so
that
includes
JSON
HTML,
some
image
formats
and
so
most
extensions
that
don't
have
exotic
file
type,
that
file
types,
that
they're
importing
can
probably
just
use
these
default
options
and
be
fine.
Now,
for
example,
DQ
plot
has
less
files
that
it's
using,
so
it
would
need
to
provide
extra
configuration
here
in
the
form
of
a
web
pack
loader
for
less
files.
That
would
just
be
an
extra
argument
to
the
build
extension
file.
A
Now,
if
you
did
not
agree
with
the
fact
that
we
want
to
handle
all
CSS
for
you,
then
then
let
me
go
to
the
code.
There,
o
builder
and
I'm
gonna,
go
down
to
the
options.
So,
though,
there's
a
flag
to
disable
the
fact
that
we
are
extracting
CSS
for
you,
so
that
that
turns
off
our
internal
use
of
the
extract
text,
WebP
like
web
pack
plug-in
and
you
can
handle
and
CSS
how
you
like.
A
Also
if,
for
some
reason,
you
didn't
like
any
of
our
default
loaders-
and
you
said
no
I'd
like
to
provide
my
own,
you
can
disable
the
default
loaders
using
this
flag
and
then
any
additional
web
pack
configuration
that
you'd
like
including
your
own
loaders
that
either
augment
or
replace
our
default
loaders
or
any
other
valid
web
pack.
Configuration
could
be
given
this
so
there's
an
escape
hatch
to
inject
more
web
pack
configuration
into
the
build,
and
that
is
using
the.
A
A
Your
react
we're
just
using
that
web
pack,
the
Jupiter
lab
plug-in
in
our
in
our
default
web
pack
config.
So
in
the
absolute
advanced
case,
all
they
would
have
to
do
is
use
our
Jupiter
lab
plugin,
due
at
the
last
stage.
After
all,
assets
have
been
admitted
by
web
pack,
convert
those
modules
into
our
module
format,
so
it
should
work
and
we
can
cross
that
bridge
if
we
get
there.
A
Okay,
so
then
yeah
I
talked
about
injecting
your
own
webpack
configuration
and
then
the
absolute
fallback
of
just
using
our
plug-in
to
do
that.
Mangling
now
the
use
of
BQ
plop
brought
up
a
point
where
other
containers
might
want
to
use
this
same
kind
of
version,
mangled
both
defining
of
a
module
and
the
consumption
of
a
module.
A
So
it
looks
like
we
might
have
a
registry
on
Jupiter
Jan's
widgets
that
uses
some
of
the
functionality
in
this
library
to
enable
its
own
container,
where
our
things
can
be
registered
by
name
and
looked
up
by
sunburn,
so
not
at
the
global
package
loaded
level,
but
make
these
these
components
available
for
use
in
other
contexts.
I.
C
Just
had
one
small
thing:
if
you
scroll
up
right
there,
the
build
extension,
the
entry
key
is
not
necessarily
finally,
and
it's
actually
a
module.
So
it's
whatever
you'd
write
in
the
required
statement
that
exports
the
plug-in
definitions
about.
So
you
can
do
dot,
slash
index
that
yes,
but
it
uses
the
node
module
resolution
framework.
So
you
could
that
could
be
dot
slash
index.
You
know
it's
just
gonna
use
the
resolution.
A
C
C
In
which
case,
what
you
do
is
the
default
export
of
your
module
is:
let's
pick
that
there
so
to
make
a
module
that
has
a
default
export,
which
is
your
plugin
definition
yeah,
and
that
module
will
be
in
your
country
and
there
you,
wouldn't
you,
wouldn't
necessarily
do
jl
/
index
and
it'll
pick
up
the
jas.
You
won't
have
to.
A
C
A
E
C
C
C
B
C
B
B
C
Here's
here's
just
a
brief
overview
of
how
it
works
and
I
play
widgets
with
the
Python
package,
so
here's
the
package
JSON
so
like
most
of
our
sort
of
Jupiter
lab
extensions.
This
is
a
Python
package
as
well
as
an
NPM
package,
so
the
NPM
package,
you
see
the
bills.
Essentially,
what
it's
doing
is
it's
calling
this
scripts
build
extension,
so
the
build,
builds
the
source
or
compile
side
script
to
JavaScript
and
then
it
friends
to
build
extension,
which
just
runs
this
one
file
right
here.
C
So
that
file
is
the
very,
very,
very,
very
simple
file.
Thanks
to
all
the
work
done
behind
the
scenes,
bye,
bye,
Steve
that
just
calls
this
Bill's
extension
script.
It
gives
it
a
name.
Here's
my
entry
point
and
notice
here
again:
I'm
referring
to
the
compiled
JavaScript
it's
in
the
Lib
directory
and
I.
Don't
worry
about
dot.
J
s
or
anything.
I
mean
node,
we'll
pick
that
up
in
its
resolution
and
my
output
directory
is
in
my
Python
package
that
ik
directory
so
I'm
taking
it
from
my
live
directory.
B
C
C
Let's
set
up
the
QI
doubles
up
ipi
package
and
when
I
run
it
there
will
be
an
extra
static
directory
in
here,
and
that
will
include
all
the
bundles
resources
and
DNA
py
as
the
the
one
little
bit
of
magic
to
be
able
to
install
a
super
lab
extension,
which
is
exactly
nearest
notebook
extensions,
which
is
the
name
that
it'll
copy
it
into
the
share.
Jupiter
share,
lab
extensions
directory
and
the
source
is
the
static
directory
is
generated
in
here
from
that
build
extension
strip.
C
A
D
C
C
E
F
But
the
way
that
we've
set
things
up
is
that
we
can
at
some
point
in
the
future,
start
D
duping
things
from
the
Python
process,
because
we're
tagging
this
a
simple
bundle
with
the
version
information
of
the
things
that
are
being
bundled
so
since
every
extension
is
going
to
bundle
phosphor
just
by
the
nest,
because
yeah
they're
going
to
be
using
it.
We
can
then
go
in
and
do
a
trivial
Diedrich
stage
from
Python
on
the
final
bundle
that
served
as
a
Jew
per
lab
application,
which
rips
out
things
that
are
of
identical
versions.
F
C
End
I'll
add
right
the
way,
we're
tagging
the
bundle
files
means
that
you
don't
have
to
write
a
JavaScript
parser
in
order
to
strip
out
code
like
we
have
beginning
and
in
tags,
so
that
it's
very
easy
to
strip
out
parts
of
the
file
and
the
manifest
comes
with
that
as
well
right.
It
has
all
the
interdependencies
within
requirement.
So
Brian.
You
wanted
to
look
at
B
to
plot
here's
B
to
plot
there's
a
lot
of
hacks
right
here
right
now
and
B
coupon.
But
what
did
you
want
to
look
at.
E
C
The
package.json,
so
these
are
the
changes
I
needed
to
make
you
get
a
very
happily
working
and
then
Jupiter
lab
so
I
now
dev
dependency
on
Jupiter,
lab
extension
builder
and
a
dependency
on
Jupiter
lab
and
jibber-jabber.
Just
I
just
needed
to
update
the
version.
And
then
what
was
the
other
one
that
you
wanted
to
see.
C
E
C
Not
the
extension
itself,
some
widgets
library,
it's
so
there's,
there's
the
Jupiter
Gaius
widgets
library,
which
is
totally
independent,
trooper
lab
and
then
there's
the
widgets
lab
extension
that
adapts
the
to
previously
widgets
library
to
work
inside
the
provides
the
plugin
infrastructure
to
work
inside
of
jupiter
lab.
We
don't
touch
the
lab
plugin
for
Jupiter,
yes,
but
you're,
something
you
don't
use
it
from
a
cone
respect
right.
We
just
used
the
underlying
library.
We
do
need
to
be
there
because
that's
what
we'll
call
us?
Oh.
C
No
well
yeah
in
the
next
iteration
of
this,
we
will
depend
on
it.
This
is
what
Steve
was
talking
about
a
little
bit
earlier
right
now,
the
hack
that
we're
doing
to
get
be
cute
lot
of
work
is
that
we're
we're
letting
I,
hi
widgets,
call
anybody
and
couldn't
beat.
You
fought
anything
instead
of
having
an
explicit
registry
of
hi
widgets,
so
the
next
version
will
have
us
importing
the
widgets
lab
extension
and
adding
EQ
plot
to
the
like.
It
will
require
something
provided
by
the
widgets
line.
C
C
C
I
think
next
steps
are
a
cookie
cutter
which
will
help
us
formalize
this
sort
of
documentation
and
what
needs
to
be
done
and
what's
a
minimal
require
and
that
we'd
like
to
I
need
to
talk
to
you
Steve.
We
put
our
heads
together
about
a
generic
container
that
lets
you.
Do
this
versioning
magic
right
now,
I
hide
widgets
I
hacked
into
just
generically
load
stuff
from
the
page,
using
the
global
level
container
that
doesn't
feel
very
clean
at
all,
because
it
means
every
widget
essentially
has
full
gamet
just
load
something
onto
the
page.
C
C
C
C
B
A
B
A
C
F
C
What
is
it?
Okay,
calm
target
yeah
so
that
I
think
having
you
having
a
generic
container
that
basically
stores
a
name
of
version
number
and
something
to
return,
and
then
does
this.
The
dipping
stuff
is
a
nice
journal,
ization
of
what
we
have
now.
It
may
actually
be
a
lot
easier
than
I
thought
it
was
I
could
find
even
there
yeah
or
maybe
that
you
already
have
a
class
that
does
it
I,
don't
know
yeah
it's
a
class
and
that's
why
yeah
a
class
Frank
and
using
other
concepts,
yeah,
perfect.
Okay,
so
maybe
just.