Sha256: 36866408a67165720a3c16ef5e1c7e26bd85a5abd00a4f9da1b7c399a42e8ae9
Contents?: true
Size: 783 Bytes
Versions: 18
Compression:
Stored size: 783 Bytes
Contents
module Retreaver class Compile class << self def perform Dir.chdir(root) do |f| run("npm install") unless Dir.exist?('./node_modules') # compile src run("grunt") output = 'vendor/assets/javascripts/' FileUtils.rm_rf(output) FileUtils.mkdir_p(output) Dir.glob('dist/*.js') { |f| FileUtils.cp(f, output) } # generate jsdocs output = 'vendor/documentation/javascripts/' FileUtils.rm_rf(output) run("./node_modules/.bin/jsdoc -c config/jsdocs.json") end end def run(command) puts(command) system(command) end def root File.expand_path(File.join(__FILE__, '../../../')) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems