CHORE: ES6 Language Update - REF ISSUE # 9589#9662
Conversation
updaed the file to use const where approiate and using an anonymous arrow function on the exports.
|
Thanks @hkd987 for your help! The ES6 migration is tracked here. Please do not create any more PR's because of #9589 (comment). Please get involved into #9589, otherwise multiple people will work on the same files. |
|
Thanks for the heads up. I have commented and read the thread looks like no one is working on the section I started on. |
|
|
||
| module.exports = function asset(path, options) { | ||
| var hasMinFile = _.get(options, 'hash.hasMinFile'); | ||
| module.exports = (path, options) => { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Changed arrow function back to es5 named export.
| // Returns the path to the specified asset. The ghost flag outputs the asset path for the Ghost admin | ||
| var proxy = require('./proxy'), | ||
| const proxy = require('./proxy'), | ||
| _ = require('lodash'), |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Was testing out something and left the console log statment in.
Should speed speed up the program.
This should allow us to only import the lodash module that we need and speeed up the loading of this file.
updated the file to use const where appropriate and using an anonymous arrow function on the exports.
Got some code for us? Awesome 🎊!
Please include a description of your change & check your PR against this list, thanks!
npm test)More info can be found by clicking the "guidelines for contributing" link above.