update “Installing a Language” section to refer to package manager
This commit is contained in:
parent
26cb89785b
commit
858ff7c67a
|
@ -220,25 +220,26 @@ Perfect!
|
||||||
@margin-note{See @other-manual['(lib "scribblings/raco/raco.scrbl")]
|
@margin-note{See @other-manual['(lib "scribblings/raco/raco.scrbl")]
|
||||||
for more information on using @exec{raco}.}
|
for more information on using @exec{raco}.}
|
||||||
|
|
||||||
You can also package a collection for others to install by using the
|
You can also make your language available for others to install by
|
||||||
@exec{raco pack} command-line tool:
|
using the Racket package manager (see @other-doc['(lib
|
||||||
|
"pkg/scribblings/pkg.scrbl")]). After you create a @filepath{literal}
|
||||||
|
package and register it with the Racket package catalog (see
|
||||||
|
@secref["concept:catalog" #:doc '(lib "pkg/scribblings/pkg.scrbl")]),
|
||||||
|
others can install it using @exec{raco pkg}:
|
||||||
|
|
||||||
@commandline{raco pack --collect literal.plt literal}
|
@commandline{raco pkg install literal}
|
||||||
|
|
||||||
Then, others can install the @filepath{literal} collection using
|
Once installed, others can invoke the language the same way: by using
|
||||||
@exec{raco setup}:
|
@racket[@#,hash-lang[] literal] at the top of a source file.
|
||||||
|
|
||||||
@commandline{raco setup -A literal.plt}
|
If you use a public source repository (e.g., GitHub), you can link
|
||||||
|
your package to the source. As you improve the package, others can
|
||||||
|
update their version using @exec{raco pkg}:
|
||||||
|
|
||||||
@margin-note{See @other-manual['(lib "planet/planet.scrbl")] for more
|
@commandline{raco pkg update literal}
|
||||||
information about @|PLaneT| packages.}
|
|
||||||
|
|
||||||
Another approach is to distribute your language as a @|PLaneT|
|
@margin-note{See @other-doc['(lib "pkg/scribblings/pkg.scrbl")] for more
|
||||||
package. A drawback of using a @|PLaneT| package is that users must
|
information about the Racket package manager.}
|
||||||
type @racket[@#,hash-lang[] @#,racketmodname[planet]] followed by a
|
|
||||||
@|PLaneT| path to access the language. The advantages are that the
|
|
||||||
@|PLaneT| package can be installed automatically, it can be versioned,
|
|
||||||
and it co-exists more easily with other packages.
|
|
||||||
|
|
||||||
@; ----------------------------------------
|
@; ----------------------------------------
|
||||||
@section[#:tag "language-get-info"]{Source-Handling Configuration}
|
@section[#:tag "language-get-info"]{Source-Handling Configuration}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user