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.

Development workflow for library developers

See original GitHub issue

From @tobi-or-not-tobi on April 18, 2018 12:42

Bug Report or Feature Request

- [x] bug report -> please search issues before submitting
- [ ] feature request

Area

- [ ] devkit
- [x ] schematics

Versions

Angular CLI: 6.0.0-rc.5

Repro steps

ng new myapp
cd myapp
ng g library mylib

import library module into main AppModule: import { MylibModule } from 'mylib';

I’m exited by the new generation of libraries in the CLI. But I didn’t got it to work initially. While the creation of build of the library seems to be taken care of, the integration into the main app seems to be missing. I believe this is caused by an incorrect reference in the path setup in the tsconfig.json, as it is configured with the following after creation of the library:

"paths": {
      "mylib": ["dist/mylib"]
}

This requires an initial build to have a generated dist/mylib folder in the first place, but would also require to continuously rebuild the library upon changes.

After I change the path to the src folder:

 "mylib": ["projects/mylib/src/public_api"]

I’m able to include the module without building, but also have a seamless experience upon any changes in my library component.

I know the public_api has been originated from the ng-packagr, but i’m wondering if we shouldn’t change this into an ordinary index.ts, as it would make the import easier. in addition, if that file could live at the root of our generated library, the import could be shorten to "mylib": ["projects/mylib"]

Desired functionality

  • Change the path reference to the source rather the generated build files
  • (optional) simplify reference of the library by changing the public_api.ts into index.ts and move it to the root directory.

Mention any other details that might be useful

I’ve already logged this issue under the cli project, but after a second thought I assume it belongs to this issue tracker.

Copied from original issue: angular/devkit#730

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:22 (18 by maintainers)

github_iconTop GitHub Comments

3reactions
tommckcommented, Oct 19, 2018

@alan-agius4 What changes are you referring to?

1reaction
alan-agius4commented, Sep 5, 2018

Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.

If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An Overview of a Development Workflow | Zell Liew
The 6 parts of a development workflow · Scaffold is where you setup your web project. · Develop is where you spend the...
Read more >
Development Workflow - Python Developer's Guide
Development Workflow # · Standards of behaviour in these communication channels · Mailing Lists · Discourse (discuss.python.org web forum) · Tutorials for new...
Read more >
Development Workflow — pyccl 2.X documentation
A typical workflow is to make some change, rerun a failing benchmark or unit test, etc. until you've completed your new feature and/or...
Read more >
Developer workflow basics
Learn about the basic workflow for developing a well-designed app for ... This is the first step of the Android app development process....
Read more >
Application and library developer workflow. - ResearchGate
Download scientific diagram | Application and library developer workflow. from publication: Loop Transformation Recipes for Code Generation and Auto-Tuning ...
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