Skip to content

wmfs/tymly

Repository files navigation

Tymly Logo

Tymly Package Commitizen friendly JavaScript Style Guide license FOSSA Status

Introduction

Tymly is the product of many inter-related Node.js packages. The source code for all these packages is maintained in separate GitHub repositories in the WMFS organization.

However, for those wanting to develop the Tymly framework itself, it can be tricky to keep-track as new Tymly repos are added and existing Tymly repos evolve. It's also important to ensure all these repos are linked together locally for the best possible developer experience.

And that's what this repo can help with!

Here we have an empty Lerna-powered monorepo. By following the instructions below, it's possible to automatically fill the empty /blueprints, /packages and /plugins directories with the freshest Tymly code from https://github.com/wmfs.

  • Subsequent synchronization attempts will update local repos as necessary, and clone anything new that's become available.

Environment

There are a couple of things you'll need installed for all this to work...

Git

Git is a version-control system for tracking changes in computer files and coordinating work on those files among multiple people.

Node.js

Node.js is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code outside of a browser.

Lerna

We use the Lerna tool tool to link together all the various Tymly packages, and also "hoist" shared dependencies to help reduce space/memory overheads.

With Node installed, install Lerna globally via this command:

npm install lerna -g

GitHub Access Token

Instead of using your GitHub password, we use a Personal Github Access Token. This approach provides a few advantages - in particular finer access control and more specific monitoring. Be sure to keep the value of your Access Token value secret!

Assuming you've already signed-up with GitHub, you'll need to create a new Access Token for all your Tymly-related interactions.

  • Generating a new token value is easy enough, first go here:
  • Then click the "Generate new token" button.
  • Feel free to give your new token any name you like, but something like "Tymly Monorepo" will be fine.
  • As for those Scopes, click this one:
    • repo (Full control of private repositories)
  • Then hit "Generate token".
  • Copy the token value: we'll be setting an environment variable to it later.

Cloning

Next you'll need to clone this repo. From the Git shell:

git clone https://github.com/wmfs/tymly.git

Then, from the command prompt, install all the Node.js packages required to make this repo work:

cd tymly
npm install

Environment Variables

To integrate this repo with your GitHub account, two environment variables will need defining...

Environment Variable Notes
TYMLY_GITHUB_USER The value of this environment variable should be set to the username that you use to log into GitHub with (and the account you generated that access token with earlier).
TYMLY_GITHUB_TOKEN And the value of this environment variable should be set to the personal Access Token you previously generated.

Synchronizing

Nearly there! 😃

To synchronize your empty Tymly monorepo, run this from within the /tymly directory:

npm run sync

Which will:

  • Connect to GitHub (using the username/token values defined in the environment variables)
  • Clone or pull Tymly repos into the /blueprints, /packages and /plugins directories.

...which should lead to output looking similar to:

Just npm run sync anytime you want to ensure your local Tymly repos reflect those on GitHub.

You can also run npm run sync public-only to only pull in public packages only.

Bootstrapping

After synchronizing, a red message may appear:

Oh no! You need to 'lerna bootstrap'

On these (hopefully quite rare) occasions, from within the /tymly directory, you'll need to:

npm run bootstrap

And after a while, you're good to go! 😅

Next steps

With your Tymly repos cloned and packages installed, what next?

  1. Check out our Tymly docs site.
  2. Have a read of our contributor Code of Conduct.
  3. Also, please read our notes about contributing.

License

MIT