Giter Site home page Giter Site logo

6pm's Introduction

πŸ•• - 6pm

6pm is a NPM for raku

Create META6.json

$ mkdir TestProject
$ cd TestProject/
$ 6pm init
Project name [TestProject]:
Project tags:
raku version [6.*]:

Locally install a Module

$ 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

$ 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

$ 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

$ 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

$ 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

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]

6pm's People

Contributors

fco avatar jj avatar m-dango avatar massa avatar zoffixznet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

6pm's Issues

Fix exec-file

exec-file should search for perl6-modules at the file path and it’s parents, not locally (.)

Project description is needed

I looked at the readme on https://github.com/FCO/6pm and in the first minute couldn't figure out what's the goal of the project.

I think a sentence or two describing the goals of the project can make things easier for contributors/users.

Also, the description on github needs to be set also:
image

6pm can't install versioned modules

It looks like 6pm doesn't handle versioned modules well, possibly due to unescaped angle brackets.

Using 6pm install on this repository:

/bin/sh: 1: cannot open 1.4: No such file
Deu ruim
  in method install at /home/dango/.langenv/p6env/versions/2019.07.1/share/perl6/site/sources/4514D966EC824C9272A8DB6189CD3E49035DF6FB line 71
  in method install-deps at /home/dango/.langenv/p6env/versions/2019.07.1/share/perl6/site/sources/4514D966EC824C9272A8DB6189CD3E49035DF6FB line 54
  in sub MAIN at /home/dango/.langenv/p6env/versions/2019.07.1/share/perl6/site/resources/90153BB71951572448809B8C20ABD2786B4344D4 line 18
  in block <unit> at /home/dango/.langenv/p6env/versions/2019.07.1/share/perl6/site/resources/90153BB71951572448809B8C20ABD2786B4344D4 line 11
  in sub MAIN at /home/dango/.langenv/p6env/versions/2019.07.1/share/perl6/site/bin/6pm line 3
  in block <unit> at /home/dango/.langenv/p6env/versions/2019.07.1/share/perl6/site/bin/6pm line 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.