{"id":26365,"library":"scarletsframe-compiler","title":"ScarletsFrame Compiler","description":"A Gulp-based compiler for ScarletsFrame, a framework for building web components with .sf files. Version 0.7.2 is the latest stable release. It compiles .sf files into JavaScript, CSS, and HTML, and integrates with BrowserSync for live reloading. Differentiators include a macro system for appending HTML to body and file path injection via #this.path. The project appears to be low-maintenance with infrequent updates.","status":"active","version":"0.7.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install scarletsframe-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add scarletsframe-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add scarletsframe-compiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Build system for compiling .sf files","package":"gulp","optional":false},{"reason":"Live reloading during development","package":"browser-sync","optional":false}],"imports":[{"note":"Package does not provide ESM exports; use CommonJS require.","wrong":"import sfcompiler from 'scarletsframe-compiler';","symbol":"default","correct":"const sfcompiler = require('scarletsframe-compiler');"},{"note":"No default export; the module itself is the compiler.","wrong":"const sfcompiler = require('scarletsframe-compiler').default;","symbol":"sfcompiler","correct":"const sfcompiler = require('scarletsframe-compiler');"},{"note":"The package exposes Gulp tasks; no specific function exports documented.","wrong":"","symbol":"Gulp tasks","correct":"const { task } = require('gulp');\nconst sfcompiler = require('scarletsframe-compiler');"}],"quickstart":{"code":"// Install dependencies\n// npm install gulp browser-sync scarletsframe-compiler --save-dev\n\n// gulpfile.js\nconst gulp = require('gulp');\nconst browserSync = require('browser-sync').create();\nconst sfcompiler = require('scarletsframe-compiler');\n\n// Use sfcompiler to define tasks (example from default template)\ngulp.task('compile', function() {\n  return gulp.src('src/**/*.sf')\n    .pipe(sfcompiler())\n    .pipe(gulp.dest('dist'));\n});\n\ngulp.task('serve', function() {\n  browserSync.init({\n    server: { baseDir: './' }\n  });\n  gulp.watch('src/**/*.sf', gulp.series('compile')).on('change', browserSync.reload);\n});\n\ngulp.task('default', gulp.series('compile', 'serve'));","lang":"javascript","description":"Shows how to set up a Gulp task using scarletsframe-compiler to compile .sf files and serve with BrowserSync."},"warnings":[{"fix":"Install gulp and browser-sync as devDependencies.","message":"Requires Gulp and BrowserSync as peer dependencies; not a standalone compiler.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use require instead of import statements.","message":"No ESM exports; only CommonJS require works.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Check changelog for migration steps.","message":"API changes between 0.5.x and 0.6.x may break existing gulpfile configurations.","severity":"breaking","affected_versions":">=0.6.0"},{"fix":"Use alternative template engines or avoid relying on it.","message":"The #this.path injection in JavaScript macros is a non-standard feature; may be removed in future versions.","severity":"deprecated","affected_versions":">=0.7.0"},{"fix":"Change line endings to LF in your editor.","message":"Windows users must set text encoding to Unix (LF) in Sublime Text to avoid compilation issues.","severity":"gotcha","affected_versions":">=0.0.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 scarletsframe-compiler --save-dev","cause":"Package not installed or missing from node_modules.","error":"Error: Cannot find module 'scarletsframe-compiler'"},{"fix":"Upgrade to gulp 4: npm install gulp@4 --save-dev","cause":"Using gulp 3.x which does not have gulp.series; requires gulp 4+.","error":"gulp.series is not a function"},{"fix":"Use const sfcompiler = require('scarletsframe-compiler');","cause":"Wrong import style (ESM default import instead of CommonJS).","error":"TypeError: sfcompiler is not a function"},{"fix":"Ensure you are not using browser-only APIs in .sf files that are processed server-side.","cause":"Browser-specific code used in Node.js context (e.g., BrowserSync).","error":"ReferenceError: window is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}