Skip to content

Commit

Permalink
refactor: move to zef
Browse files Browse the repository at this point in the history
: commit title
  • Loading branch information
Fernando Corrêa de Oliveira committed Aug 8, 2024
1 parent 6e7d1c9 commit b69821a
Show file tree
Hide file tree
Showing 14 changed files with 236 additions and 101 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
**/.precomp
**/.precomp
raku-modules
SixPM-0.0.11.tar.gz
SixPM-0.0.11
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Revision history for SixPM

{{$NEXT}}
- Initial version
91 changes: 47 additions & 44 deletions META6.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,50 @@
{
"name": "6pm",
"support": {
"source": "git://github.com/FCO/6pm.git"
},
"bin": {
"6pm": "bin/6pm"
},
"perl": "v6.*",
"build-depends": [

],
"scripts": {
"test": "zef test ."
},
"depends": [
"zef",
"JSON::Class:auth<zef:jonathanstowe>"
],
"tags": [
"PACKAGE",
"INSTALL",
"CLI",
"DEVEL",
"TERMINAL",
"UTILS",
"COMMAND LINE"
],
"license": "Artistic-2.0",
"test-depends": [
"Test::Mock",
"Test::META"
],
"provides": {
"App::six-pm::Installer": "lib/App/six-pm/Installer.pm6",
"App::six-pm::Meta6": "lib/App/six-pm/Meta6.pm6",
"App::six-pm::SixPM": "lib/App/six-pm/SixPM.pm6",
"App::six-pm::ZefInstaller": "lib/App/six-pm/ZefInstaller.pm6",
"SixPM": "lib/SixPM.pm6"
},
"production": false,
"version": "0.0.11",
"authors": [
"Fernando Correa de Oliveira"
"auth": "zef:FCO",
"authors": [
"Fernando Correa de Oliveira"
],
"description": "Raku module dependency manager (aka npm for Raku)"
"bin": {
"6pm": "bin/6pm"
},
"build-depends": [
],
"depends": [
"zef",
"JSON::Class:auth<zef:jonathanstowe>"
],
"description": "Raku module dependency manager (aka npm for Raku)",
"license": "Artistic-2.0",
"name": "SixPM",
"perl": "v6.*",
"production": true,
"provides": {
"App::six-pm::Installer": "lib/App/six-pm/Installer.rakumod",
"App::six-pm::Meta6": "lib/App/six-pm/Meta6.rakumod",
"App::six-pm::SixPM": "lib/App/six-pm/SixPM.rakumod",
"App::six-pm::ZefInstaller": "lib/App/six-pm/ZefInstaller.rakumod",
"SixPM": "lib/SixPM.rakumod"
},
"resources": [
],
"scripts": {
"test": "zef test ."
},
"source-url": "https://github.com/FCO/6pm.git",
"support": {
"source": "git://github.com/FCO/6pm.git"
},
"tags": [
"PACKAGE",
"INSTALL",
"CLI",
"DEVEL",
"TERMINAL",
"UTILS",
"COMMAND LINE"
],
"test-depends": [
"Test::Mock",
"Test::META"
],
"version": "0.0.11"
}
40 changes: 24 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
![](https://github.com/FCO/6pm/workflows/linux/badge.svg)
# 🕕 - 6pm
🕕 - 6pm
=======

6pm is a NPM for raku

## Create META6.json
Create META6.json
-----------------

```
```bash
$ mkdir TestProject
$ cd TestProject/
$ 6pm init
Expand All @@ -14,54 +15,60 @@ Project tags:
raku version [6.*]:
```

## Locally install a Module
Locally install a Module
------------------------

```
```bash
$ 6pm install Heap
===> Searching for: Heap
===> Testing: Heap:ver('0.0.1')
===> Testing [OK]: Heap:ver('0.0.1')
===> Installing: Heap:ver('0.0.1')
```

## Locally install a Module and add it on depends of META6.json
Locally install a Module and add it on depends of META6.json
------------------------------------------------------------

```
```bash
$ 6pm install Heap --save
===> Searching for: Heap
===> Testing: Heap:ver('0.0.1')
===> Testing [OK]: Heap:ver('0.0.1')
===> Installing: Heap:ver('0.0.1')
```

## Run code using the local dependencies
Run code using the local dependencies
-------------------------------------

```
```bash
$ 6pm exec -- raku -MHeap -e 'say Heap.new: <q w e r>'
Heap.new: [e r q w]
```

## Run a file using the local dependencies
Run a file using the local dependencies
---------------------------------------

```
```bash
$ echo "use Heap; say Heap.new: <q w e r>" > bla.p6
$ 6pm exec-file bla.p6
Heap.new: [e r q w]
```

## Make your code always use 6pm
Make your code always use 6pm
-----------------------------

```
```bash
$ echo "use SixPM; use Heap; say Heap.new: <q w e r>" > bla.p6
$ raku bla.p6
Heap.new: [e r q w]
```

## Running scripts
Running scripts
---------------

Add your script at your META6.json scripts field and run it with:

```
```bash
$ cat META6.json
{
"name": "TestProject",
Expand Down Expand Up @@ -96,3 +103,4 @@ $ cat META6.json
$ 6pm run my-script
Heap.new: [0 1 2 3 4 5 6 7 8 9]
```

10 changes: 10 additions & 0 deletions dist.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name = 6pm

[ReadmeFromPod]
; enable = false
filename = lib/SixPM.rakumod

[PruneFiles]
; match = ^ 'xt/'

[UploadToZef]
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/App/six-pm/Meta6.pm6 → lib/App/six-pm/Meta6.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ has Str $.version is json-skip-null is rw = "0.0.1";
has Str $.description is json-skip-null is rw = "";
has Str @.authors is json-skip-null is rw = [%*ENV<USER> // Empty];
has Str %.provides is json-skip-null is rw;
has Str %.bin is json-skip-null is rw;
has Str %.bin is json-skip-null is rw;
has Str %.emulates is json-skip-null is rw;
has Str %.supersedes is json-skip-null is rw;
has Str %.superseded-by is json-skip-null is rw;
Expand All @@ -25,7 +25,7 @@ has Bool $.production is json-skip-null is rw = False;
has Str $.license is json-skip-null is rw = "https://opensource.org/licenses/Artistic-2.0";
has Str @.tags is json-skip-null is rw;
has Str $.source-url is json-skip-null is rw;
has Str %.scripts is json-skip-null is rw = {
has Str %.scripts is json-skip-null is rw = {
test => "zef test ."
}

Expand Down
File renamed without changes.
File renamed without changes.
26 changes: 0 additions & 26 deletions lib/SixPM.pm6

This file was deleted.

Loading

0 comments on commit b69821a

Please sign in to comment.