TryGhost / Ghost

Independent technology for modern publishing, memberships, subscriptions and newsletters.
https://ghost.org
MIT License
46.91k stars 10.21k forks source link

Many small tooling cleanup tasks #9441

Closed ErisDS closed 5 years ago

ErisDS commented 6 years ago

This issue contains a list of mostly small cleanup tasks for our tooling.

Aim is to move towards consistency between repos (both public and private) to lean on package.json scripts more heavily where possible, simplify grunt & essentially make this repo neater & easier to use šŸ˜

ErisDS commented 5 years ago

Some of this is outdated, but I'm sure there are plenty more small tasks like this that have cropped up in the year since I wrote this.

allouis commented 5 years ago

https://github.com/TryGhost/Ghost/commit/bdd57b36cfc382f4d1df872834a8e99b4a4ba359 Removed a layer of indentation from the Gruntfile, I don't think we can remove much more due to the way grunt injects itself, e.g.

module.exports = function (grunt) {
    // Do stuff w/ grunt here, nested one level
}
ErisDS commented 5 years ago

Note the grunt master command is currently broken - if you try to run it when the submodules are out of date it errors, rather than updating them, which is its job!

allouis commented 5 years ago

@ErisDS I'll take a look at that

JohnONolan commented 5 years ago

Broken for me too

image

JohnONolan commented 5 years ago

Ok I ran it 3 more times and it timed out in different places each time and then eventually completed

allouis commented 5 years ago

^ looks this was a network/yarn issue rather than the grunt task :relaxed:

allouis commented 5 years ago

grunt release creates a zip with contents which do not equal .tgz

After creating a release zip and using npm pack to create a tarball, I extracted them to a zip and tgz directory respectively.

 >> diff -r tgz/ zip/
Only in tgz/content/themes/casper/assets/css: .csscomb.json
Only in zip/content/themes/casper: config.example.json
Only in tgz/content/themes/casper: .yarnrc
Only in zip/core/server/lib/members/static/auth: dist
Only in zip/core/server/lib/members/static/auth: index.html
Only in zip/core/server/lib/members/static/gateway: index.html
Only in tgz/core/server/web/admin/views: .gitkeep
Only in tgz/: .eslintignore
Only in tgz/: .eslintrc.json
Only in tgz/: .npmignore

Will work on resolving these differences

allouis commented 5 years ago

The output tars/zipz of grunt release and npm pack now unpack to the same directories, apart from these two files:

>> diff -r tgz/ zip/
Only in zip/core/server/lib/members/static/auth: dist
Only in zip/core/server/lib/members/static/auth: index.html

This will be fixed when members has been moved into it's own monorepo.which is tracked here: https://github.com/TryGhost/Ghost/issues/10701

Closing this now :tada: