laravelangular/generators
Composer 安装命令:
composer require laravelangular/generators
包简介
Angular generators for Artisan
README 文档
README
AngularJS generators for Artisan. Originally created at laravel5-angular-material-starter.
Installation
If you're using the starter project, then it's already pre-installed.
composer require laravelangular/generators
//and then add the provider in config/app.php
LaravelAngular\Generators\LaravelServiceProvider::class,
php artisan vendor:publish
Usage
php artisan ng:page name #New page inside angular/app/pages/ php artisan ng:component name #New component inside angular/app/components/ php artisan ng:directive name #New directive inside angular/directives/ php artisan ng:config name #New config inside angular/config/ php artisan ng:dialog name #New custom dialog inside angular/dialogs/ php artisan ng:filter name #New filter inside angular/filters/ php artisan ng:service name #New service inside angular/services/
These commands will create new directories and files for AngularJS front-end in new ES6 syntax.
If not present, commands will create index files (i.e.: index.components.js) and, if enabled, new created classes will be imported.
Configurations are editable in config\generators.php. See below for details.
Configuration
- source: name of directories. They make a path to new created files
- root: name of the directory on where all created files and folders will be put.
- Other entries indicate directories where files will be put. I.e running
php artisan ng:component namewill be created three new files for componentnamewithroot/components/name/path. Default isangular/app/components/name/
- suffix: name and extension appended to file name. I.e.: running
php artisan ng:directive namewill be created a file namedname.directive.js.- stylesheet: extension for stylesheets. NOTE: Stylesheets are created for both pages and components
- tests
- enable: whether to enable or disable creation of test files
- source: same as
source, but for test files
- misc.auto_import: enable or disable automatic import in index files.
- angular_modules: configuration for angular root module and submodules. If index files are created before or manually, these settings will help recognize angular modules for automatic import. If index file is created on first command run, these settings will create angular module for you.
- root: angular root module.
- standalone: if a module is defined as standalone (i.e.:
angular.module('mymodule', [])) or is part of a root module (angular.module('mymodule')). If set to false,use_prefix,prefixandsuffixwill be ignored and root module name will be used. - prefix and suffix: name of module of the type
prefix.suffix; i.e.:app.components. - use_prefix: whether to use prefix for module name
Documentation
View Angular Generators documentation
Contributors
Originally created at laravel5-angular-material-starter then moved to a separate package by @m33ch
Notes
- Do not append the word
service, it will be automatically added for you.
laravelangular/generators 适用场景与选型建议
laravelangular/generators 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 69.9k 次下载、GitHub Stars 达 90, 最近一次更新时间为 2015 年 11 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 laravelangular/generators 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 laravelangular/generators 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 69.9k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 91
- 点击次数: 5
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-06