diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2019-09-24 16:12:06 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-09-24 16:12:06 +0300 |
commit | dcfdab520cbc6814375e2e10208915c481747c7f (patch) | |
tree | 23ed457626b4c92eac898ef1eb61708b66bbeb42 /bin | |
parent | c37b600cb5dd5f836f44e4f0fe2215489b674701 (diff) |
Add binstubs for nanoc, rake, and scss-lint
Add common commands to ./bin/ so that we don't have to
prefix with "bundle exec". For example, you can now
alternatively use:
```sh
./bin/nanoc
```
Created with:
```sh
bundle bin <name>
```
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/nanoc | 29 | ||||
-rwxr-xr-x | bin/rake | 29 | ||||
-rwxr-xr-x | bin/scss-lint | 29 |
3 files changed, 87 insertions, 0 deletions
diff --git a/bin/nanoc b/bin/nanoc new file mode 100755 index 000000000..7e9e338b6 --- /dev/null +++ b/bin/nanoc @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'nanoc' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +bundle_binstub = File.expand_path("../bundle", __FILE__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("nanoc", "nanoc") diff --git a/bin/rake b/bin/rake new file mode 100755 index 000000000..9275675e8 --- /dev/null +++ b/bin/rake @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'rake' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +bundle_binstub = File.expand_path("../bundle", __FILE__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rake", "rake") diff --git a/bin/scss-lint b/bin/scss-lint new file mode 100755 index 000000000..d195391be --- /dev/null +++ b/bin/scss-lint @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'scss-lint' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +bundle_binstub = File.expand_path("../bundle", __FILE__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("scss_lint", "scss-lint") |