Leiningen

16
@diego_pacheco Software Architect | Agile Coach "Leiningen!" he shouted. "You're insane! They're not creatures you can fight--they're an elemental--an 'act of God!' Ten miles long, two miles wide--ants, nothing but ants! And every single one of them a fiend from hell..." -- from Leiningen Versus the Ants by Carl Stephenson

description

Leiningen, lein, build, dev, clojure,function,fp

Transcript of Leiningen

Page 1: Leiningen

@diego_pachecoSoftware Architect | Agile Coach

"Leiningen!" he shouted. "You're insane! They're not creatures you can fight--they're an elemental--an 'act of God!' Ten miles long, two miles

wide--ants, nothing but ants! And every single one of them a fiend from hell..." -- from Leiningen Versus the Ants by Carl Stephenson

Page 2: Leiningen

Leiningen

A Clojure Build Tool

Page 3: Leiningen

Leiningen

Page 4: Leiningen

Leiningen

http://clojars.org/

Page 5: Leiningen

Leiningen

How to Install?

$ wget http://github.com/technomancy/leiningen/raw/stable/bin/lein

$ chmod +x lein

$ lein self-install

1. Dowload the file https://raw.github.com/technomancy/leiningen/stable/bin/lein.bat2. Save as lein.bat ,put in windows PATH.

$ lein self-install

Page 6: Leiningen

Leiningen

Maven Repositories

Central

Clojure

Clojure Snapshots

Clojars

Page 7: Leiningen

Leiningen

Some lein commands:

$ new

$ deps

$ compile

$ test

$ jar

$ clean

Page 8: Leiningen

Leiningen

$ lein new testCreated new project in: C:\tmp\lein\test

[project.clj]

Page 9: Leiningen

Leiningen

$ lein depsCopying 1 file to C:\tmp\lein\test\lib

$ lein compileNo namespaces to :aot compile listed in

project.clj.

$ lein jarCopying 1 file to C:\tmp\lein\test\lib

Created C:\tmp\lein\test/test-1.0.0-

SNAPSHOT.jar

$ lein testTesting test.test.core

FAIL in (replace-me) (core.clj:6)

No tests have been written.

expected: false

actual: false

Ran 1 tests containing 1 assertions.

1 failures, 0 errors.

Page 10: Leiningen

Leiningen

[core.clj]

[core.clj]

$ lein testTesting test.test.coreRan 1 tests containing 1 assertions.0 failures, 0 errors.

$ lein replREPL started; server listening on localhost port 36585user=> (use ‘test.core)niluser=> (soma 25 5)30user=>

C:\tmp\lein\test\src\test

C:\tmp\lein\test\test\test\test

Page 11: Leiningen

Leiningen

$ lein plugin install <plugin> <version>

Page 12: Leiningen

Leiningen

Page 13: Leiningen

Leiningen

Page 14: Leiningen

Leiningen

Page 15: Leiningen

Leiningen

Page 16: Leiningen

@diego_pachecoSoftware Architect | Agile Coach

"Leiningen!" he shouted. "You're insane! They're not creatures you can fight--they're an elemental--an 'act of God!' Ten miles long, two miles

wide--ants, nothing but ants! And every single one of them a fiend from hell..." -- from Leiningen Versus the Ants by Carl Stephenson

(lein thank :you)