Sha256: 12923c6818929b12feae0d6f4de8d28f6844c056626fa2ad68bdfe1f63bb82a1
Contents?: true
Size: 1.13 KB
Versions: 11
Compression:
Stored size: 1.13 KB
Contents
require "cocaine" module EmberCli class Command def initialize(paths:, options: {}) @paths = paths @options = options end def test line = Cocaine::CommandLine.new(paths.ember, "test --environment test") line.command end def build(watch: false) ember_build(watch: watch) end private attr_reader :options, :paths def process_watcher options.fetch(:watcher) { EmberCli.configuration.watcher } end def silent? options.fetch(:silent) { false } end def ember_build(watch: false) line = Cocaine::CommandLine.new(paths.ember, [ "build", ("--watch" if watch), ("--watcher :watcher" if process_watcher), ("--silent" if silent?), "--environment :environment", "--output-path :output_path", ].compact.join(" ")) line.command( environment: build_environment, output_path: paths.dist, watcher: process_watcher, ) end def build_environment if EmberCli.env == "production" "production" else "development" end end end end
Version data entries
11 entries across 11 versions & 1 rubygems