Open tcarrio opened 3 years ago
Hi @tcarrio this repo was a simple reproduction repo so that I could properly submit a bug report to the stencil team (since they ask for reproduction repos) and is not yet intended to be re-useable code. I'm open to putting a license, but truthfully, i don't plan any maintenance here.
built-in bazel rules with the rules_nodejs
rules enable using stencil without any additional bazel custom rules, as long as you ensure preserveSymlinks
is set to true
in the stencil config like so:
rollupPlugins: {
// Plugins injected before rollupNodeResolve()
before: [
// This plugin is required to overwrite the `preserveSymlinks` rollup
// config option so that Bazel can resolve files while running Stencil in
// the Bazel sandbox.
{
name: 'overwrite-rollup-options',
options: (options: RollupInputOptions) => {
return {
...options,
preserveSymlinks: true,
};
},
},
],
},
a bazel nodejs_binary
can be used to run a stencil dev server, and simple npm_package_bin
can be used to generate outputs. That being said, i'm not sure this needs to be packaged for others to use. What are your thoughts? I'm open to be convinced of something else.
I appreciate you getting back to me on this @loudmouth :grin: I see, that is much simpler with just the rollup plugin. Awesome find!
My plan was to refactor this to a Bazel macro that can be used to easily define the dev
and build
targets with shared inputs.
You don't need to maintain this here and it's not currently written to be a shared Bazel rule, but if you don't mind me using this as a baseline a license would specify any restrictions on how people can use this code, e.g. forking, modifying, etc.
If you don't want a lot of overhead, the MIT license is commonly used as a simple and permissive way to license open source code.
Choosing a software license - Sourcehut Choosing a license - GitHub
Thank you again for the heads up on the rollup plugin option :+1:
Hey @loudmouth :wave:
It's awesome to see someone else pulling in Stencil for a Bazel monorepo. I was curious whether you wanted this code to be reusable under a license, in which case you would need to provide a
LICENSE
file for others to make use of this.