question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@nrwl/workspace:library: support publishable libraries

See original GitHub issue

Expected Behavior

To officially support nx generate @nrwl/workspace:library --name pubtest --publishable

The idea is to publish a framework-less library

Current Behavior

> nx generate @nrwl/workspace:library --name pubtest --publishable
Could not match option 'publishable' to the @nrwl/workspace:library schema.

NX Report

>  NX  Report complete - copy this into the issue template

  @nrwl/angular : 9.0.4
  @nrwl/cli : 9.0.4
  @nrwl/cypress : 9.0.4
  @nrwl/eslint-plugin-nx : 9.0.4
  @nrwl/express : Not Found
  @nrwl/jest : 9.0.4
  @nrwl/linter : Not Found
  @nrwl/nest : Not Found
  @nrwl/next : Not Found
  @nrwl/node : Not Found
  @nrwl/react : Not Found
  @nrwl/schematics : Not Found
  @nrwl/tao : 9.0.4
  @nrwl/web : Not Found
  @nrwl/workspace : 9.0.4
  typescript : 3.7.5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
Hotellcommented, Mar 13, 2020

Yeah what @vsavkin said 👌. I guess good solution would be to have lib schematic for web and thus make it publishable.

there already is a web builder https://github.com/nrwl/nx/blob/master/packages/web/builders.json#L9-L13

There might be some issues as creating bundles for web-components is not trivial task… but as I said there is already builder for that 🤞

1reaction
vsavkincommented, Mar 12, 2020

We cannot really make @nrwl/workpace:lib publishable because we need to know how to build it. That’s why it has to be node, or react, or angular.

@snebjorn we don’t bundle node libs. Any particular reason you want it to be bundled?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Buildable and Publishable Libraries - Nx
Next generation build system with first class monorepo support and powerful integrations.
Read more >
Publishing React Libraries Made Easy | by Jack Hsu - Nx Blog
Making a publishable library is a daunting task because there is a checklist of things to do before you can even write code....
Read more >
Publishable libraries with Nx Monorepo - part 1
Scaffold new libraries: $ nx g @nrwl/node:library lib1 --publishable --importPath="@<organization_name>/lib1" --tags="scope:public,type:util ...
Read more >
How to make a buildable publishable library with Nx that is ...
Create framework agnostic, just plain TypeScript libraries within an existing Nx workspace (say to use in your React, Node or Angular app) ...
Read more >
Creating and Publishing Angular libraries with Nx - YouTube
Nx devTools allows us to create and publish angular libraries with ease, we will learn how you can create different types of libraries...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found