►
From YouTube: GitLab NPM Registry Demo
Description
Steve gives a demo of the NPM Registry and walks us through how to publish, pull packages and to do the same with GitLab CI.
A
B
B
And
I'm
going
to
open
that
up
with
toad
and
they're,
just
using
vs
toad
here
for
you,
alright,
so
we'll
start
out
will
create
our
fjs,
which
is
just
gonna,
be
I,
mean
entry
point
for
now.
This
is
gonna,
be
the
simplest
NPM
library
that
we
can
find
because
we're
more
focused
on
the
implementation
of
publishing
packages
and
installing
them.
So
for
our
spells
a
good
spell,
maybe
we
might
just
say
the
bus
Thanks,
all
right,
that'll
be
a
canal,
so
we'll
focus
more
on
the
publishing
side.
B
But
to
get
things
started,
you
have
a
git
ignore
and
I'm
gonna
have
a
dot
NPM
RC
and
in
the
get
ignore
I'm
going
to
go
ahead
and
ignore
my
NPM
RC,
which
this
is
sort
of
an
optional
thing.
It
depends
on
how
you're
going
to
handle
the
ndnrc,
which
will
get
into
internet,
so
I
think
I
have
enough
here
that
I'm
ready
to
make
my
first
met
and
use
this
code
right
here
to
go
ahead
and
initialize.
My
repository.
B
All
right,
cool
I
should
have
some
code
here
cool
and
just
for
a
little
background
if
we
come
to
get
Bob
documentation
and
search
for
NPM
registry
first
option
that
comes
up
should
be
the
documentation
how
to
get
started
in
registry,
which
is
pretty
much
everything
I'm
going
to
be
doing
today.
So
we
can
see,
we've
got
a
template
for
our
NPM
or
C
file
right
here
we
have
all
of
the
different
pieces
of
the
puzzle.
B
B
All
right
before
we
get
to
the
OAuth
token
I'm
gonna
go
ahead
and
create
my
in
TM
a
package.json
file,
so
I'm
gonna
end
it
I'm
just
going
to
take
all
of
the
default
default
values
for
the
moment,
and
we
jump
back
to
the
project.
We've
got
our
package.
Json
comes
with
all
their
default
values,
which
include
the
package
name,
the
repository
that
it's
going
to
and
some
other
key
tags,
including
the
entry
point
yeah
too
bad.
That's
us!
B
B
So
certainly
we're
not
doing
the
flu
registry,
our
registry
is
it's
going
to
be
the
top-level
group
or
user
that
you're
publishing
to
so.
In
this
case,
the
group
is
chocolates,
and
so
with
give
up,
all
of
our
NPM
packages
have
scopes
names,
so
the
skill
carrier
is
going
to
be
Hogwarts,
and
that
means
that
our
name
value
is
also
going
to
have
to
be
updated
with
the
scope.
So
we're
gonna
have
the
Hogwarts
scope
as
well.
B
The
package
name
itself
can
be
anything
like,
so
maybe,
let's
just
rename
this
to
Jas
the
package
name,
just
to
show
that
to
be
whatever
you
want.
There's
some
rules
in
terms
of
what
you
can
and
can't
name
packages.
You
can't
have
additional
slashes
in
here,
so
they
have
additional
app
signs,
but
otherwise
the
actual
package
name
can
be
pretty
much
anything
all
right,
jump
back
over
to
our
NPM,
RC
and
I.
Think.
The
last
piece
of
the
puzzle
here
we
need
is
our
Olaf
token.
B
B
So
we've
got
our
app
top
GS.
We've
got
our
package
JSON
with
our
published
configuration,
which
shows
our
scoped
package
and
then
over
here.
Would
you
have
one
more
place
that
identifies
the
scope,
so
we
want
to
change
that
time
onwards.
Is
that
one
I
just
kept
going
through
and
making
sure
we
haven't
missed
any
pieces
here
and
we
should
be
able
to
start
publishing
this
package.
B
If
you
are
familiar
with
NPM,
you
don't
need
to
have
an
Emma,
cam
arson
fire.
You
can
set
your
own
cam
configuration
using
the
NPM
config
command
or
by
seven
years
global
NPM
RC
file
outside
project,
it's
all
personal
preference
or
whatever
your
situation
fits,
and
that
information
is
all
real
long
and
can,
let's
say,
burn
different
ways.
You
can
configure
that
alright,
so
I
think
that
all
that
we
have
all
this
here,
I'm
gonna
go
on
how
to
and
push
my
changes
once
more.
Now
that
we've
got
the
package.json
up.
B
For
sex
Lester
all
right,
so
the
last
piece
here
is:
we
should
be
able
to
go
ahead
and
just
say
and
p.m.
publish
without
any
additional
configuration
and
so
I'm
getting
an
unauthorized
air,
and
you
can
see
here
that
the
problem
is
it's
trying
to
hit,
get
live.com
instead
of
hitting
localhost
3001.
So
that
means
that
a
death,
some
sort
of
an
issue
you
either
in
my
entity
Marcy,
but
it's
most
likely
in
the
actual
published
on
fig.
You
can
see
here,
I
actually
forgot,
I
copied
pasted
this
over
I
forgot
to
change
this.
B
B
Alright,
so
let's
go
ahead
and
try
it
again.
Now
can
npm
publish
all
right
and
it
looks
like
it
worked.
Let's
go
back
to
our
project
over
here
and
on
the
sidebar
who
conceived
out
the
packages
tool.
They
put
them
in
packages
list,
and
here
we've
got
our
package.
No,
it's
just
us
installing
the
package
is
just
as
easy
as
long
as
you
have
access
to
this
registry.
B
B
Registry,
so
I've
got
my
localhost
3000
registry,
and
so
in
here
I
do
have
to
make
one
or
two
changes
and
when
I
reference
the
Hogwarts
registry-
and
then
that's
really
the
only
one
I'm
going
to
need
the
the
last
line
in
that
NP
MRC
is
referring
to
when
publishing
packages.
This
second
line
is
only
needed
if
you're
using
it
off
in
order
to
access
private
packages.
B
There
we
go
so
if
we
go
back
in
here,
we
can
see
that
we
can
have
the
node
modules
folder
and
here's
our
package
and
our
package
a
solid.
It's
added
it
to
our
dependencies
all
right
and
once
again
you
don't
need
to
use
being
getting
our
seed
file
to
configure
the
register
URL,
because
a
Bryan
equation
can
do
that
cool.
B
So
get
lab
allows
you
to
use
CI
in
order
to
automatically
generate
and
publish
my
packages,
so
so
get
logged
to
be
able
to
do
that.
We
use
a
get
lab,
see
idml
file
I'm,
going
to
use
a
template
that
we've
made
already,
which
won't
publishing
enough
for
everyone
to
use.
But
what
this
template
is
going
to
do
is,
since
we
have
an
order
on
PMRC
file
in
order
to
be
able
to
publish,
we
do
need
that
NPM
RC
file
we
get
let's
yeah.
B
So
the
first
step
is
we're
going
to
generate
that
I'm
km
RC
file
using
this
cook
here
and
then
this
should
look
very
familiar.
We're
going
to
just
again
publish
our
script
in
the
second
step
and
in
addition
to
that,
it's
going
to
automatically
bump
the
major
version
up,
and
so
this
is
all
very
configurable.
You
could
make
it
as
simple
or
as
complicated
as
you
want.
If
you
didn't
want
to
have
it
automatically
version
your
app
and
check
in
a
new
version
of
the
package.json.
B
B
Alright,
so
we
get
this
setup.
We've
got
a
few
things
that
we're
going
to
need
to
configure
in
our
project.
So
the
first
few
things
we're
going
to
need
to
do
is
set
a
few
variables,
and
so,
if
we
go
to
our
CI
settings,
we
can
set
the
variables
that
this
script
will
then
pick
up
and
replace.
So
since
we're
generating
this
NPM
RC
file,
we
still
need
that
aloft.
B
Okay
and
we
don't
want
that
to
be
checked
in
so
we're
going
to
generate
it
on
the
fly,
but
we're
going
to
use
these
type
of
variables
in
order
to
set
by
so
to
use
the
OAuth
token
key
here
and
put
it
in
our
office.
Okay,
and
in
addition
to
that,
because
this
specific
script
is
also
using
the
repository
and
and
adding
a
new
commit
we're
going
to
use
a
personal
access
token
from
get
lab
in
order
to
be
able
to
make
that
commit.
I've
already
generated
a
person
Alana
Texas
open.
B
You
can
do
that
in
your
user
settings
on
get
lab
and
so
I'm
just
gonna
copy
that
right
over
here,
actually
I'm
not
actually
bid
one.
So
I'll
go
ahead
and
create
one
there
back,
so
you're
good
just
go
over
to
our
settings
and
then
we
can
create
our
parts
so
again,
we'll
just
give
it
full
access
for
the
moment.
B
And
that
is
the
personal
access
to
pin,
so,
let's
get
those
say,
they'll
be
accessible.
One
other
thing
is
that
this
MK
Marcy
file
that
we
created
it
is
going
to
be
saved
as
an
artifact
I
think
it
lab.
So
any
of
our
builds
can
then
access
this
artifact
and
reuse
it
without
having
to
rebuild
it
every
time.
So
it's
unlikely
this
idea.
Marcy
thought
was
going
to
change
too.
In
this
example,
I've
got
the
file
expiring
in
one
week.
B
You
can
make
that
one
year
you
could
make
it
expire
instantly,
so
it
only
lasts
for
the
length
of
this
specific
build.
It's
totally
up
to
you,
but
with
that
artifact
being
available,
it
will
have
the
actual
raw
auth
token
in
it.
So,
since
this
is
a
public
project,
we
don't
want
the
general
public
getting
access
to
that
also
thing
I'm
going
to
go
ahead
and
turn
off
the
public
pipelines
option.
So
this
is
just
going
to
block
public
access
to
artifacts.
B
And
then
the
last
piece
here
just
to
save
some
time
since
I
am
going
to
be
using
the
master
branch
here,
the
master
branch
is
usually
a
little
bit
more
locked
out
so
I'm
going
to
loosen
up
permissions
on
the
master
branch
just
so
that
we
don't
want
any
problems
with
the
severity
trying
to
you
know
nice
big
push
to
it
unprotected
to
loosen
those
up.
This
is
something
that
you
probably
wouldn't
be
doing
on
your
production
projects.
B
B
B
And
if
I
reload,
this
page
see
that
got
uploaded
in
different
color
works
through
our
CI
pipelines,
there
we
go,
we've
got
one
working,
and
so
these
first
two
V's
were
the
other
DevOps.
That's
something
that
I've
automatically
enabled
to
I'm.
Acting
on.
You
can
throw
those
for
now,
since
I
did
have
a
CI
file.
Originally
it
was
going
to
do
automatically
so
CI
for
us.
But
now
let
me
have
the
CIA
file.
You
can
see
that
this
pipeline
has
passed
and
you
can
take
a
look
at
what
happened
in
this
pipeline.
B
B
So
if
we
go
back
to
our
package
list,
they
should
see
version
2.0
here
and
there
it
is,
and
in
addition
to
that,
I
added
the
in
that
script,
the
ability
for
it
to
automatically
add
and
commit
in
order
to
update
the
package.json
file
to
show
the
version
2.0
go
back
to
our
main
project
page
and
see
that
the
last
commit
was
updated.
I
missed
one
little
step
here
to
actually
update
what
you
version
to
show
which
outdated
version
it
was
updated
to.