6pm is a NPM for raku
$ mkdir TestProject
$ cd TestProject/
$ 6pm init
Project name [TestProject]:
Project tags:
raku version [6.*]:
$ 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')
$ 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')
$ 6pm exec -- raku -MHeap -e 'say Heap.new: <q w e r>'
Heap.new: [e r q w]
$ echo "use Heap; say Heap.new: <q w e r>" > bla.p6
$ 6pm exec-file bla.p6
Heap.new: [e r q w]
$ echo "use SixPM; use Heap; say Heap.new: <q w e r>" > bla.p6
$ raku bla.p6
Heap.new: [e r q w]
Add your script at your META6.json scripts field and run it with:
$ cat META6.json
{
"name": "TestProject",
"source-url": "",
"perl": "6.*",
"resources": [
],
"scripts": {
"test": "zef test .",
"my-script": "raku -MHeap -e 'say Heap.new: ^10'"
},
"depends": [
],
"test-depends": [
"Test",
"Test::META"
],
"provides": {
},
"tags": [
],
"version": "0.0.1",
"authors": [
"fernando"
],
"description": ""
}
$ 6pm run my-script
Heap.new: [0 1 2 3 4 5 6 7 8 9]