-
Notifications
You must be signed in to change notification settings - Fork 202
Integration with Angular-CLI #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@mb-jenks I've only just started playing with angular-cli myself, but it's definitely something we should be able to work with. We'll look into it. |
Apart from making the lib less complex, it also makes it easier to handle with SystemJS. This is important given that the Angular-CLI has embraced SystemJS instead of our usual webpack toolchain. Also rejigged the deps a bit: - typings should be a devdepedency - Angular and RxJS should be peer deps Connected to angular-redux#113
Apart from making the lib less complex, it also makes it easier to handle with SystemJS. This is important given that the Angular-CLI has embraced SystemJS instead of our usual webpack toolchain. Also rejigged the deps a bit: - typings should be a devdepedency - Angular and RxJS should be peer deps Connected to angular-redux#113
Apart from making the lib less complex, it also makes it easier to handle with SystemJS. This is important given that the Angular-CLI has embraced SystemJS instead of our usual webpack toolchain. Also rejigged the deps a bit: - typings should be a devdepedency - Angular and RxJS should be peer deps Connected to angular-redux#113
With PR #115 , I'm able to generate a in /* global require, module */
var Angular2App = require('angular-cli/lib/broccoli/angular2-app');
module.exports = function(defaults) {
return new Angular2App(defaults, {
vendorNpmFiles: [
//...
'redux/dist/redux.js',
'ng2-redux/lib/**/*.+(js|js.map)'
]
});
}; and in const map: any = {
redux: 'vendor/redux/dist/redux.js',
'ng2-redux': 'vendor/ng2-redux/lib'
};
/** User packages configuration. */
const packages: any = {
'ng2-redux': {
format: 'cjs',
defaultExtension: 'js',
main: 'index'
}
}; Ah, the joys of SystemJS I thought I left behind me when we switched to Webpack. Now the CLI is sucking me back into SystemJS' rabbit hole of redundant configs ;) As an aside, I logged issue angular/angular-cli#882 against the CLI to see if there are plans to simplify bringing in libs from NPM, we'll see if anything transpires there (* cough * ditching SystemJS * cough *). |
Thanks @SethDavenport ! Do you know when the changes will be merged with master? The systemjs configs are a pain but I've got them working for now. |
Waiting for the go-ahead from @e-schultz |
* Remove lodash as a dependency Apart from making the lib less complex, it also makes it easier to handle with SystemJS. This is important given that the Angular-CLI has embraced SystemJS instead of our usual webpack toolchain. Also rejigged the deps a bit: - typings should be a devdepedency - Angular and RxJS should be peer deps Connected to #113 * Changed rxjs imports to pull in the parts we need. This is needed to match the default way Angular-CLI sets up the SystemJS import mappings for RxJs. Arguably this is the right way to do it anyway; we already switched to this in the v3.x branch.
@mb-jenks @SethDavenport changes are merged in, and a v2.3.4 has just been published on npm. |
Is there a way to provide a
/dist
folder for integrating with angular-cli projects? Because of the mapping associated with the angular-cli build, its really difficult to use the ng2-redux package, specifically its dependency onlodash
and the mapping ofrxjs
within the src files (the angular-cli usesrxjs/Rx
).The text was updated successfully, but these errors were encountered: