Skip to content

A monorepo of useful tools for committee to help with common tasks & make our lives a bit easier

Notifications You must be signed in to change notification settings

icdocsoc/docsoc-tools

Repository files navigation

DocsocTools

This Nx-based monorepo contains a series of tools made by Kishan Sambhi (kss22) for DoCSoc at Imperial College London for the committee of academic year 2024-2025. They are designed to help the committee manage their responsibilities and make their lives easier, by providing tools to automate and simplify common tasks.

Strcuture of the repo

The repo is structured as an Nx monorepo (I recommend you look at the Nx documentation for more information on how to use it). You can also have a look at the Nx readme at the bottom of this document.

Tools

  • packages/docsoc_clickup_calendar_sync: A rust tool that syncs the DoCSoc ClickUp calendar with the DoCSoc Google Calendar. It is designed to be run as a cron job on a server.

Each tool's directory has a README with more information on how to use it.

Nx Mono repo info

The plugin @monodon/rust has been added to Nx to allow for Rust projects to be built and run in the monorepo. This is used by the docsoc_clickup_calendar_sync tool. The plugin has create a Cargo workspace in the root of the monorepo as such, and all builds for all packages are done in the root of the monorepo and sent to dist in the repo root.

Original Nx README

This workspace has been generated by Nx, Smart Monorepos · Fast CI.

Integrate with editors

Enhance your Nx experience by installing Nx Console for your favorite editor. Nx Console provides an interactive UI to view your projects, run tasks, generate code, and more! Available for VSCode, IntelliJ and comes with a LSP for Vim users.

Nx plugins and code generators

Add Nx plugins to leverage their code generators and automated, inferred tasks.

# Add plugin
npx nx add @nx/react

# Use code generator
npx nx generate @nx/react:app demo

# Run development server
npx nx serve demo

# View project details
npx nx show project demo --web

Run npx nx list to get a list of available plugins and whether they have generators. Then run npx nx list <plugin-name> to see what generators are available.

Learn more about code generators and inferred tasks in the docs.

Running tasks

To execute tasks with Nx use the following syntax:

npx nx <target> <project> <...options>

You can also run multiple targets:

npx nx run-many -t <target1> <target2>

..or add -p to filter specific projects

npx nx run-many -t <target1> <target2> -p <proj1> <proj2>

Targets can be defined in the package.json or projects.json. Learn more in the docs.

Set up CI!

Nx comes with local caching already built-in (check your nx.json). On CI you might want to go a step further.

Explore the project graph

Run npx nx graph to show the graph of the workspace. It will show tasks that you can run with Nx.

Connect with us!