config = Configuration.read()

# desc “Builts the Kit: #{config} -> build” # task :default => [“build”]

desc “Version bumping” task “bump”, [:version] => [“build”] do |t, args|

if args[:version]
  config['version'] = args[:version]

  Rake::Task['npm:bump'].execute(
    config['version']
  )

  sh %{
    git commit -am "Version stamp #{config['version']}";
    git branch --show-current | git push origin $1
  }
end

end

desc “Tests the code: jest” task “test” do

sh %{
  #{NPM_BIN}/jest --config ./jest.config.json
}

end

desc “Watch and tests the code: jest” task “test:watch” do

sh %{
  #{NPM_BIN}/jest --config ./jest.config.json --watchAll
}

end