Giter Site home page Giter Site logo

angular-cli-lib-example's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-cli-lib-example's Issues

Angular compiler option "flatModuleIndex" requires one and only one .ts file in the "files" field

Hi there! I'm having a bad time here trying to get npm run build:lib to succeed and I'm not sure what I'm doing wrong. Here's my console output:

Building Angular Package
Building entry point 'ng-mylib'
Rendering Stylesheets
Rendering Templates
Compiling TypeScript sources through ngc

BUILD ERROR
: Angular compiler option "flatModuleIndex" requires one and only one .ts file in the "files" field.

Error: : Angular compiler option "flatModuleIndex" requires one and only one .ts file in the "files" field.

    at Object.<anonymous> (/home/dev/ng-mylib/node_modules/ng-packagr/lib/ngc/compile-source-files.js:61:68)
    at Generator.next (<anonymous>)
    at /home/dev/ng-mylib/node_modules/ng-packagr/lib/ngc/compile-source-files.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/home/dev/ng-mylib/node_modules/ng-packagr/lib/ngc/compile-source-files.js:3:12)
    at Object.compileSourceFiles (/home/dev/ng-mylib/node_modules/ng-packagr/lib/ngc/compile-source-files.js:19:12)
    at Object.<anonymous> (/home/dev/ng-mylib/node_modules/ng-packagr/lib/ng-v5/entry-point/ts/compile-ngc.transform.js:42:34)
    at Generator.next (<anonymous>)
    at /home/dev/ng-mylib/node_modules/ng-packagr/lib/ng-v5/entry-point/ts/compile-ngc.transform.js:7:71
    at new Promise (<anonymous>)

I've tried putting breakpoints down in the angular compile level, and what I'm seeing is the complaint happens because two rootFiles are being offered to createBundleIndexHost:

0:"/home/dev/ng-mylib/libs/ng-mylib/public_api.ts"
1:"/home/dev/ng-mylib/libs/ng-mylib/ng-mylib.ts"

I have not yet been able to figure out why that is the case though. Can you offer any pointers on where I might be going wrong? I think I followed the guidance on editing tsconfig.json and package.json files in the project, but clearly I missed something. Any help would be appreciated!

Validate peerDependencies of the library

Hi,

It may be more a question that an issue, maybe I missed something. It seems to me that the library and the "demo" app (i.e. the app listing the lib in its own package.json) shouldn't be sharing all the dependencies in node_modules.

Currently it seems to me that there is no validation of the library's peerDependencies. A build can work for this repo, but then if the lib gets published, and another project add it to its dependencies, it will only get notified of some peerDependencies like @angular/common/@angular/core in your case.

If the lib itself has external dependencies, nothing makes sure to add those to the delivered package.json. You have to manually check what's needed and add it to the library's peerDependencies.

Am I missing something or is this process currently manual/unsafe?

Thank you!

Video link in README is broken

The link in the following line:

the talk given at the Angular Mountain View Meetup (video here).

When following the link, Youtube reports This video is unavailable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.