GithubHelp home page GithubHelp logo

lekhanhtoan37 / gazelle-nestjs Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 237 KB

Plugin for gazelle to automatically generate BUILD file for nestjs project

License: Apache License 2.0

Starlark 12.16% Go 87.84%
bazel build-tool gazelle monorepo nestjs code-generation generator

gazelle-nestjs's Introduction

Design of Gazelle

https://github.com/bazelbuild/bazel-gazelle/blob/master/Design.rst

See ./examples for nestjs monorepo

To using plugin gazelle-nestjs for generating BUILD file. Make sure to load rules_go, bazel_gazelle, gazelle_nestjs

http_archive(
    name = "io_bazel_rules_go",
    integrity = "sha256-fHbWI2so/2laoozzX5XeMXqUcv0fsUrHl8m/aE8Js3w=",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.44.2/rules_go-v0.44.2.zip",
        "https://github.com/bazelbuild/rules_go/releases/download/v0.44.2/rules_go-v0.44.2.zip",
    ],
)

http_archive(
    name = "bazel_gazelle",
    integrity = "sha256-MpOL2hbmcABjA1R5Bj2dJMYO2o15/Uc5Vj9Q0zHLMgk=",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz",
        "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz",
    ],
)

http_archive(
  name = "com_github_lekhanhtoan37_gazelle_nestjs",
  sha256 = "7eef232ea8845e2a92d2bc534dae46a304a51deff07f770645b4871de95ae052",
  strip_prefix = "gazelle-nestjs-0.0.1",
  urls = [
    "https://github.com/lekhanhtoan37/gazelle-nestjs/archive/refs/tags/v0.0.1.tar.gz",
  ],
)

load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

############################################################
# Define your own dependencies here using go_repository.
# Else, dependencies declared by rules_go/gazelle will be used.
# The first declaration of an external repository "wins".
############################################################


go_rules_dependencies()

go_register_toolchains(version = "1.19")

gazelle_dependencies(go_repository_default_config = "@//:WORKSPACE.bazel")

Add directive in root BUILD file

load("@bazel_gazelle//:def.bzl", "DEFAULT_LANGUAGES", "gazelle", "gazelle_binary")
load("@npm//:defs.bzl", "npm_link_all_packages")

npm_link_all_packages(name = "node_modules")

gazelle(
    name = "gazelle",
    args = ["-build_file_name=BUILD.bazel"],
    gazelle = ":gazelle_nestjs",
    visibility = ["//visibility:public"],
)

gazelle_binary(
    name = "gazelle_nestjs",
    languages = DEFAULT_LANGUAGES + [
        "@com_github_lekhanhtoan37_gazelle_nestjs//gazelle",
    ],
    visibility = ["//visibility:public"],
)

# gazelle:js_package_file package.json :node_modules
# gazelle:js_root

Author

lekhanhtoan37

gazelle-nestjs's People

Contributors

deepsource-io[bot] avatar lekhanhtoan37 avatar toanlk1appota avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.