jvandemo / jvandemo/generator-angular2-library
Playground + Third party packages (Material)
- Dominant language
- JavaScript
- Stars
- 740
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
I am developing a library that adds functionality to Material. In order to test the library Material has to be included. I don't want to include Material in the library but include it ONLY in the playground. I was able to do this by manually updating the **systemjs.config.js** and mapping the necessary packages.
```'@angular/material': 'npm:@angular/material/bundles/material.umd.js',
'@angular/common/http': 'npm:@angular/common/bundles/common-http.umd.js',
'@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js',
'@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js',
'@angular/cdk/bidi': 'npm:@angular/cdk/bundles/cdk-bidi.umd.js',
'@angular/cdk/keycodes': 'npm:@angular/cdk/bundles/cdk-keycodes.umd.js',
'@angular/cdk/a11y': 'npm:@angular/cdk/bundles/cdk-a11y.umd.js',
'@angular/cdk/platform': 'npm:@angular/cdk/bundles/cdk-platform.umd.js',
'@angular/cdk/overlay': 'npm:@angular/cdk/bundles/cdk-overlay.umd.js',
'@angular/cdk/portal': 'npm:@angular/cdk/bundles/cdk-portal.umd.js',
'@angular/cdk/collections': 'npm:@angular/cdk/bundles/cdk-collections.umd.js',
'@angular/cdk/observers': 'npm:@angular/cdk/bundles/cdk-observers.umd.js',
'@angular/cdk/scrolling': 'npm:@angular/cdk/bundles/cdk-scrolling.umd.js',
'@angular/cdk/accordion': 'npm:@angular/cdk/bundles/cdk-accordion.umd.js',
'@angular/cdk/layout': 'npm:@angular/cdk/bundles/cdk-layout.umd.js',
'@angular/cdk/table': 'npm:@angular/cdk/bundles/cdk-table.umd.js',
'@angular/cdk/stepper': 'npm:@angular/cdk/bundles/cdk-stepper.umd.js',
'@angular/cdk/stepper': 'npm:@angular/cdk/bundles/cdk-stepper.umd.js',
'@angular/cdk/coercion': 'npm:@angular/cdk/bundles/cdk-coercion.umd.js'
'tslib': 'npm:tslib/tslib.js'
```
I was wondering if there is a better way to do this, because it feels like a huge hack considering we have generator-angular2-library automating things.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with systemjs.config.js and the generator's playground setup to understand how third-party packages are currently included. Check whether the generator templates expose a supported dependency configuration. Done means Material can be used in the playground without manually editing package mappings while remaining excluded from the generated library.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, javascript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100