sass/node-sass-middleware là dự án mã nguồn mở trên GitHub với 261 sao, viết chủ yếu bằng JavaScript. connect middleware extracted from node-sass
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
[!WARNING]
LibSass has reached its end of life.
It will no longer receive updates of any kind. Users should migrate to
Dart Sass at their earliest convenience.
Connect/Express middleware for node-sass.
Install
npm install node-sass-middleware
Usage
Recompile .scss or .sass files automatically for connect and express based http servers.
dest - (String) Destination directory used to output .css files (when undefined defaults to src).
error - A function to be called when something goes wrong.
force - [true | false], false by default. Always re-compile.
indentedSyntax - [true | false], false by default. If true compiles files with the .sass extension instead of .scss in the src directory.
log - function(severity, key, val, message), used to log data instead of the default console.error. "severity" matches Winston severity levels.
maxAge - MaxAge to be passed in Cache-Control header.
prefix - (String) It will tell the sass middleware that any request file will always be prefixed with <prefix> and this prefix should be ignored.
response - [true | false], true by default. To write output directly to response instead of to a file.
root - (String) A base path for both source and destination directories.
For full list of options from original node-sass project go here.
Express example with custom log function
const express = require('express');
const sassMiddleware = require('node-sass-middleware');
const path = require('path');
const winston = require('winston');
const app = express();
winston.level = 'debug';
app.use(sassMiddleware({
/* Options */
src: __dirname,
dest: path.join(__dirname, 'public'),
debug: true,
log: function (severity, key, value) { winston.log(severity, 'node-sass-middleware %s : %s', key, value); }
}));
// Note: you must place sass-middleware *before* `express.static` or else it will
// not work.
app.use(express.static(path.join(__dirname, 'public')));
Contributors
We <3 our contributors! A special thanks to all those who have clocked in some dev time on this project, we really appreciate your hard work. You can find a full list of those people here.
Building and Testing
git clone [email protected]:sass/node-sass-middleware
cd node-sass-middleware
npm install
npm test
Note on Patches/Pull Requests
Fork the project.
Make your feature addition or bug fix.
Add documentation if necessary.
Add tests for it. This is important so I don't break it in a future version unintentionally.
Send a pull request. Bonus points for topic branches.
Copyright
Copyright (c) 2013+ Andrew Nesbitt. See LICENSE for details.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/sass/node-sass-middleware là nguồn chính thức.
sass/node-sass-middleware có bao nhiêu sao?
sass/node-sass-middleware có 261 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/sass/node-sass-middleware. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
sass/node-sass-middleware có những chủ đề gì?
GitHub topics của sass/node-sass-middleware: "middleware", "node-sass", "sass-middleware". TopGit xếp repo vào nhóm mã nguồn mở.
sass/node-sass-middleware có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho sass/node-sass-middleware. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
sass/node-sass-middleware còn đang phát triển không?
Commit gần nhất trên sass/node-sass-middleware là 1.1 năm trước (theo timestamp GitHub). Repo có 86 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
sass/node-sass-middleware dùng license gì?
sass/node-sass-middleware phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
sass/node-sass-middleware viết bằng ngôn ngữ gì?
sass/node-sass-middleware chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
node-sass-middleware có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về node-sass-middleware.