{"id":25706,"library":"gulp-purescript","title":"gulp-purescript","description":"The gulp-purescript package (v2.0.1) is a Gulp plugin that wraps the PureScript compiler (purs) to automate compilation, bundling, and documentation generation tasks. It requires the PureScript binaries to be installed separately (e.g., via the 'purescript' npm package). The plugin's API mirrors PureScript commands: compile, bundle, and docs. Breaking changes in v2.0.0 renamed psc to compile, pscBundle to bundle, and pscDocs to docs, aligning with PureScript 0.11. The package is maintained by the PureScript community under purescript-contrib. It is a legacy tool suited for projects using older Gulp workflows; alternatives include direct use of purs or Spago.","status":"maintenance","version":"2.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/purescript-contrib/gulp-purescript","tags":["javascript","gulpplugin","purescript"],"install":[{"cmd":"npm install gulp-purescript","lang":"bash","label":"npm"},{"cmd":"yarn add gulp-purescript","lang":"bash","label":"yarn"},{"cmd":"pnpm add gulp-purescript","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency for gulp plugin compatibility","package":"gulp","optional":false}],"imports":[{"note":"ESM import works in modern setups; CJS require() also works.","wrong":"const purescript = require('gulp-purescript')","symbol":"default","correct":"import purescript from 'gulp-purescript'"},{"note":"Renamed from psc to compile in v2.0.0.","wrong":"import { psc } from 'gulp-purescript'","symbol":"compile","correct":"import { compile } from 'gulp-purescript'"},{"note":"Renamed from pscBundle to bundle in v2.0.0.","wrong":"import { pscBundle } from 'gulp-purescript'","symbol":"bundle","correct":"import { bundle } from 'gulp-purescript'"},{"note":"Renamed from pscDocs to docs in v2.0.0.","wrong":"import { pscDocs } from 'gulp-purescript'","symbol":"docs","correct":"import { docs } from 'gulp-purescript'"}],"quickstart":{"code":"import gulp from 'gulp';\nimport { compile, bundle, docs } from 'gulp-purescript';\n\nconst purescript = require('gulp-purescript');\n\ngulp.task('compile', function() {\n  return purescript.compile({\n    src: ['src/**/*.purs'],\n    output: 'output',\n    comments: false\n  });\n});\n\ngulp.task('bundle', function() {\n  return purescript.bundle({\n    src: 'output/**/*.js',\n    output: 'dist/bundle.js',\n    module: 'Main',\n    main: true\n  });\n});\n\ngulp.task('docs', function() {\n  return purescript.docs({\n    src: 'src/**/*.purs',\n    format: 'markdown'\n  });\n});","lang":"javascript","description":"Demonstrates compile, bundle, and docs tasks with common options."},"warnings":[{"fix":"Update your gulp tasks to use the new names: compile, bundle, docs","message":"psc, pscBundle, pscDocs functions renamed to compile, bundle, docs","severity":"breaking","affected_versions":"2.0.0"},{"fix":"Review and update options passed to each function, consult PureScript 0.11 compiler docs","message":"Options updated to match PureScript 0.11","severity":"breaking","affected_versions":"2.0.0"},{"fix":"Install the 'purescript' npm package or binaries via purescript.org","message":"Requires PureScript binaries installed separately","severity":"gotcha","affected_versions":">=0"},{"fix":"Return a stream or use async/await in your gulp task","message":"Gulp v4+ compatibility may require using async tasks or returning streams","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Use gulp --purs-rts-flags +RTS -N -RTS for runtime options","message":"RTS flags passed via --purs-rts-flags argument to gulp","severity":"gotcha","affected_versions":">=0.8.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev gulp-purescript","cause":"Package not installed or misspelled","error":"Error: Cannot find module 'gulp-purescript'"},{"fix":"Use purescript.compile() instead of purescript.psc()","cause":"Function renamed from psc to compile in v2.0.0","error":"TypeError: purescript.psc is not a function"},{"fix":"Install purescript npm package globally or locally: npm install purescript","cause":"PureScript binaries not installed","error":"purs: command not found"},{"fix":"Ensure your gulp task returns the stream: return purescript.compile(...)","cause":"Gulp v4 expects a function that returns a stream or promise","error":"TypeError: Cannot read property 'apply' of undefined (gulp task)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}