Publishing to npm addresses the version skew issue discussed internally at go/postcss-build-rules?disco=AAAADYbh_hE. This PR corresponds to #6, but let's not close that until we perform the publish.
Where publishing to npm is primarily useful is the usage of peerDependencies, such that downstream dependents are required/asked to avoid version skew of postcss as enforced by npm cli/yarn.
Also document installation of these build rules in the README - this partially addresses #34.
The plan is to publish this as version 0.5.0 (totally arbitrary version number - but it reflects progress made since initial publish), both on npm and GitHub such that http_archive can be used as well.
I've tested the npm package locally with the following steps:
Run bazel build :npm_package, then go to another Bazel workspace with rules_nodejs set up
Add "@bazel/postcss": "relative/path/to/rules_postcss/bazel-bin/npm_package", to package.json
Call rules_postcss_dependencies from WORKSPACE
Verify using postcss_binary etc. rules from @build_bazel_rules_postcss//:defs.bzl work as expected
If desired, I can put up my test repo (this may take time per go/releasing).
Here is the npm pack artifact created as a result of running bazel run :npm_package.pack: bazel-postcss-0.0.1.tgz.zip
Publishing to npm addresses the version skew issue discussed internally at go/postcss-build-rules?disco=AAAADYbh_hE. This PR corresponds to #6, but let's not close that until we perform the publish.
Where publishing to npm is primarily useful is the usage of
peerDependencies
, such that downstream dependents are required/asked to avoid version skew ofpostcss
as enforced by npm cli/yarn.Also document installation of these build rules in the README - this partially addresses #34.
The plan is to publish this as version 0.5.0 (totally arbitrary version number - but it reflects progress made since initial publish), both on npm and GitHub such that
http_archive
can be used as well.I've tested the npm package locally with the following steps:
bazel build :npm_package
, then go to another Bazel workspace with rules_nodejs set up"@bazel/postcss": "relative/path/to/rules_postcss/bazel-bin/npm_package",
topackage.json
rules_postcss_dependencies
fromWORKSPACE
postcss_binary
etc. rules from@build_bazel_rules_postcss//:defs.bzl
work as expectedIf desired, I can put up my test repo (this may take time per go/releasing).
Here is the
npm pack
artifact created as a result of runningbazel run :npm_package.pack
: bazel-postcss-0.0.1.tgz.zip