
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
preact-component-scss
Advanced tools
A modern, responsive component library built with Preact, TypeScript, and SCSS. Features dark/light/auto theme switching, comprehensive documentation, and GitHub Pages deployment.
npm install preact-component-scss
import { App } from 'preact-component-scss';
import 'preact-component-scss/styles';
function MyApp() {
return <App />;
}
The library includes a theme provider for easy theme switching:
import { ThemeProvider, useTheme } from 'preact-component-scss';
function App() {
const { theme, setTheme } = useTheme();
return (
<div>
<button onClick={() => setTheme('dark')}>Dark</button>
<button onClick={() => setTheme('light')}>Light</button>
<button onClick={() => setTheme('auto')}>Auto</button>
</div>
);
}
The project includes automated version management to ensure safe publishing:
npm run version-check# Manual version check (optional)
npm run version-check
# Build library for publishing
npm run build:lib
# Publish to NPM (requires NPM_TOKEN)
npm publish
# Install dependencies (also sets up Husky git hooks)
npm install
# Start development server
npm run dev
# Run tests
npm run test
# Build for production
npm run build
# Generate documentation
npm run docs
npm run dev - Start Vite dev servernpm run build - Build for productionnpm run build:lib - Build library for NPM publishingnpm run test - Run tests with Vitestnpm run test:junit - Run tests with JUnit output for CInpm run test:coverage - Run tests with coverage reportingnpm run test:ui - Run tests with Vitest UInpm run docs - Generate TSDoc documentationnpm run preview - Preview production buildnpm run version-check - Check and bump version if needed before publishingsrc/
├── app.tsx # Main demo component
├── index.ts # Library entry point
├── main.tsx # App bootstrap
├── theme-provider.tsx # Theme context provider
├── utils.ts # Utility functions
├── global.d.ts # TypeScript environment variable declarations
├── styles/
│ ├── _variables.scss # CSS custom properties and SCSS variables
│ ├── _mixins.scss # SCSS mixins
│ ├── _base.scss # Global styles
│ ├── _components.scss # Component styles
│ └── main.scss # Main stylesheet
├── components/ # Component library
├── test/
│ └── setup.ts # Test configuration
└── assets/ # Static assets
.husky/
├── pre-commit # Git pre-commit hook for version checking
└── _/ # Husky internal files
git checkout -b feature/amazing-feature)npm run test to ensure tests passgit push origin feature/amazing-feature)# Clone the repository
git clone https://github.com/prachwal/preact-component-scss.git
cd preact-component-scss
# Install dependencies (this also sets up Husky hooks)
npm install
# Start development
npm run dev
The project uses Husky to run automated checks before commits:
To bypass hooks for specific commits (use with caution):
git commit --no-verify -m "Your commit message"
MIT - see LICENSE file for details.
FAQs
A Preact component library with SCSS styling
We found that preact-component-scss demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.