Class: GulpRunner::Gulp

Inherits:
Object
  • Object
show all
Defined in:
lib/gulp-runner/gulp.rb

Class Method Summary collapse

Class Method Details

.cwdObject



16
17
18
# File 'lib/gulp-runner/gulp.rb', line 16

def self.cwd
  GulpRunner.node_modules_path
end

.gulpObject



20
21
22
23
24
25
26
27
28
# File 'lib/gulp-runner/gulp.rb', line 20

def self.gulp
  begin
      gulp = CommandUtils.get_command('gulp')
    rescue
      $stderr.puts ["Gulp.js not found! You can install Gulp.js using Node and npm:",
      "$ npm install gulp -g",
      "For more info see http://gulpjs.com/"].join("\n")
    end
end

.gulp_file_pathObject



12
13
14
# File 'lib/gulp-runner/gulp.rb', line 12

def self.gulp_file_path
  GulpRunner.gulp_file_path
end

.listObject



3
4
5
# File 'lib/gulp-runner/gulp.rb', line 3

def self.list
    `#{gulp} --cwd #{cwd} --tasks`
end

.run(task_name = "default") ⇒ Object



7
8
9
# File 'lib/gulp-runner/gulp.rb', line 7

def self.run(task_name = "default")
  `#{gulp} --cwd #{cwd} #{task_name}`
end