Sha256: a61bf3118ab88c86c52c128337961a8509b0266ff354633a4e25b90a81993837
Contents?: true
Size: 788 Bytes
Versions: 6
Compression:
Stored size: 788 Bytes
Contents
# frozen_string_literal: true require "snowpack/cli/command" require "snowpack/generators/application/generator" module Snowpack module CLI module Standalone module Commands class New < Command argument :path, desc: "Path for new application" option :name, desc: "Name for the application" def call(path:, name: nil, **) name ||= path # TODO raise ArgumentError, "invalid name application" out.puts "Generating into #{path}..." generator = Generators::Application::Generator.new generator.(path, name) out.puts "Bootstrapping..." system "#{path}/script/bootstrap" end end register "new", New end end end end
Version data entries
6 entries across 6 versions & 1 rubygems