johnpapa/generator-hottowel là dự án mã nguồn mở trên GitHub, với 837 sao.
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.
Create an Angular application using the HotTowel style (via a Yeoman generator)
Opinionated Angular style guide for teams by @john_papa
More details about the styles and patterns used in this app can be found in my Angular Style Guide and my Angular Patterns: Clean Code course at Pluralsight and working in teams.
Prerequisites
Install Node.js
on OSX use homebrew brew install node
on Windows use chocolatey choco install nodejs
Install these npm packages globally
npm install -g yo bower gulp nodemon
Refer to these instructions on how to not require sudo
QuickStart
Install generator-hottowel
npm install -g generator-hottowel
Create a new folder and change directory to it
mkdir myapp
cd myapp
Run the generator
yo hottowel helloWorld
HotTowel Options
Application Name
Pass in the app's name to avoid being prompted for it
yo hottowel [appName]
Running HotTowel
Linting
Run code analysis using gulp vet. This runs jshint, jscs, and plato.
Tests
Run the unit tests using gulp test (via karma, mocha, sinon).
Running in dev mode
Run the project with gulp serve-dev
opens it in a browser and updates the browser with any files changes.
Building the project
Build the optimized project using gulp build
This create the optimized code for the project and puts it in the build folder
Running the optimized code
Run the optimize project from the build folder with gulp serve-build
Exploring HotTowel
HotTowel Angular starter project
Structure
The structure also contains a gulpfile.js and a server folder. The server is there just so we can serve the app using node. Feel free to use any server you wish.
/src
/client
/app
/content
Installing Packages
When you generate the project it should run these commands, but if you notice missing packages, run these again:
npm install
bower install
The Modules
The app has 4 feature modules and depends on a series of external modules and custom but cross-app modules
Core modules are ones that are shared throughout the entire application and may be customized for the specific application. Example might be common data services.
This is an aggregator of modules that the application will need. The core module takes the blocks, common, and Angular sub-modules as dependencies.
blocks Modules
Block modules are reusable blocks of code that can be used across projects simply by including them as dependencies.
blocks.logger Module
The blocks.logger module handles logging across the Angular app.
blocks.exception Module
The blocks.exception module handles exceptions across the Angular app.
It depends on the blocks.logger module, because the implementation logs the exceptions.
blocks.router Module
The blocks.router module contains a routing helper module that assists in adding routes to the $routeProvider.
Gulp Tasks
Task Listing
gulp help
Displays all of the available gulp tasks.
Code Analysis
gulp vet
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.
Building Production Code
gulp html
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 html 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.
Bumping Versions
gulp bump
Bump the minor version using semver.
--type=patch // default
--type=minor
--type=major
--type=pre
--ver=1.2.3 // specific version
johnpapa/generator-hottowel có 837 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/johnpapa/generator-hottowel. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
johnpapa/generator-hottowel có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho johnpapa/generator-hottowel. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
johnpapa/generator-hottowel còn được duy trì không?
TopGit chưa ghi nhận lần push gần đây của johnpapa/generator-hottowel. Xem lịch sử commit trực tiếp trên GitHub để biết thông tin chính xác nhất.
johnpapa/generator-hottowel là gì?
johnpapa/generator-hottowel (johnpapa/generator-hottowel) là dự án đa ngôn ngữ TopGit theo dõi. Tính tới lần đồng bộ gần nhất, repo có 837 sao.
johnpapa/generator-hottowel viết bằng ngôn ngữ gì?
Dữ liệu TopGit chưa ghi nhận ngôn ngữ chính cho johnpapa/generator-hottowel. Xem danh sách file trên GitHub để biết chi tiết.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc generator-hottowel có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về generator-hottowel.