Chuyển đến nội dung chính

Yarn tăng tốc hiệu quả npm

Trong khoảng thời gian làm develop từ front end tới backend npm hoặc nodejs không xa lạ gì với bất bì một developer nào, thật thiếu xót nếu không nhắc tới công cụ mở đường mở nối cho quản lý các thư viện js cồng kềnh khi dự án scale.

Điểm mạnh đã rõ ràng, nhưng thật khổ sở khi chạy hoặc cài đặt npm lần đầu các package được lấy từ remote với tốc độ siêu chậm, làm cốc coffee xong về cũng chưa xong.


Trong lúc loanh quanh tìm vài tip & trick speed up npm tôi gặp Yarn, tưởng nó lại là package của npm support, nhưng sau khi cài đặt thấy mọi thứ ổn, có vài lới giới thiệu và quảng cáo, đúng như nắng hạn gặp mưa.

Cài đặt đơn giản bạn có thể xem trên Yarn doc.

Kết đẹp, bạn nên thử 


Ultra Fast.
Yarn caches every package it downloads so it never needs to download it again. It also parallelizes operations to maximize resource utilization so install times are faster than ever.


Mega Secure.
Yarn uses checksums to verify the integrity of every installed package before its code is executed.


Super Reliable.
Using a detailed, but concise, lockfile format, and a deterministic algorithm for installs, Yarn is able to guarantee that an install that worked on one system will work exactly the same way on any other system.

Nhận xét

Bài đăng phổ biến từ blog này

Magento2 Cheat Sheet

Magento 2 tutorial http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/bk-frontend-dev-guide.html https://www.creare.co.uk/blog/magento/theming-in-magento-2-part-1 https://www.creare.co.uk/blog/magento/theming-in-magento-2-part-2 http://alanstorm.com/category/magento-2/

Google Chrome cheat sheet - Keyboard shortcuts

Windows and Linux Tab and window shortcuts Shortcut Action Alt+F   or   Alt+E   or F10 Opens the Chrome menu   , which lets you customize and control settings in Google Chrome. Ctrl+Shift+B Toggles the bookmarks bar on and off. Ctrl+H Opens the History page. Ctrl+J Opens the Downloads page. Shift+Esc Opens the Task Manager. Shift+Alt+T Sets focus on the first tool in the browser toolbar. You can then use the following shortcuts to move around in the toolbar: ·          Press   Tab, Shift+Tab, Home, End, right arrow,   and   left arrow   to move focus to different items in the toolbar. ·          Press   Space   or   Enter   to activate toolbar buttons, including page actions and browser actions. ·     ...

Magento 2 Bookmark Events

Tổng hợp events có trong magento ,  tạo thêm event bao nhiêu tuỳ thích theo link sau Events and observers