condaでjupyterlab 0.31.xをbuildする

jupyterlabは0.30.xからjlpmが導入されbuildが簡単になった。0.29.xは結構複雑だったけどね。
今回の環境はubuntuだが、windows環境でもできる。

# conda 環境を作る

conda 環境を作る。
`conda create -n jupyterlab python=3 jupyterlab nodejs`
環境の名前はjupyterlab、そしてjlpmを利用しにはjupyterlabをインストールする必要がある。

![image.png](https://qiita-image-store.s3.amazonaws.com/0/12587/4642d938-3c82-cd11-3633-ebbea472ccb7.png)

proceedはｙ

![image.png](https://qiita-image-store.s3.amazonaws.com/0/12587/82194415-1422-f319-7abd-fd4cc4d05e2d.png)

jlpmは”jupyterlab package manager”だ。0.30.xから npm代わりに使う。
juputerlab環境に変更。インストールしたpackageを確認する。
`conda activate juputerlab`

![image.png](https://qiita-image-store.s3.amazonaws.com/0/12587/5828708a-de7e-13d2-9dbd-8ce5295b211d.png)

# git clone jupyterlab

`git clone https://github.com/jupyterlab/jupyterlab -b 0.31.x`
`cd jupyterlab`

![image.png](https://qiita-image-store.s3.amazonaws.com/0/12587/1d80feb2-ac19-57ac-55ac-cb5eee424acf.png)

# jlpm install

`jlpm install`

![image.png](https://qiita-image-store.s3.amazonaws.com/0/12587/5317056c-dd4e-efa5-87da-d9dde16aac62.png)

![image.png](https://qiita-image-store.s3.amazonaws.com/0/12587/9886539c-cba0-219f-bd81-a5c4c58c699b.png)

# jlpm run build

`jlpm run build`

![image.png](https://qiita-image-store.s3.amazonaws.com/0/12587/bcbe6c7e-9c1d-9755-0b94-f8df46950f06.png)

![image.png](https://qiita-image-store.s3.amazonaws.com/0/12587/509eee56-6ba1-a8d8-4efa-ff876cac4802.png)

# jlpm run

npmと同じく`jlpm run`で使えるコマンドが現る。

```
(jupyterlab) tkim@ubuntu:~/jupyterlab⟫ jlpm run
yarn run v1.3.2
error No command specified.
info Commands available from binary scripts: JSONStream, _mocha, acorn, atob, babylon, brfs, browserslist, conventional-changelog, conventional-changelog-writer, conventional-commits-parser, conventional-recommended-bump, cssesc, csso, csv2json, csv2tsv, dateformat, dbfcat, dsv2dsv, dsv2json, errno, escodegen, esgenerate, eslint, esparse, esvalidate, get-pkg-repo, git-raw-commits, git-semver-tags, handlebars, he, html-minifier, istanbul, js-yaml, jsesc, json2csv, json2dsv, json2tsv, json5, karma, lerna, loose-envify, marked, miller-rabin, mime, mkdirp, mocha, nopt, npm-run-all, quote-stream, rc, regjsparser, rimraf, run-p, run-s, semver, sha.js, shjs, shp2json, shpcat, sl-log-transformer, sort-package-json, sshpk-conv, sshpk-sign, sshpk-verify, strip-indent, svgo, topojson, topojson-geojson, topojson-group, topojson-merge, topojson-svg, tsc, tslint, tsserver, tsv2csv, tsv2json, typedoc, uglifyjs, vg2png, vg2svg, vl2png, vl2svg, vl2vg, watch, webpack, which, window-size
info Project commands
   - add:sibling
      node buildutils/lib/add-sibling.js
   - build
      jlpm run build:dev
   - build:core
      cd jupyterlab/staging && jlpm && jlpm run build
   - build:dev
      jlpm run integrity && jlpm run build:packages && cd dev_mode && jlpm run build
   - build:dev:prod
      jlpm run integrity && jlpm run build:packages && cd dev_mode && jlpm run build:prod
   - build:examples
      lerna run build --scope "@jupyterlab/example-*"
   - build:packages
      cd packages/metapackage && jlpm run build
   - build:src
      lerna run build --scope "@jupyterlab/!(test-|example-)*"
   - build:test
      lerna run build:test
   - build:update
      node buildutils/lib/update-core-mode.js
   - build:utils
      cd buildutils && jlpm run build
   - clean
      jlpm run clean:dev
   - clean:core
      cd jupyterlab/staging && jlpm run clean
   - clean:dev
      cd dev_mode && jlpm run clean
   - clean:examples
      node buildutils/lib/clean-packages.js examples
   - clean:packages
      node buildutils/lib/clean-packages.js packages
   - clean:slate
      python clean.py && pip install -v -e .
   - clean:src
      jlpm run clean
   - clean:test
      lerna run clean --scope "@jupyterlab/test-*"
   - clean:utils
      cd buildutils && jlpm run clean
   - coverage
      lerna run coverage --scope "@jupyterlab/test-*" --stream --concurrency 1
   - create:package
      node buildutils/lib/create-package.js
   - create:test
      node buildutils/lib/create-test-package.js
   - create:theme
      node buildutils/lib/create-theme.js
   - docs
      lerna run docs
   - get:dependency
      node buildutils/lib/get-dependency.js
      node buildutils/lib/ensure-repo.js
   - patch:release
      node buildutils/lib/patch-release.js
   - postinstall
      node scripts/ensure-buildutils.js
   - publish
      jlpm run clean:slate && jlpm run build:packages && jlpm integrity && lerna publish --force-publish=* -m "Publish"
   - remove:dependency
      node buildutils/lib/remove-dependency.js
   - remove:package
      node buildutils/lib/remove-package.js
   - remove:sibling
      node buildutils/lib/remove-package.js
   - test
      lerna run test:firefox --scope "@jupyterlab/test-*" --concurrency 1 --stream
   - test:chrome
      lerna run test:chrome --scope "@jupyterlab/test-*" --concurrency 1 --stream
   - test:firefox
      lerna run test:firefox --scope "@jupyterlab/test-*" --concurrency 1 --stream
   - test:ie
      lerna run test:ie --scope "@jupyterlab/test-*" --concurrency 1 --stream
   - test:services
      cd packages/services && jlpm test && cd examples/node && python main.py
   - update:dependency
      node buildutils/lib/update-dependency.js
   - watch
      python scripts/watch_dev.py
   - watch:main
      jlpm run watch
   - watch:packages
      python scripts/watch_packages.py
question Which command would you like to run?:
```