GithubHelp home page GithubHelp logo

artch / heroku-buildpack-nodejs-bower-gulp-grunt-compass Goto Github PK

View Code? Open in Web Editor NEW

This project forked from greenapes/heroku-buildpack-nodejs-bower-gulp-grunt-compass

0.0 2.0 0.0 8.37 MB

A slightly modified version of Heroku's official Node.js buildpack with added Bower, Gulp and Compass support.

License: MIT License

Shell 100.00%

heroku-buildpack-nodejs-bower-gulp-grunt-compass's Introduction

What this buildpack does

  • Run npm install
  • Install latest version of gulp if a gulpfile is present and was not already installed by previous pass
  • Install latest version of bower if a bowerfile is present and was not already installed by previous pass
  • Install latest version of grunt if a gruntfile is present and was not already installed by previous pass
  • Install bundle
  • Run bower install
  • Run bundle install
  • Run bundle exec compass compile
  • Run gulp heroku:$NODE_ENV (by default, it expands to heroku:production)
  • Run grunt heroku:$NODE_ENV

How to access private repos

Currently we support private repos for bower, for GitHub, by leveraging the "shorthand syntax". Follow this guide:

  • In your bower.json, install private repos using the syntax "organization/repo".
  • Create or modify your .bowerrc file, adding this line: "shorthand-resolver": "[email protected]:{{owner}}/{{package}}.git". This tells bower to normally access GitHub using SSH, so that you have access to your private repos.
  • Create a personal access token from your GitHub account security page. Unfortunately, GitHub doesn't allow to limit the token to access to a specific repo (nor a specific organization). If you feel uncomfortable with this, you need to create a new dummy GitHub user, grant it access to the repo(s) that you need to access from Heroku, and then create a personal access token for this user.
  • Save the token in the Heroku enviornment as GITHUB_AUTH_TOKEN.

The buildpack will then automatically instruct bower to access your repos through the token instead of using SSH (for which it wouldn't have access).

Notes

  • Everything is cached after first download: npm, bower, gems
  • If you're upgrading from another grunt/gulp/bower/nodejs buildpack/fork, the process might fail because of a different use of the build cache. You're advised to purge the build cache of your project, by running: heroku plugins:install https://github.com/heroku/heroku-repo.git; heroku repo:purge_cache -a appname

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.