From b5aa73a3a53859899538111861e33d1fb2458422 Mon Sep 17 00:00:00 2001 From: Giovanni Condello Date: Wed, 7 Jun 2023 22:28:07 +0200 Subject: Add typescript support (#219) * Add typescript support * Make jekyll work on docker-compose on windows --- .github/workflows/pages.yml | 8 + .gitignore | 4 +- README.md | 12 +- _config.docker.yml | 1 + _ont_xgs/ont-hisense-ltf7267-bha+.md | 2 +- assets/js/LTF7267-BHA-ploam.js | 28 - assets/ts/LTF7267-BHA-ploam.ts | 29 + docker-compose.yml | 19 +- package-lock.json | 1887 ++++++++++++++++++++++++++++++++++ package.json | 11 + tsup.config.ts | 9 + 11 files changed, 1977 insertions(+), 33 deletions(-) create mode 100644 _config.docker.yml delete mode 100644 assets/js/LTF7267-BHA-ploam.js create mode 100644 assets/ts/LTF7267-BHA-ploam.ts create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 tsup.config.ts diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 5401b7f..475999b 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -30,6 +30,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 20 + - name: Install Node deps + run: npm ci + - name: Compile typescript + run: npm run build - name: Setup Ruby uses: ruby/setup-ruby@v1 with: diff --git a/.gitignore b/.gitignore index 7c68ae8..02a683b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ _site/ .jekyll-cache/ .jekyll-metadata Gemfile.lock -assets/js/zzzz-search-data.json \ No newline at end of file +assets/js/zzzz-search-data.json +node_modules/ +assets/js/generated diff --git a/README.md b/README.md index 76902bc..b660d5d 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,14 @@ if you want to contribute there is something to be done: - theoretical information on GPON - absent stick information - quick start -- absent and new ont \ No newline at end of file +- absent and new ont + +## How to build +This website uses typescript, so remember to: + +- Install node (20) +- Run npm ci to install all relevant typescript packages +- Run npm run build to transpile ts to js + +Alternatively, you can just run: +`docker-compose up -d typescript` which will build all the required typescript files for you \ No newline at end of file diff --git a/_config.docker.yml b/_config.docker.yml new file mode 100644 index 0000000..8822b61 --- /dev/null +++ b/_config.docker.yml @@ -0,0 +1 @@ +url: "http://localhost:4000" diff --git a/_ont_xgs/ont-hisense-ltf7267-bha+.md b/_ont_xgs/ont-hisense-ltf7267-bha+.md index 7ac0311..c36ffb3 100644 --- a/_ont_xgs/ont-hisense-ltf7267-bha+.md +++ b/_ont_xgs/ont-hisense-ltf7267-bha+.md @@ -330,7 +330,7 @@ Reboot ONT to apply the change - +