diff --git a/.github/workflows/template_initialization.yaml b/.github/workflows/template_initialization.yaml deleted file mode 100644 index 5261ee62..00000000 --- a/.github/workflows/template_initialization.yaml +++ /dev/null @@ -1,65 +0,0 @@ -name: template_initialization -on: - push: - branches: - - develop - -jobs: - template_initialization: - runs-on: ubuntu-latest - steps: - - - name: Checking availability for module name ${{github.event.repository.name}} on NPM. - id: id1 - uses: garronej/github_actions_toolkit@v1.9 - with: - action_name: is_well_formed_and_available_module_name - module_name: ${{github.event.repository.name}} - - - name: Checks results - run: | - if [ "$IS_VALID_NODE_MODULE_NAME" = "false" ]; then - echo $MODULE_NAME" is not a valid node module name" - false - fi - if [ "$IS_AVAILABLE_ON_NPM" = "false" ]; then - echo "WARNING: There is already a NPM module named "$MODULE_NAME", if you are not the owner consider picking another name" - fi - true - env: - MODULE_NAME: ${{github.event.repository.name}} - IS_VALID_NODE_MODULE_NAME: ${{steps.id1.outputs.is_valid_node_module_name}} - IS_AVAILABLE_ON_NPM: ${{steps.id1.outputs.is_available_on_npm}} - - - uses: actions/checkout@v2 - - run: mv README.template.md README.md - - run: mv LICENSE.template LICENSE - - name : String replace - id: id2 - uses: garronej/github_actions_toolkit@v1.9 - with: - action_name: string_replace - input_string: ${{github.event.repository.name}} - search_value: '-' - replace_value: '_' - - name: Replace tokens in README.MD and package.json - uses: cschleiden/replace-tokens@v1 - with: - files: '["README.md","package.json","LICENSE","package-lock.json"]' - env: - REPO_NAME: ${{ github.event.repository.name }} - USER_OR_ORG: ${{ github.repository_owner }} - DESC: ${{ github.event.repository.description }} - REPO_NAME_NO_DASHES: ${{ steps.id2.outputs.replace_result }} - - name: Remove this workflow, it only needs to be run once. - run: rm .github/workflows/template_initialization.yaml - - name: Commit files - run: | - git config --local user.email "ts_ci@github.com" - git config --local user.name "ts_ci" - git commit -am "Replacing the template's placeholders" - - name: Push changes - uses: ad-m/github-push-action@v0.5.0 - with: - github_token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} - branch: develop diff --git a/LICENSE b/LICENSE index 3f701dfd..61f220f7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Joseph Garrone +Copyright (c) 2020 GitHub user u/garronej Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/LICENSE.template b/LICENSE.template deleted file mode 100644 index e007cf16..00000000 --- a/LICENSE.template +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 GitHub user u/#{USER_OR_ORG}# - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index 46c636dd..25975fe6 100644 --- a/README.md +++ b/README.md @@ -1,406 +1,66 @@
-
+
- A template to assist you in creating and publishing TypeScript modules on NPM
+ Provides a way to customise Keycloak login and register pages with React
+
+
+
+
+
+ Home + - + Documentation
---- +# Install / Import -# Presentation - -This template automates the boring and tedious tasks of: -- Filling up the ``package.json`` -- Setting up Typescript. -- Writing a [README.md](https://github.com/garronej/ts_ci/blob/master/README.template.md) with decent presentation and instructions on how to install/import your module. -- Testing on multiple Node version running on Ubuntu and Windows before publishing. -- Maintaining a CHANGELOG. -- Publishing on NPM and creating corresponding GitHub releases. - -Besides, good stuff that comes with using this template: -- No dist files are tracked on the ``master`` 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 `` + +``` -*Example:* - +Or import it as an ES module: -The ``CHANGELOG.md`` is built from the commits messages since last release. +```html + +``` -Are NOT included in the ``CHANGELOG.md``: -- The commit messages that includes the word "changelog" ( non-case sensitive ). -- The commit messages that start with "Merge branch ". -- The commit messages that with "GitBook: " +_You can specify the version you wish to import:_ [unpkg.com](https://unpkg.com) -*The GitHub release will point to a freezed version of the ``CHANGELOG.md``*: - +## Contribute -# Video demo - -[](https://youtu.be/Q5t-yP2PvPA) - -# Examples of auto-generated readme - - - -# Creating a documentation website for your project - -I recommend [GitBook](https://www.gitbook.com), It enables you to write your documentation in markdown from their -website and get the markdown files synchronized with your repo. -They will provide you with a nice website for which you can customize the domain name. -All this is covered by their free tier. - -Example: -- [repo](https://github.com/garronej/evt) -- [GitBook documentation website](https://docs.evt.land) - -I advise you to have a special directory at the root of your project where the markdown documentation files -are stored. It is configured by placing a ``.gitbook.yaml`` file at the root of the repo containing, for example: -``root: ./docs/`` - -Do not hesitate to request free access to premium features. Open source projects are eligible! - -PS: I am not affiliated with GitBook in any way. - -# Creating a landing page for your project - -Beside the documentation website, you might want to have a catchy landing page to share on social networks. -You can use [GitHub pages](https://pages.github.com) to host it. - -If you like the landing page of EVT, [evt.land](http://evt.land), you can fork the [repo](https://github.com/garronej/evt.land) and adapt it for your module. - -To produce high quality GIF from screen recording that remain relatively small checkout the wonderful [Gifski](https://gif.ski) from [Sindre Sorhus](https://github.com/sindresorhus). - -Once your page is ready you'll just have to go to settings and enable Pages yo put it online. - - - -And update your DNS: - - - -I personally use [Hurricane Electric](https://dns.he.net) free DNS servers because they support a lot of record types. -However, if your DNS provider does not support ``ALIAS``, you can use ``A`` records and manually enter the IP of GitHub servers. -I let you consult the [GitHub Pages Documentation](https://help.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site#configuring-an-apex-domain). +```bash +npm install +npm run build +npm test +``` diff --git a/README.template.md b/README.template.md deleted file mode 100644 index a64d4ceb..00000000 --- a/README.template.md +++ /dev/null @@ -1,66 +0,0 @@ -
-
-
- #{DESC}#
-
-
-
-
-
-
-
- Home - - - Documentation -
- -# Install / Import - -```bash -$ npm install --save #{REPO_NAME}# -``` - -```typescript -import { myFunction, myObject } from "#{REPO_NAME}#"; -``` - -Specific imports: - -```typescript -import { myFunction } from "#{REPO_NAME}#/myFunction"; -import { myObject } from "#{REPO_NAME}#/myObject"; -``` - -## Import from HTML, with CDN - -Import it via a bundle that creates a global ( wider browser support ): - -```html - - -``` - -Or import it as an ES module: - -```html - -``` - -_You can specify the version you wish to import:_ [unpkg.com](https://unpkg.com) - -## Contribute - -```bash -npm install -npm run build -npm test -``` diff --git a/package-lock.json b/package-lock.json index 72571706..e7871d0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "#{REPO_NAME}#", + "name": "keycloak-react-theming", "version": "0.0.0", "lockfileVersion": 2, "requires": true, diff --git a/package.json b/package.json index ddbf552b..51d37453 100755 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "name": "#{REPO_NAME}#", + "name": "keycloak-react-theming", "version": "0.0.0", - "description": "#{DESC}#", + "description": "Provides a way to customise Keycloak login and register pages with React", "repository": { "type": "git", - "url": "git://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#.git" + "url": "git://github.com/garronej/keycloak-react-theming.git" }, "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { "test": "node dist/test/", - "cdn:bundle:.js": "simplifyify dist/index.js -s #{REPO_NAME_NO_DASHES}# -o dist/bundle.js --debug --bundle", + "cdn:bundle:.js": "simplifyify dist/index.js -s keycloak_react_theming -o dist/bundle.js --debug --bundle", "cdn:bundle:.min.js": "terser dist/bundle.js -cmo dist/bundle.min.js", "cdn:bundle": "npm run cdn:bundle:.js && npm run cdn:bundle:.min.js", "cdn:esm": "tsc -p tsconfig.esm.json", @@ -36,7 +36,7 @@ "pre-commit": "lint-staged -v" } }, - "author": "u/#{USER_OR_ORG}#", + "author": "u/garronej", "license": "MIT", "files": [ "src/", @@ -46,7 +46,7 @@ "!dist/tsconfig.tsbuildinfo" ], "keywords": [], - "homepage": "https://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#", + "homepage": "https://github.com/garronej/keycloak-react-theming", "devDependencies": { "typescript": "^4.1.5", "@types/node": "^10.0.0",