gulp-racket

2.0.1 • Public • Published

Dependencies:

Detailed Installation Guide for gulp-racket and RacketScript

1. Install gulp-racket via npm

npm install --save-dev gulp-racket

2. Download or clone RacketScript

Official repo: https://github.com/racketscript/racketscript

git clone https://github.com/racketscript/racketscript.git
cd racketscript
# (Optional: checkout to a specific branch or version)

3. Install RacketScript dependencies (requires Racket to be installed)

raco pkg install --auto racketscript

Note:
If you use snap/flatpak or another way to install Racket, make sure the raco command works and the package is installed for the correct Racket version.

4. Add the racks binary folder to your PATH

The racks executable is located in racketscript/racketscript-compiler/bin.
Add this folder to your PATH for your session (replace /path/to/racketscript with your actual path):

export PATH="$HOME/path-to-your-project/racketscript/racketscript-compiler/bin:$PATH"

You can add this line to your ~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish so it is always available.

5. Verify the installation

Run:

racks --help

You should see the RacketScript Compiler command help.

6. Use gulp-racket in your gulpfile.js

Example:

const gulp = require('gulp');
const racket = require('gulp-racket');

gulp.task('default', () =>
  gulp.src('src/index.rkt')
      .pipe(racket())
      .pipe(gulp.dest('dist'))
);

Common problems

  • racks command not found:
    Make sure your PATH includes racketscript/racketscript-compiler/bin.
  • Complex numbers error:
    Complex numbers are not supported by JavaScript; rewrite your code to avoid them.
  • JS doesn't work in the browser:
    The generated JS uses ES6 modules and runtime files. Use <script type="module"> and run through a local server.

Links

Usage:

import racketTransform from 'gulp-racket';

const racket = () => {
  return gulp
    .src('./src/*.rkt')
    .pipe(racketTransform(`./example/dist`))
    .pipe(gulp.dest(`./example/dist`));
};

Example usage: view example folder

Suggestions:

License: MIT License

Package Sidebar

Install

npm i gulp-racket

Weekly Downloads

129

Version

2.0.1

License

MIT

Unpacked Size

10.8 kB

Total Files

5

Last publish

Collaborators

  • fxhxyz