Build and Preview
Start with a working Makoo project, produce an installable userscript, and check the build on a real target page.
Build the script
pnpm buildThe project script should run makoo build. Vite’s build.outDir controls the output directory, normally dist when unset. The script filename defaults to ${app.name}.user.js and can be set through monkey.build.fileName.
For example, app.name: 'my-script' produces dist/my-script.user.js. A .meta.js file is produced only when metadata-file generation is configured.
Check metadata
Open the userscript metadata at the top of the output and verify:
@nameand@versionmatch your release.@matchincludes the intended pages.@grant,@connect,@require, and@resourcematch the capabilities you use.
See Configuration. Check automatically inferred permissions in the actual output.
Preview and install
pnpm previewmakoo preview serves the build directory; it uses the output from the previous build. Open the printed URL, use the page’s userscript installation entry to install the output, and visit a matching page to verify the feature.
Disable the development script for the same feature in your manager before testing the release script, to avoid duplicate mounts. Release output does not depend on the local dev server.
Output directories and debug builds
pnpm exec makoo build --outDir release
pnpm exec makoo preview --outDir releaseUse the same output directory for build and preview. Editing source without rebuilding leaves preview serving the previous output.
To investigate a build-only issue, disable minification and emit source maps:
pnpm exec makoo build --sourcemap --no-minifySee CLI Commands for all options.
Distribution
Provide the built .user.js file for users to install. When distributing through a website, users can open the .user.js link to install it in their script manager.