diff --git a/META6.json b/META6.json index 5129362..0b9f820 100644 --- a/META6.json +++ b/META6.json @@ -5,29 +5,17 @@ }, "bin": { "6pm": "bin/6pm" - }, - "emulates": { - }, "perl": "v6.*", - "resources": { - - }, "build-depends": [ ], "scripts": { "test": "zef test ." - }, - "excludes": { - - }, - "superseded-by": { - }, "depends": [ "zef", - "JSON::Class" + "JSON::Class:auth" ], "tags": [ "PACKAGE", @@ -52,10 +40,8 @@ }, "production": false, "version": "0.0.11", - "supersedes": { - }, "authors": [ "Fernando Correa de Oliveira" ], - "description": "Perl6 module dependency manager (aka npm for Perl6)" + "description": "Raku module dependency manager (aka npm for Raku)" } diff --git a/README.md b/README.md index 4f1d00d..e6178c1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![](https://github.com/FCO/6pm/workflows/linux/badge.svg) # 🕕 - 6pm -6pm is a NPM for perl6 +6pm is a NPM for raku ## Create META6.json @@ -11,7 +11,7 @@ $ cd TestProject/ $ 6pm init Project name [TestProject]: Project tags: -perl6 version [6.*]: +raku version [6.*]: ``` ## Locally install a Module @@ -37,7 +37,7 @@ $ 6pm install Heap --save ## Run code using the local dependencies ``` -$ 6pm exec -- perl6 -MHeap -e 'say Heap.new: ' +$ 6pm exec -- raku -MHeap -e 'say Heap.new: ' Heap.new: [e r q w] ``` @@ -53,7 +53,7 @@ Heap.new: [e r q w] ``` $ echo "use SixPM; use Heap; say Heap.new: " > bla.p6 -$ perl6 bla.p6 +$ raku bla.p6 Heap.new: [e r q w] ``` @@ -72,7 +72,7 @@ $ cat META6.json ], "scripts": { "test": "zef test .", - "my-script": "perl6 -MHeap -e 'say Heap.new: ^10'" + "my-script": "raku -MHeap -e 'say Heap.new: ^10'" }, "depends": [ diff --git a/bin/6pm b/bin/6pm index df0dfd8..db0bd8d 100755 --- a/bin/6pm +++ b/bin/6pm @@ -1,4 +1,4 @@ -#!/usr/bin/env perl6 +#!/usr/bin/env raku use v6; use App::six-pm::SixPM; my $*MAIN-ALLOW-NAMED-ANYWHERE = True; @@ -6,7 +6,7 @@ my $*MAIN-ALLOW-NAMED-ANYWHERE = True; my $*DEBUG = so %*ENV<_6PM_DEBUG>; my IO::Path $base-dir = ".".IO.resolve; -my IO::Path $default-to = $base-dir.child: "perl6-modules"; +my IO::Path $default-to = $base-dir.child: "raku-modules"; my $six-pm = SixPM.new: :$base-dir, :$default-to; @@ -31,7 +31,7 @@ multi MAIN("exec", +@argv) { } multi MAIN("exec-file", $file, +@argv) { - $six-pm.exec: ["perl6", $file, |@argv], :path($file.IO); + $six-pm.exec: ["raku", $file, |@argv], :path($file.IO); } multi MAIN("run", Str() $script) { diff --git a/lib/App/six-pm/Meta6.pm6 b/lib/App/six-pm/Meta6.pm6 index f393022..e40c21d 100644 --- a/lib/App/six-pm/Meta6.pm6 +++ b/lib/App/six-pm/Meta6.pm6 @@ -1,4 +1,4 @@ -use JSON::Class; +use JSON::Class:auth; unit class App::six-pm::Meta6 does JSON::Class; diff --git a/lib/App/six-pm/SixPM.pm6 b/lib/App/six-pm/SixPM.pm6 index 0bc6fde..3fe840f 100644 --- a/lib/App/six-pm/SixPM.pm6 +++ b/lib/App/six-pm/SixPM.pm6 @@ -12,7 +12,7 @@ class SixPM { method get-project-name { prompt "Project name [{$!meta.name}]: " } method get-project-tags { prompt("Project tags (separated by space): ") } - method get-perl6-version { prompt "perl6 version [{$!meta.perl}]: " } + method get-raku-version { prompt "raku version [{$!meta.perl}]: " } method init(:$name, :@tags, :$perl-version) { unless $!meta { @@ -27,7 +27,7 @@ class SixPM { with $perl-version -> $perl { $!meta.perl = $perl } else { - if $.get-perl6-version -> $perl { + if $.get-raku-version -> $perl { $!meta.perl = $perl } } @@ -41,7 +41,7 @@ class SixPM { } method install-deps(Bool :f(:$force)) { - %*ENV = "inst#{$!default-to.absolute}"; + %*ENV = "inst#{$!default-to.absolute}"; %*ENV ~= ":{$!default-to.absolute}/bin"; if $!meta and @@ -58,7 +58,7 @@ class SixPM { } method install(+@modules, Bool :f(:$force), Bool :$save, Bool :$save-test, Bool :$save-build) { - %*ENV = "inst#{$!default-to.absolute}"; + %*ENV = "inst#{$!default-to.absolute}"; %*ENV ~= ":{$!default-to.absolute}/bin"; if $.installer.install(|@modules, :to($!default-to.absolute), :$force) { if $save { @@ -78,13 +78,13 @@ class SixPM { } else { $!default-to.absolute } - %*ENV = "inst#{$inst}"; + %*ENV = "inst#{$inst}"; %*ENV ~= ":{$inst}/bin"; run |@argv } method run(Str() $script) { - %*ENV = "inst#{$!default-to.absolute}"; + %*ENV = "inst#{$!default-to.absolute}"; %*ENV ~= ":{$!default-to.absolute}/bin"; shell $_ with $!meta.scripts{$script} } diff --git a/lib/SixPM.pm6 b/lib/SixPM.pm6 index 9d623b2..f83efff 100644 --- a/lib/SixPM.pm6 +++ b/lib/SixPM.pm6 @@ -3,11 +3,11 @@ no precompilation; sub find-sixpm-path($cwd is copy = $*PROGRAM.resolve.parent) { repeat { last if $++ > 10; - my $p6m = $cwd.child("perl6-modules"); + my $p6m = $cwd.child("raku-modules"); return $p6m.resolve if $p6m.d; $cwd .= parent } while $cwd.resolve.absolute !~~ "/"; - "./perl6-modules".IO + "./raku-modules".IO } sub EXPORT($find-path?) { @@ -16,7 +16,7 @@ sub EXPORT($find-path?) { use MONKEY-SEE-NO-EVAL; EVAL "use lib 'inst#{$path.absolute}'"; } else { - die "'perl6-modules' not found"; + die "'raku-modules' not found"; } } diff --git a/t/00-test-meta.t b/t/00-test-meta.t index 24f99a8..72b8ace 100644 --- a/t/00-test-meta.t +++ b/t/00-test-meta.t @@ -1,4 +1,4 @@ -#!perl6 +#!raku use v6; use lib 'lib'; diff --git a/t/01-six-pm.t b/t/01-six-pm.t index a1a1bb0..5b631f6 100644 --- a/t/01-six-pm.t +++ b/t/01-six-pm.t @@ -44,7 +44,7 @@ sub name is rw { state $a } $_6pm does role :: { has $.get-project-name is rw = "my_test"; has $.get-project-tags is rw = "bla ble bli"; - has $.get-perl6-version is rw = "v6.*"; + has $.get-raku-version is rw = "v6.*"; }; $_6pm.init;