Skip to content

CHORE: ES6 Language Update - REF ISSUE # 9589#9662

Merged
kirrg001 merged 5 commits intoTryGhost:masterfrom
hkd987:es6-asset.js
Jun 4, 2018
Merged

CHORE: ES6 Language Update - REF ISSUE # 9589#9662
kirrg001 merged 5 commits intoTryGhost:masterfrom
hkd987:es6-asset.js

Conversation

@hkd987
Copy link
Copy Markdown
Contributor

@hkd987 hkd987 commented Jun 4, 2018

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!

  • [+] There's a clear use-case for this code change
  • [ https://github.com/ES6 migrations #9589 ] Commit message has a short title & references relevant issues
  • [true] The build will pass (run npm test)

More info can be found by clicking the "guidelines for contributing" link above.

updaed the file to use const where approiate and using an anonymous arrow function on the exports.
@hkd987 hkd987 changed the title CHORE: ES6 Language Update CHORE: ES6 Language Update - REF ISSUE # 9589 Jun 4, 2018
@kirrg001
Copy link
Copy Markdown
Contributor

kirrg001 commented Jun 4, 2018

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.

@hkd987 hkd987 mentioned this pull request Jun 4, 2018
5 tasks
@hkd987
Copy link
Copy Markdown
Contributor Author

hkd987 commented Jun 4, 2018

Thanks for the heads up. I have commented and read the thread looks like no one is working on the section I started on.

Comment thread core/server/helpers/asset.js Outdated

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.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

@kirrg001 kirrg001 self-assigned this Jun 4, 2018
Changed arrow function back to es5 named export.
Comment thread core/server/helpers/asset.js Outdated
// 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.

This comment was marked as abuse.

This comment was marked as abuse.

hkd987 added 3 commits June 4, 2018 10:55
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.
@kirrg001 kirrg001 merged commit a993994 into TryGhost:master Jun 4, 2018
@hkd987 hkd987 deleted the es6-asset.js branch June 4, 2018 16:35
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.

5 participants