Skip to content
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

Bare-Butt CLI Fix #69

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

TheFirstDeity
Copy link

Simplest fix possible for the angular-cli issue #65. However, this is a breaking change that requires the api to be imported from angular2-logger instead of angular2-logger/core.

All it does is point es6 compatible tools at the dist/es6/core.js entry point as if it was an index.js in the root folder, and let's ts find core.d.ts as if it were index.d.ts.

Note: GitHub should give you the option to squash this into one commit. If it doesn't, let me know and I'll do it.

TheFirstDeity and others added 4 commits September 9, 2016 21:40
* ignore VS Code workspace settings

* refactored compile (tsconfig, src/)

* fix(build) refactored build scripts & typings

* finished build refactoring, verified on other proj

* cleared TODO item

* removed donation link for now
Requires package to be imported as "angular2-logger" instead of
"angular2-logger/core"
@langley-agm
Copy link
Contributor

Is it possible to do this while keeping import from angular2-logger/core ? In the future there could be more than just the core module and the user might not want to import them all.

@TheFirstDeity
Copy link
Author

TheFirstDeity commented Sep 12, 2016

Mmmm yes... But it requires the changes to the project layout that I did in the fork. We don't have to rename app to src, but the basic folder structure is specifically for the submodule behavior.

@TheFirstDeity
Copy link
Author

TheFirstDeity commented Sep 12, 2016

It creates a lot of folder clutter, and I imagine bundling's going to be a nightmare because each submodule would need its own bundle...

Plus the user would have to know the name of each module's url. If the project is organized into NgModule classes, the user just has to remember the root directory. Intellisense can list all the NgModule classes referenced from the root index.ts when he goes to import from angular2-logger.

Edit: And come to think of it, I don't see how the es5 bundles would work automatically with multiple entry points. main can only point to one entry file. It works for es6 just because I have them compile into the root. I think someone using the es5 bundles would have to manually configure their module loader.

@TheFirstDeity
Copy link
Author

By the way, I don't think my opinions are better. I'm fallible and I'm wrong all the time. I only know a bit about front-end development, and anything I say is based off my preferences.

I don't care what design decisions you choose. I just like solving puzzles when I can, so I might help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants