npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vue-splitter-tools

v3.0.0

Published

Bộ công cụ tách file Vue Components, SCSS và i18n

Readme

Vue Splitter Tools

Bộ công cụ tách file Vue Components, SCSS và i18n thành các module nhỏ hơn để dễ dàng quản lý, bảo trì và phát triển.

Cài đặt

npm install -g vue-splitter-tools

Hoặc sử dụng npx:

npx vue-splitter-tools <lệnh> [tùy chọn]

Các tính năng

1. Split SCSS

Tách file SCSS lớn thành các module nhỏ hơn dựa trên cấu trúc component.

split-scss --input <đường-dẫn-file-scss> --output <thư-mục-đầu-ra> [--target-size <kích-thước-file-đích>] [--verbose]

Tùy chọn:

  • --input, -i: Đường dẫn tới file SCSS cần tách
  • --output, -o: Thư mục đầu ra cho các module SCSS
  • --target-size, -s: Kích thước file đích (KB) (mặc định: 50)
  • --verbose, -v: Hiển thị thông tin chi tiết trong quá trình xử lý

Ví dụ:

split-scss -i src/styles/main.scss -o src/styles/modules -s 30 -v

2. Split Vue

Tách file Vue lớn thành các component nhỏ hơn.

split-vue --input <đường-dẫn-file-vue> --output <thư-mục-đầu-ra> [--verbose]

Tùy chọn:

  • --input, -i: Đường dẫn tới file Vue cần tách
  • --output, -o: Thư mục đầu ra cho các component Vue
  • --verbose, -v: Hiển thị thông tin chi tiết trong quá trình xử lý

3. Split i18n

Tách file ngôn ngữ i18n lớn thành các module nhỏ hơn theo tính năng.

split-i18n --input <đường-dẫn-file-i18n> --output <thư-mục-đầu-ra> [--verbose]

Tùy chọn:

  • --input, -i: Đường dẫn tới file i18n cần tách
  • --output, -o: Thư mục đầu ra cho các module i18n
  • --verbose, -v: Hiển thị thông tin chi tiết trong quá trình xử lý

Cách hoạt động

Split SCSS

  • Phân tích cú pháp SCSS và trích xuất các selector
  • Phân loại selector theo component và loại (common, layout, component)
  • Tạo các file module riêng biệt cho mỗi loại và component
  • Tạo file chính với các import tới các module đã tạo
  • Tạo bản sao lưu của file gốc

Split Vue

  • Phân tích cú pháp Vue component
  • Trích xuất các component con
  • Tạo các file component riêng biệt
  • Cập nhật file gốc với các import và registration

Split i18n

  • Phân tích file ngôn ngữ i18n
  • Phân loại các key theo tính năng
  • Tạo các file module cho mỗi tính năng
  • Tạo file chính với các import

Yêu cầu

  • Node.js >= 14.0.0

Giấy phép

MIT