-
Notifications
You must be signed in to change notification settings - Fork 12k
feat(builder): broccoli bump to 1.0 #299
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
Conversation
I was under the impression that these files were compiled versions of the ones present in https://github.com/angular/angular/tree/master/tools/broccoli . If that is so, then we shouldn't alter them ourselves. @hansl, do you have some more context on this? |
They are in the current master. I made some investigation on this as I did have feeling that this could work faster than 114ms per changed single file. I found out that some plugins (really complex ones) are not needed in 1.0 version of broccoli anymore (in my opinion) and these are the ones that are slowing down the compile/build time. |
I did not try using it, no. I was just going through the files on a top level review and remembered that we had problems with past PRs that changed them because they came from another repo, so I thought I should mention it. See #206 (comment) I usually steer clear of those, because personally I do not understand them very well. |
I actually rewrite this specifically for our needs and did use some code from current one. |
bd03f24
to
d9646fe
Compare
@jkuri had me in a videocall and stuff looked nice! For me the most relevant bits were:
Tbh if we can have sass/less without the user having to do anything (like Still worried about desync'ing these files from the main angular repo. Also if we just abandon that build step, perhaps it's better to move to a different build system altogether. Dunno. @hansl needs your input on this |
@hansl I would appreciate your opinion on this, when you will have time please ping me on slack. |
I want to echo @filipesilva on the worries as well as the need for a different build system. This discussion around builds and feature enhancements. Having a build system, particularly one that is extensible is going to be critical to the CLI. |
Maybe, but any "node package" aka compiler/preprocessor can be reworked as a broccoli plugin so I don't see a blocker here. I like the performance and I will advocate broccoli here as I think that is not possible to achieve better build times with anything else, at most equal. So, my vote goes to broccoli. |
So maybe we need a Broccoli equivalent of DefinitelyTyped where we wrap packages we want to use or others want to use in a Broccoli friendly way. |
You mean 3rd party packages? I am working on that right now with |
We definitely don't want to go down the |
|
||
let trees = [vendorNpmTree, assetTree, tsNodeTree, jsTree, this.index()]; | ||
|
||
if (require.resolve('node-sass') && sh.which('sass')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you're hard coding sass/less? What if the user wants to use Compass?
This PR is crazy; please reduce it to moving Broccoli to version 1, and remove the rest. We already want to cover SASS/LESS with |
crazy :-) ok, will do. |
const Funnel = require('broccoli-funnel'); | ||
const mergeTrees = require('broccoli-merge-trees'); | ||
const ts = require('./broccoli-typescript'); | ||
const sass = require('./broccoli-sass'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires not needed anymore.
|
||
const assetTree = new Funnel(src, { | ||
include: ['**/*.*'], | ||
exclude: ['**/*.ts', '**/*.js', '**/*.scss', '**/*.sass', '**/*.less'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, just exclude ts
, js
and css
.
You need to fix references to the broccoli stuff from the scaffold. |
Thanks, I would forgot this. On Thursday, 17 March 2016, Hans [email protected] wrote:
|
@@ -42,6 +42,7 @@ | |||
"lodash": "^4.6.1", | |||
"resolve": "^1.1.7", | |||
"shelljs": "^0.6.0", | |||
"multidep": "^2.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used by broccoli 1.0 for installing additional plugins. Does not work without that for me.
Unfortunately closing this in favor of #332. It's just really inconvenient for me to push to a branch forked on jkuri's account, so instead I'll just make a new PR. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I rewritten TypeScript Broccoli Plugin to be compatible with Broccoli 1.0.
According to my tests builds are now ~50% faster.
I also added SASS and LESS plugins which works right off (SASS needs
gem install sass
) and they work with encapsulation.