Skip to content

Conversation

durran
Copy link
Member

@durran durran commented Mar 24, 2016

Precompiles less before check, run, start and in prepublish.

Combined the jade template compilation and less compilation into a
single compile ui script.

Speedy


This change is Reviewable

Precompiles less before check, run, start and in prepublish.

Combined the jade template compilation and less compilation into a
single compile ui script.
@durran
Copy link
Member Author

durran commented Mar 24, 2016

@durran durran changed the title INT-1319: Add less compile cache: [DNM] INT-1319: Add less compile cache: Mar 24, 2016
.eslintrc Outdated
},
"rules": {
"jsx-quotes": [2, "prefer-single"],
"strict": 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. What impact does "strict: 0" have? I don't understand what that value means in this context.
  2. It looks like you're overriding this rule: https://github.com/mongodb-js/eslint-config/blob/master/rules/strict-mode.js. Should we discuss making this part of our default config?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should - strict mode prevents us from writing invalid Javascript and IMO should be our standard.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in favor of using strict mode, too. However, what precisely does "strict": 0 do above? As far as I can tell, you disabled the eslint "strict" rule entirely.

See also Lucas' comment in the rule you're overriding:
https://github.com/mongodb-js/eslint-config/blob/master/rules/strict-mode.js

    // `'use strict';` is a job for transform tools
    // and using it explictly will break them.

@kangas
Copy link
Contributor

kangas commented Mar 24, 2016

TODO:

  • Doesn't work in release builds. (I think that's why you labeled this DNM 😃 )
  • Please update the postuninstall (aka "clean") script to purge the new cache directory
  • Please rewrite the ES6 code as ES5. Else, let's have a larger discussion about committing to ES6. :)

Otherwise -- hooray! 🎉 This significantly improves application load time, as we expected.

@durran durran changed the title [DNM] INT-1319: Add less compile cache: INT-1319: Add less compile cache: Mar 26, 2016
@kangas
Copy link
Contributor

kangas commented Mar 29, 2016

LGTM

@durran durran merged commit 15d9b0b into master Mar 29, 2016
@durran durran deleted the INT-1319-less-compile-cache branch March 29, 2016 19:40
kangas pushed a commit that referenced this pull request Apr 26, 2016
INT-1319: Add less compile cache:
(cherry picked from commit 15d9b0b)
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