summaryrefslogtreecommitdiff
path: root/lib/tasks/yarn.rake
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
committerToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
commit62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch)
treec3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /lib/tasks/yarn.rake
parentf6453eca992a9c142268e78ac782cef98110d183 (diff)
downloadgitlab-ce-tc-standard-gem.tar.gz
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I decided to try https://github.com/testdouble/standard on our codebase. It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'lib/tasks/yarn.rake')
-rw-r--r--lib/tasks/yarn.rake37
1 files changed, 18 insertions, 19 deletions
diff --git a/lib/tasks/yarn.rake b/lib/tasks/yarn.rake
index 2ac88a039e7..8d2a1339821 100644
--- a/lib/tasks/yarn.rake
+++ b/lib/tasks/yarn.rake
@@ -1,40 +1,39 @@
-
namespace :yarn do
- desc 'Ensure Yarn is installed'
+ desc "Ensure Yarn is installed"
task :available do
- unless system('yarn --version', out: File::NULL)
+ unless system("yarn --version", out: File::NULL)
warn(
- 'Error: Yarn executable was not detected in the system.'.color(:red),
- 'Download Yarn at https://yarnpkg.com/en/docs/install'.color(:green)
+ "Error: Yarn executable was not detected in the system.".color(:red),
+ "Download Yarn at https://yarnpkg.com/en/docs/install".color(:green)
)
abort
end
end
- desc 'Ensure Node dependencies are installed'
- task check: ['yarn:available'] do
- unless system('yarn check --ignore-engines', out: File::NULL)
+ desc "Ensure Node dependencies are installed"
+ task check: ["yarn:available"] do
+ unless system("yarn check --ignore-engines", out: File::NULL)
warn(
- 'Error: You have unmet dependencies. (`yarn check` command failed)'.color(:red),
- 'Run `yarn install` to install missing modules.'.color(:green)
+ "Error: You have unmet dependencies. (`yarn check` command failed)".color(:red),
+ "Run `yarn install` to install missing modules.".color(:green)
)
abort
end
end
- desc 'Install Node dependencies with Yarn'
- task install: ['yarn:available'] do
- unless system('yarn install --pure-lockfile --ignore-engines')
- abort 'Error: Unable to install node modules.'.color(:red)
+ desc "Install Node dependencies with Yarn"
+ task install: ["yarn:available"] do
+ unless system("yarn install --pure-lockfile --ignore-engines")
+ abort "Error: Unable to install node modules.".color(:red)
end
end
- desc 'Remove Node dependencies'
+ desc "Remove Node dependencies"
task :clobber do
- warn 'Purging ./node_modules directory'.color(:red)
- FileUtils.rm_rf 'node_modules'
+ warn "Purging ./node_modules directory".color(:red)
+ FileUtils.rm_rf "node_modules"
end
end
-desc 'Install Node dependencies with Yarn'
-task yarn: ['yarn:install']
+desc "Install Node dependencies with Yarn"
+task yarn: ["yarn:install"]