ZackDeRose/nx-make

โ˜… 0Forks 0ShellGitHub โ†—Compare

README

nx-make

An Nx plugin to integrate Make/Makefile tasks into the Nx dependency graph.

Overview

This repository contains the source code for the nx-make plugin, which enables seamless integration of Make-based build systems with Nx workspaces.

Features

  • ๐Ÿ” Automatically detects Makefiles in your workspace
  • ๐Ÿ“Š Integrates Make targets into the Nx project graph
  • โšก Run Make targets using Nx executors
  • ๐Ÿ”— Leverage Nx caching and dependency management with your Make tasks
  • ๐ŸŽฏ Simple configuration and setup

Installation

Quick Install (Recommended)

For existing C/Make projects, use the installation script:

curl -fsSL https://raw.githubusercontent.com/ZackDeRose/nx-make/main/install.sh | bash

This will:

  • Check for Node.js and offer to install it
  • Add Nx to your project
  • Install @zackderose/nx-make
  • Configure nx.json
  • Verify gcc/clang availability

Manual Installation

npm install -D @zackderose/nx-make
pnpm add -D @zackderose/nx-make
yarn add -D @zackderose/nx-make

Quick Start

  1. Add the plugin to your nx.json:
{
  "plugins": [
    {
      "plugin": "nx-make"
    }
  ]
}
  1. Create a Makefile in any project directory

  2. Run nx show project <your-project> to see discovered Make targets

For complete documentation, see the plugin README.

Repository Structure

nx-make/
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ nx-make/           # The nx-make plugin source code
โ”‚   โ””โ”€โ”€ example-project/   # Example project demonstrating the plugin
โ”œโ”€โ”€ nx.json                # Nx workspace configuration
โ””โ”€โ”€ README.md             # This file

Development

Building the Plugin

nx build nx-make

Testing the Plugin

The example-project demonstrates the plugin in action:

nx build example-project
nx test example-project

Publishing

The plugin is configured for publishing to npm:

nx release

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

MIT

Author

Zack DeRose [email protected]

Links

Contributors

ZackDeRose

Issues