Created
January 12, 2013 19:15
-
-
Save grayghostvisuals/4520016 to your computer and use it in GitHub Desktop.
Yeoman build automation for gh-page deployment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# Yeoman build automation for gh-page deployment. | |
# | |
# Credits: | |
# Made possible by @ChrisJeane and GrayGhostVisuals (@gryghostvisuals) | |
# | |
# How To: | |
# This Rakefile goes in the root directory outside of your | |
# yeoman project. after you've run 'yeoman build' you may then | |
# run 'rake build from your project's main root directory. | |
# | |
# Why?: | |
# In order to deploy to github pages your site must operate | |
# from the root directory. Since all your build files are | |
# placed in a 'dist' directory by yeoman we need to automate | |
# the process in order to move those 'dist' directory files | |
# into a root directory for gh-page deployment. | |
task :build do | |
Dir.chdir('yeoman') { `yeoman build` } | |
# Determines the build directory and ignores a folder you specifiy | |
Dir.glob('yeoman/dist/*') { |f| FileUtils.cp_r(f, '.', verbose: true) if f != "yeoman/dist/$IGNORE_THIS_FOLDER_NAME" } | |
# Makes sure to copy over the .htaccess file | |
FileUtils.copy("yeoman/dist/.htaccess", '.', verbose: true) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment