Điểm qua johnpapa/gulp-patterns: 500 sao trên GitHub, viết chủ yếu bằng JavaScript. Playground for Gulp Recipes
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.
You've built your JavaScript application but how do you automate testing, code analysis, running it locally or deploying it? These redundant tasks can consume valuable time and resources. Stop working so hard and take advantage of JavaScript task automation using Gulp to streamline these tasks and give you back more time in the day. Studying this repo can help clarify how Gulp works, jump-start task automation with Gulp, find and resolve issues faster, and be a more productive.
Requirements
Install Node
on OSX install home brew and type brew install node
on Windows install chocolatey
More tips on Windows with node
open command prompt as administrator
type choco install nodejs
type choco install nodejs.install
On OSX you can alleviate the need to run as sudo by following these instructions. I highly recommend this step on OSX
Performs static code analysis on all javascript files. Runs jshint and jscs.
gulp vet --verbose
Displays all files affected and extended information about the code analysis.
gulp plato
Performs code analysis using plato on all javascript files. Plato generates a report in the reports folder.
Testing
gulp serve-specs
Serves and browses to the spec runner html page and runs the unit tests in it. Injects any changes on the fly and re runs the tests. Quick and easy view of tests as an alternative to terminal via gulp test.
gulp test
Runs all unit tests using karma runner, mocha, chai and sinon with phantomjs. Depends on vet task, for code analysis.
gulp test --startServers
Runs all unit tests and midway tests. Cranks up a second node process to run a server for the midway tests to hit a web api.
gulp autotest
Runs a watch to run all unit tests.
gulp autotest --startServers
Runs a watch to run all unit tests and midway tests. Cranks up a second node process to run a server for the midway tests to hit a web api.
Cleaning Up
gulp clean
Remove all files from the build and temp folders
gulp clean-images
Remove all images from the build folder
gulp clean-code
Remove all javascript and html from the build folder
gulp clean-fonts
Remove all fonts from the build folder
gulp clean-styles
Remove all styles from the build folder
Fonts and Images
gulp fonts
Copy all fonts from source to the build folder
gulp images
Copy all images from source to the build folder
Styles
gulp styles
Compile less files to CSS, add vendor prefixes, and copy to the build folder
Bower Files
gulp wiredep
Looks up all bower components' main files and JavaScript source code, then adds them to the index.html.
The .bowerrc file also runs this as a postinstall task whenever bower install is run.
Angular HTML Templates
gulp templatecache
Create an Angular module that adds all HTML templates to Angular's $templateCache. This pre-fetches all HTML templates saving XHR calls for the HTML.
gulp templatecache --verbose
Displays all files affected by the task.
Serving Development Code
gulp serve-dev
Serves the development code and launches it in a browser. The goal of building for development is to do it as fast as possible, to keep development moving efficiently. This task serves all code from the source folders and compiles less to css in a temp folder.
gulp serve-dev --nosync
Serves the development code without launching the browser.
gulp serve-dev --debug
Launch debugger with node-inspector.
gulp serve-dev --debug-brk
Launch debugger and break on 1st line with node-inspector.
gulp serve-dev --stubs
Serves the development code with the stubs to avoid hitting a real backend
Building Production Code
gulp optimize
Optimize all javascript and styles, move to a build folder, and inject them into the new index.html
gulp build
Copies all fonts, copies images and runs gulp optimize to build the production code to the build folder.
Serving Production Code
gulp serve-build
Serve the optimized code from the build folder and launch it in a browser.
gulp serve-build --nosync
Serve the optimized code from the build folder and manually launch the browser.
gulp serve-build --debug
Launch debugger with node-inspector.
gulp serve-build --debug-brk
Launch debugger and break on 1st line with node-inspector.
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/johnpapa/gulp-patterns là nguồn chính thức.
johnpapa/gulp-patterns có bao nhiêu sao?
johnpapa/gulp-patterns có 500 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/johnpapa/gulp-patterns. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
johnpapa/gulp-patterns có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho johnpapa/gulp-patterns. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
johnpapa/gulp-patterns còn đang phát triển không?
Commit gần nhất trên johnpapa/gulp-patterns là 7.8 năm trước (theo timestamp GitHub). Repo có 136 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
johnpapa/gulp-patterns là gì?
johnpapa/gulp-patterns (johnpapa/gulp-patterns) là dự án JavaScript trên GitHub. Theo mô tả gốc: Playground for Gulp Recipes
Đọc đầy đủ README ở tab phía trên.
gulp-patterns 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ề gulp-patterns.