File: vcs.coffee

Defined in: lib/resin/vcs

Variables Summary

exports.initProjectWithApplication =
git
TODO: This function should be better tested
Note: The directory should already be a git repo (maybe we should take care of git init as well here if necessary?)

Initialize an application project

  • Add the corresponding git remote.
resin.models.application.get 91, (error, application) ->    throw error if error?
resin.vcs.initProjectWithApplication application, 'my/new/project', (error) ->
        throw error if error?

Parameters:

  • application ( Object ) an application from resin API
  • directory ( String ) the directory to initialize
  • callback ( Function ) callback(error)

Throws:

  • ( Error ) — Will throw if application is not a valid application
exports.isResinProject =
git
TODO: Find a way to test this function

Check if an application was already initialized

It checks if we have a resin remote added already.

resin.vcs.isResinProject 'my/resin/app', (error, initialized) ->    if initialized
        console.log('It\'s already a resin app!')    else
        console.log('It\'s just a boring project! It should be resinified!')

Parameters:

  • directory ( String ) the directory
  • callback ( Function ) callback(error, isResinProject)

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: