Skip to content

Instantly share code, notes, and snippets.

@blairanderson
Last active July 22, 2020 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blairanderson/4d0257ae3e9b32e5049ef76c4bce0aa0 to your computer and use it in GitHub Desktop.
Save blairanderson/4d0257ae3e9b32e5049ef76c4bce0aa0 to your computer and use it in GitHub Desktop.
Rakefile for fetching the current dist/sass/etc folders from the bootstrap and tachyons GitHub repository
namespace :fetch do
desc "fetch tachyons scss files"
task :tachyons do
`curl -LkSs https://github.com/tachyons-css/tachyons-sass/archive/v4.7.1.tar.gz | tar xz`
`mv -f ./tachyons-sass-*/scss ./_sass/tachyons-sass`
`mv -f ./tachyons-sass-*/tachyons.scss ./_sass/tachyons-sass`
`rm -rf ./tachyons-sass-*`
end
desc "fetch bootstrap scss files"
task :bootstrap do
current_bootstrap_version = "5.0.0-alpha1"
target = "public/bootstrap/"
source = "dist" # "scss" or "js" or "build" - see https://github.com/twbs/bootstrap/tree/v5.0.0-alpha1 for optional folders
`rm -rf #{target}`
`mkdir #{target}`
`curl -LkSs https://github.com/twbs/bootstrap/archive/v#{current_bootstrap_version}.tar.gz | tar xz`
`mv -fv ./bootstrap-#{current_bootstrap_version}/#{source}/* ./#{target}`
`rm -rf bootstrap-#{current_bootstrap_version}/`
end
end
@blairanderson
Copy link
Author

blairanderson commented Jul 22, 2020

How to Fetch Bootstrap DIST using RAKE

  1. Update the current_bootstrap_version
  2. Update the TARGET folder for your bootstrap files
  3. Update the source of the content you want to duplicate
  4. Run $ rake fetch:bootstrap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment