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

#221 - Switch to async/await and major Lasso refactors #222

Merged
merged 13 commits into from
Sep 22, 2017
Merged

Conversation

austinkelleher
Copy link
Collaborator

@austinkelleher austinkelleher commented Aug 24, 2017

To summarize the changes:

  • Almost all of the code has been switched to async/await. Some of it can't really quite go fully async/await yet because it's bound by streaming code.
  • lasso-image, lasso-resolve-css-urls, lasso-minify-css, lasso-minify-js have all been moved into Lasso.
  • Remove lasso taglib v2
  • Most async API functions only support promises
  • jshint does not support async/await syntax, so I switched to eslint

The functional changes resulted in ~1500 lines of code reduction

I split the PR into 3 main commits. One that has most of the functional changes, the second that contains the external Lasso modules being pulled into core, and the 3rd being eslint fixes.

Most of the functional changes are in this commit: b7d65ac

Ultimately, I think this may be a good time to change the name of Lasso to something else. These changes are major breaking and will only support Node 8+.

@austinkelleher austinkelleher changed the title #221 - Switch to async/await #221 - Switch to async/await and major Lasso refactors Aug 24, 2017
@philidem
Copy link
Contributor

I'm glad you didn't have to change many files :)

@philidem
Copy link
Contributor

I agree -- good time to start discussing rename.

@philidem
Copy link
Contributor

Also, maybe in future PR, switch to using let/const

@philidem
Copy link
Contributor

Did you verify error handling with a outermost .catch(...) clause? Just want to make sure errors don't get eaten.

@austinkelleher
Copy link
Collaborator Author

As a follow-up, I want to actually revisit a lot of this code and refactor. This would include let/const, removing a lot of old modules that aren't relevant anymore, rethinking some algorithms, and perhaps remove some streaming support. The streaming code is pretty complicated and I think only useful in a few scenarios.

@austinkelleher austinkelleher merged commit 7a2df9a into master Sep 22, 2017
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