Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 20 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,25 @@ nix:
stage: build
script:
- >
nix-build ./release.nix
--attr application
--attr docker
nix-build ./release.nix
--attr application
--attr docker
only:
- master

docs:
stage: build
script:

- nix-shell --packages nodejs --run "npm install"
- nix-shell --packages nodejs --run "$(npm bin)/typedoc --out /tmp/docs src"
- >
nix-shell -I nixpkgs=./pkgs.nix --packages findutils coreutils git gitAndTools.gh --run '
git checkout gh-pages;
find . -mindepth 1 -maxdepth 1 ! -name ".git" -exec rm -r "{}" \;;
mv /tmp/docs/* .;
git commit -am "Updated Docs";
gh pr create --base "gh-pages" --fill;
'
only:
- master
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TypeScript-Demo-LIb
# TypeScript-Demo-Lib

[![pipeline status](https://gitlab.com/MatrixAI/open-source/TypeScript-Demo-Lib/badges/master/pipeline.svg)](https://gitlab.com/MatrixAI/open-source/TypeScript-Demo-Lib/commits/master)

Expand Down Expand Up @@ -31,7 +31,26 @@ Install into Docker:
docker load --input "$(nix-build ./release.nix --attr docker)"
```

## Path Aliases
## Development

Run `nix-shell`, and once you're inside, you can use:

```sh
# install (or reinstall packages from package.json)
npm install
# build the dist
npm run build
# run the repl (this allows you to import from ./src)
npm run ts-node
# run the tests
npm run test
# lint the source code
npm run lint
# automatically fix the source
npm run lintfix
```

### Path Aliases

Due to https://github.com/microsoft/TypeScript/issues/10866, you cannot use path aliases without a bundler like Webpack to further transform the generated JavaScript code in order to resolve the path aliases. Because this is a simple library demonstrate, there's no need to use a bundler. In fact, for such libraries, it is far more efficient to not bundle the code.

Expand Down
Loading