
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.
A scaffolding tool for quickly creating modular projects based on Web Components, adhering to the four core technical specifications: HTML Template, Custom Elements, Shadow DOM, and ES Modules.
Create a project directly using npm init:
npm init wcs my-web-components
cd my-web-components
npm start
Or use npx:
npx create-wcs my-web-components
cd my-web-components
npm start
# Create a project with the default name
npm init wcs
# Create a project with a specified name
npm init wcs <project-name>
After running the above command, the tool will guide you through the project creation process, including setting the version number and choosing whether to install dependencies immediately.
npm start
Starts the development server (default address: http://localhost:8080) with hot reloading. The page will automatically refresh when you modify the code.
npm run build
Bundles the project into production-ready code and outputs it to the dist directory.
npm test
Executes test cases (the project template includes basic test configuration).
npm run lint
Checks code compliance using ESLint.
The created project has the following structure:
my-web-components/
├── src/
│ ├── components/
│ │ └── my-element/ # Example component
│ │ ├── my-element.ts # Component logic (Custom Element definition)
│ │ ├── my-element.html # Component template (HTML Template)
│ │ └── my-element.css # Component styles (Shadow DOM styles)
│ ├── index.ts # Entry file (exports components)
│ └── main.ts # Main program (registers components and initializes)
├── public/
│ └── index.html # Example HTML page
├── rollup.config.js # Rollup configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Project dependencies and scripts
└── README.md # Project documentation
The project adopts a modular design concept, splitting Web Components into three independent files:
.ts): Defines the Custom Element class, handles lifecycle methods, properties, and events..html): Contains the component’s HTML structure, using the <template> tag..css): Contains the component’s styles, which only apply to the component’s internal Shadow DOM.This design makes the code easier to maintain and scale, and is suitable for large-scale projects and component library development.
The created project includes a my-element example component that demonstrates core Web Components features:
name, count, disabled)count-changed)<slot name="content">)FAQs
Create Web Components projects with no configuration
The npm package create-wcs receives a total of 6 weekly downloads. As such, create-wcs popularity was classified as not popular.
We found that create-wcs 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.