Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript support, bug fixes, new documentation #25

Merged
merged 20 commits into from
Mar 29, 2023
Merged

TypeScript support, bug fixes, new documentation #25

merged 20 commits into from
Mar 29, 2023

Conversation

KillerJulian
Copy link
Collaborator

Hey👋,
this library is a bit outdated. Time for an update.

Improvements:

  • TypeScript support
  • Bug fixes
  • New documentation
  • Improves the code clarity
  • Updated test script
  • Automation of the repository

The rewrite took some time, so I would be happy about a small mention. Let me know if you disagree with my work.

With kind regards - Julian 🇩🇪

@KillerJulian
Copy link
Collaborator Author

KillerJulian commented Aug 10, 2022

Handling the new code

Editor 🖋️

  1. I recommend the editor Visual Studio Code
  2. I recommend to install the following addons:

Yarn 🛠️

I recommend using yarn as a package manager for a faster and cleaner working process.
Quick and easy installation.

Building the documentaion 📚

Use now yarn or alternatively npm.

  1. Install the latest packages
yarn
  1. Use the following command to generate the documentation
yarn build:docs

Later, Github will host the docs. But for the local view we need to install a small tool

yarn global add http-server
  1. Last step, before you can view your work. Start the HTTP server
http-server docs

Automation of the repository ⚙️

Automation will make it faster and easier for your to work with the project. It also represents a change in your workflow. Decide for yourself whether you want to take this step.

Following will change it:

  • When pushed to the master branch
    • The new documentation will be published on github.io
  • When a pull request is opened or has been synchronized
    • The code will be linted
  • When pushing to a branch
    • The code will be linted
  • When a commit has been tagged with v*
    • A new release will be created
    • The new version is published on NPM

You always have the choice to customise the workflow to your needs.

Setup 🛠️

  1. Set NPM token
    The token is needed to publish your package automatically

    1. Generate new token (Go to the npm website -> click on your profile picture -> Access Tokens -> Generate New Token)

      Name: node-pdu
      Type: Automation

      Copy your token.

    2. Set token at repository (Repository settings -> Secrets -> Action secrets -> New repository secret)

      Name: NPM_TOKEN
      Value: your token

  2. Merge this pull request (read far below)

  3. Github Pages
    After the first commit to master (also when you merge this pull request), the docs should be built. After that you can set the Github page.

    1. Go to the Pages setting in the repository (Repository settings -> Pages)

    2. Set up as follows:

      Source: Deploy from a branch
      Branch: gh-pages / (root)

  4. Be happy when everything has worked

Merging this pull request 🔀

⚠️ Before merging these pull request, you should be aware of the changes. Please also read this comment thoroughly.

  1. Setup the NPM-token
  2. Merge via “Squash and merge”
  3. Tag the merge commit with v2.0.0
  4. Push the tag
  5. Continue with the automation

For questions and suggestions I am at your disposal.
Thank you for your cooperation 🤝

BREACKING!

style(test.js): Format

test: Adapt to the TypeScript version

test: Migrate to TypeScript and improve

- Improving the clarity of the code
- Embellish the console output

impl: Update Code of Conduct

docs(Readme): Beautify and adapt to the new code of the Readme.md

style: Clean up the package.json

docs(testscript): Add the docs for the TestScript

refactor: Rewrite classes to ES2016 and use Typescript

style: Format

chore(deps): Bump dependencies

refactor: Rename Type to PDUType

refactor: Rename SCA/Type to SCAType

style(Helper): Format

style(Header): Format

impl(workflows): Add github workflow

fix(workflows): Bump node version

impl: Adjust .gitignore & .npmignore

feat: Add getter for some classes

docs: Add a note (Project is looking for maintainer)

style(test.js): Format

test: Adapt to the TypeScript version

test: Migrate to TypeScript and improve

- Improving the clarity of the code
- Embellish the console output

impl: Update Code of Conduct

docs(Readme): Beautify and adapt to the new code of the Readme.md

style: Clean up the package.json

docs(testscript): Add the docs for the TestScript

refactor: Rewrite classes to ES2016 and use Typescript

style: Format

chore(deps): Bump dependencies

refactor: Rename Type to PDUType

refactor: Rename SCA/Type to SCAType

style(Helper): Format

style(Header): Format

impl(workflows): Add github workflow

fix(workflows): Bump node version

impl: Adjust .gitignore & .npmignore

feat: Add getter for some classes

docs: Add a note (Project is looking for maintainer)
KillerJulian added a commit to KillerJulian/serialport-gsm-typescript that referenced this pull request Jan 7, 2023
The folder content will be replaced by the original source as soon as the errors in the original source have been fixed.
Source: jackkum/node-pdu#25
@jackkum jackkum merged commit f12664f into jackkum:master Mar 29, 2023
This was referenced Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants