From f405b1cc58b773c13f25dbfda5bb1b1f09a15f86 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Fri, 15 May 2020 22:51:31 +0200 Subject: [PATCH] update --- .github/workflows/publish.yaml | 2 +- .../workflows/template_initialization.yaml | 1 + README.md | 142 +++++++++++++++--- README.template.md | 41 +++++ TEMPLATE_README.md | 52 ------- package.json | 21 ++- src/test/getProjectRoot.ts | 5 + src/test/index.ts | 3 +- src/tools/getProjectRoot.ts | 1 + tsconfig.esm.json | 8 + tsconfig.json | 4 +- 11 files changed, 195 insertions(+), 85 deletions(-) create mode 100644 README.template.md delete mode 100644 TEMPLATE_README.md create mode 100644 src/test/getProjectRoot.ts create mode 100644 tsconfig.esm.json diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index c8697c0..3745266 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -68,7 +68,7 @@ jobs: git config --local user.email "ts_ci@github.com" git config --local user.name "ts_ci" git add -A - git commit -am "Automatic structural changes" + git commit -am "Moving dist files to root for shorter import statements." - name: Push changes uses: ad-m/github-push-action@v0.5.0 with: diff --git a/.github/workflows/template_initialization.yaml b/.github/workflows/template_initialization.yaml index cfdb4aa..8297e40 100644 --- a/.github/workflows/template_initialization.yaml +++ b/.github/workflows/template_initialization.yaml @@ -28,6 +28,7 @@ jobs: IS_AVAILABLE_ON_NPM: ${{steps.id1.outputs.is_available_on_npm}} - uses: actions/checkout@v2 + - run: mv README.template.md README.md - name: Replace tokens in README.MD and package.json uses: cschleiden/replace-tokens@v1 with: diff --git a/README.md b/README.md index d3574db..d0420fd 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,135 @@ -

- +

- #{DESC}# + A template to assist you in creating and publishing TypeScript modules.

- - - -

-

- Home - - - Documentation - - - Chat

--- -# Install / Import +# Presentation -```bash -> npm install --save #{REPO_NAME}# -``` +This template automate the boring and tedious tasks of: +- Filling up the ``package.json`` +- Setting up Typescript. +- Writing a [README.md](https://github.com/garronej/denoify_ci/blob/dev/README.template.md) with decent presentation and instructions on how to install/import your module. +- Testing on multiples ``Node`` version before publishing. +- Maintaining a CHANGELOG. +- Publishing on NPM. + +Good stuffs that come with using this template: +- No source file are tracked on the default branch . +- Shorter specific file import path. + ``import {...} from "my_module/theFile"`` instead of the usual + ``import {...} from "my_module/dist/theFile"`` +- CDN distribution for importing from an ``.html`` file with a ``