All Projects → minhajuddin → mix_script

minhajuddin / mix_script

Licence: MIT license
A build tool which allows you to use mix packages in an elixir script

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to mix script

shipit
ShipIt automates Hex package publishing to avoid common mistakes
Stars: ✭ 21 (+31.25%)
Mutual labels:  hex, mix
ios-build-action
Build iOS project (.xcodeproj, .xcworkspace), export .ipa, optional upload to BrowserStack App Live.
Stars: ✭ 73 (+356.25%)
Mutual labels:  build
mix under
Execute mix tasks under Elixir umbrella applications
Stars: ✭ 19 (+18.75%)
Mutual labels:  mix
open-electronics
📚 💻 Great Resources for Electronics Enthusiasts
Stars: ✭ 347 (+2068.75%)
Mutual labels:  build
bulbo
🍹 Generate your static site with gulp plugins!
Stars: ✭ 14 (-12.5%)
Mutual labels:  build
data-encoding
Efficient and customizable data-encoding functions in Rust
Stars: ✭ 92 (+475%)
Mutual labels:  hex
node-less-chokidar
Watch and build CSS from LESS, compatible with Create React App
Stars: ✭ 21 (+31.25%)
Mutual labels:  build
get-cmake
Install and Cache latest CMake and ninja executables for your workflows on your GitHub
Stars: ✭ 52 (+225%)
Mutual labels:  build
HexMate
High-performance hex encoding and decoding for .NET
Stars: ✭ 36 (+125%)
Mutual labels:  hex
sphinx-markdown-builder
sphinx builder that outputs markdown files.
Stars: ✭ 135 (+743.75%)
Mutual labels:  build
abacus
Abacus is a tool to simplify the handling of units
Stars: ✭ 22 (+37.5%)
Mutual labels:  hex
Farge
🎈Tell the name of hex color
Stars: ✭ 23 (+43.75%)
Mutual labels:  hex
pyrocms-cheatsheet
Pyro CMS - Cheat Sheet
Stars: ✭ 17 (+6.25%)
Mutual labels:  mix
colour
Validate colours.
Stars: ✭ 31 (+93.75%)
Mutual labels:  hex
SwiftRadix
Easily convert integers to binary/hex/octal strings and back again with clean functional syntax.
Stars: ✭ 34 (+112.5%)
Mutual labels:  hex
build-plugin-template
Template repository to create new Netlify Build plugins.
Stars: ✭ 26 (+62.5%)
Mutual labels:  build
defold-deployer
Universal build && deploy script for Defold projects
Stars: ✭ 23 (+43.75%)
Mutual labels:  build
gradle-android-appiconoverlay
Plugin for Android Gradle to automatically overlay the app icon with the current git commit SHA1.
Stars: ✭ 64 (+300%)
Mutual labels:  build
mix gleam
⚗️ Build Gleam code with mix
Stars: ✭ 84 (+425%)
Mutual labels:  mix
ionic4-angular8-crud-mobileapps-example
Ionic 4 Angular 8 Tutorial: Learn to Build CRUD Mobile Apps
Stars: ✭ 20 (+25%)
Mutual labels:  build

MixScript

A build utility that allows you to to use mix packages in an elixir script.

Example

Let us say, you have a file at ~/scripts/elixir_curl.exs

mix_dep {:httpotion, ">0.0.0"}

if args == [] do
  IO.puts "invalid args"
else
  IO.inspect HTTPotion.get(hd args)
end

You can run the following:

# compile our elixir script
mix_script compile ~/scripts/elixir_curl.exs
# run it with args
~/scripts/elixir_curl http://google.com
> %HTTPotion.Response{body: "<HTML><HEAD><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\n<TITLE>302 Moved</TITLE></HEAD><BODY>\n<H1>302 Moved</H1>\nThe document has moved\n<A HREF=\"http://www.google.co.in/?gfe_rd=cr&amp;ei=DBAaWbWTLurx8AeKp4uwCg\">here</A>.\r\n</BODY></HTML>\r\n",
 headers: %HTTPotion.Headers{hdrs: %{"cache-control" => "private",
    "content-length" => "261", "content-type" => "text/html; charset=UTF-8",
    "date" => "Mon, 15 May 2017 20:31:08 GMT",
    "location" => "http://www.google.co.in/?gfe_rd=cr&ei=DBAaWbWTLurx8AeKp4uwCg",
    "referrer-policy" => "no-referrer"}}, status_code: 302}

Installation

mix escript.install hex mix_script

This will install the binary into your $HOME/.mix/escripts directory, so make sure that is part of your $PATH

TODO

  • Make this more efficient by using a common directory for the mix packages
  • Make it usable via a shebang #!/usr/bin/env mix_script which does compilation and execution
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].