npm-bazel | Bazel build rules and workspace generators | Build Tool library
kandi X-RAY | npm-bazel Summary
kandi X-RAY | npm-bazel Summary
This project provides a generator tool, npm-bazel-gen.py, to generate WORKSPACE rules and BUILD files for npm modules. It also provides Skylark rules in build_tools/npm.bzl to build npm modules in Bazel's sandbox.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Shink symlinks inside a directory
- Return the external package directory
- Create a temporary directory
- Recursively copies source to target
- Generate rule name
- Check if string is a valid URL
- Build a supershrink node
- Adds dependencies for the given package
- Deduplicate dependency tree
npm-bazel Key Features
npm-bazel Examples and Code Snippets
Community Discussions
Trending Discussions on npm-bazel
QUESTION
From Bazel I want to run some npm
commands to install
node modules,
and to run
some webpack commands.
I have created a genrule to run the correct commands, but this seems to run in a sandbox without the npm
command.
I found https://github.com/redfin/npm-bazel but am unsure if this does what I want.
In this they seem to add a new_http_archive
for node, and I'm thinking whether doing this and then passing it to my commands via the tools
argument in genrule is the correct approach?
ANSWER
Answered 2017-Sep-12 at 18:45I think the project you link to is an npm module to generate a bazel workspace (and maybe build files). I think you want the other direction to depend on npm modules. AFAIK there isn't yet rules_npm but there is some basic support in rules_typescript. I haven't yet used it (we're migrating JVM code before JS code) but I suggest you try to poke there and see if it's usable for you even without the typescript part. The above link shows some commits, issues and very basic code pointers for npm.
Hope this helps.
Update:
rules_nodejs has been released and it has built in support for npm.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install npm-bazel
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page