这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jamonholmgren
Copy link
Member

@jamonholmgren jamonholmgren commented Feb 21, 2018

Per #355, I decided to add a method to the builder to allow excluding certain core extensions if you don't need them and want to save the startup cost. print, prompt, http, and system are the slowest loading.

The API change simply adds this method, like this:

  const cli = build()
    .brand('gluegun')
    .exclude(['semver', 'prompt', 'http', 'patching'])
    .src(__dirname)
    .help()
    .version()
    .create()

Additionally, these tools are not available via require('gluegun') anymore. However, they are exposed in require('gluegun/toolbox').

const { semver, prompt } = require('gluegun/toolbox')

Lastly, this pull request removes Rollup 😢because it no longer makes sense in the context of on-demand loaded resources.

@jamonholmgren jamonholmgren merged commit da04d74 into master Feb 24, 2018
@jamonholmgren jamonholmgren deleted the perf/startup-time branch February 24, 2018 20:50
@jamonholmgren
Copy link
Member Author

Merging without feedback :shame: ... trying to cut a new release soon, so I'm pushing forward.

@jamonholmgren jamonholmgren added this to the 2.0.0-beta.5 milestone Feb 24, 2018
@skellock
Copy link
Contributor

When I read notifications from my iPad, it marks it as read on github. I then have to remember to search for it from my laptop, or it drops off my radar. :(

Never hesitate to @skellock me if you think I missed something. Especially on our open source stuff.

If I don’t respond within 24 hours, send out a search party.

@skellock
Copy link
Contributor

I’m cool with this PR.

I find it so weird it takes that long to boot up a few of these libs. Makes me want to dig in to find out why.

@jamonholmgren
Copy link
Member Author

Makes me want to dig in to find out why.

Same, especially with print, because that one is pretty much always necessary. I can understand prompt with all the plugins it has to load and whatnot.

@skellock
Copy link
Contributor

I wonder if it is the colors lib? I know they monkeypatch the string prototype. Perhaps that’s costly? Perhaps chalk is better?

@GantMan
Copy link
Member

GantMan commented Feb 25, 2018

Jamon this new function is awesome. When you generate a plugin should it have a commented out line with this in place, and everything listed? And a comment?

So if I'm new, I generate a new project from your CLI generator, and now there's a friendly line that tells me (a total newb) how to make my startup faster?

@jamonholmgren
Copy link
Member Author

jamonholmgren commented Feb 25, 2018

@skellock We can avoid monkeypatching string by using 'colors/safe'.

https://github.com/Marak/colors.js#using-string-safe-api

I think we should make this change. It shouldn't affect any documented API. I'll make an issue. EDIT: Issue #363.

@GantMan Yes, we should add that. I'll add an issue. EDIT: Issue #362.

@GantMan
Copy link
Member

GantMan commented Feb 25, 2018

I'm eager to add these features to Solidarity. When are you cutting a build?

@GantMan
Copy link
Member

GantMan commented Feb 25, 2018

bc Solidarity 2.0 is coming very soon

@jamonholmgren
Copy link
Member Author

@GantMan Getting close! Hopefully this week.

@jamonholmgren
Copy link
Member Author

@GantMan New Solidarity gluegun update here: infinitered/solidarity#177

@infinitered-circleci
Copy link
Collaborator

🎉 This PR is included in version 0.22.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants