Module: Staticz

Defined in:
lib/server.rb,
lib/builder.rb,
lib/staticz.rb,
lib/settings.rb,
lib/manifest/sub.rb,
lib/modules/reload.rb,
lib/manifest/manifest.rb,
lib/manifest/js_bundle.rb,
lib/modules/lib_loader.rb,
lib/manifest/compilable.rb,
lib/manifest/css_bundle.rb,
lib/commands/new_command.rb,
lib/commands/base_command.rb,
lib/commands/build_command.rb,
lib/manifest/compilable/cs.rb,
lib/manifest/compilable/js.rb,
lib/commands/server_command.rb,
lib/manifest/compilable/haml.rb,
lib/manifest/compilable/scss.rb,
lib/manifest/compilable/slim.rb,
lib/commands/manifest_command.rb,
lib/manifest/compilable/react.rb,
lib/manifest/compilable/simple_file.rb

Defined Under Namespace

Modules: Compilable, Modules, Template, Templates Classes: BaseCommand, BuildCommand, BuildListener, Builder, CSSBundle, JSBundle, Manifest, ManifestCommand, NewCommand, Server, ServerCommand, Settings, Sub

Constant Summary collapse

VERSION =
"1.1.6"

Class Method Summary collapse

Class Method Details

.initObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/staticz.rb', line 11

def self.init
  cmd, args = case ARGV[0]
  when "new"
    [Staticz::NewCommand.new, ARGV[1..]]
  when "server"
    [Staticz::ServerCommand.new, ARGV[1..]]
  when "manifest"
    [Staticz::ManifestCommand.new, ARGV[1..]]
  when "build"
    [Staticz::BuildCommand.new, ARGV[1..]]
  else
    [Staticz::BaseCommand.new, ARGV]
  end

  cmd.parse args
  cmd.run
end