承接 acidjazz/larjectus 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

acidjazz/larjectus

Composer 安装命令:

composer require acidjazz/larjectus

包简介

Adds the power of objectus to Laravel and Lumen

README 文档

README

Allows you to use Objectus seamlessly in Laravel 5 and Lumen

Total Downloads Latest Stable Version License Build Status Dependency Status Coverage Status codecov Codacy Badge

What this does

  • Combines your .env and config/ options with as many YAML and JSON files and directories you want to add inside config/
  • Allows for functionality to share this data in any language(s) your resources/ or public/ folders might use

Why would I want this

Most all of my projects have extended configuration, everything from style guides to site copy, this allows stylus/css and coffeescript/javascript access to this data

Requirements

Installation

Require this package with Composer

composer require acidjazz/larjectus

Laravel

Once Composer has installed or updated your packages you need to register Larjectus with Laravel itself. Open up config/app.php and find the providers key, towards the end of the file, and add 'Larjectus\ServiceProvider', to the end:

'providers' => [
  ...
    Larjectus\ServiceProvider::class,
],

Lumen

For usage with Lumen, add the service provider in bootstrap/app.php.

$app->register(Larjectus\ServiceProvider::class);

configuration

gulpfile.js example(s)

Your gulp task is different from how Objectus works, here is an example of compiling a JSON version of your config for JavaScript access:

🚨 Note the secure array where i remove any secure data, like DB passwords and AWS credentials. 🚨

exec = require('child_process').exec;

objectify = function() {
  var config, secure;
  config = {};
  secure = ['auth', 'database'];
  return exec('php artisan larjectus:config', function(error, result, stderr) {
    var dim, i, len, pubconfig;
    if (error) {
      notify(error);
    }
    this.config = JSON.parse(result);
    pubconfig = this.config;
    for (i = 0, len = secure.length; i < len; i++) {
      dim = secure[i];
      delete pubconfig[dim];
    }
    return fs.writeFileSync('public/js/config.js', "config="+JSON.stringify(pubconfig)+";", 'utf8');
  });
};

objectify();

gulp.task('larjectus', objectify);

gulp.task('watch', function() {
  gulp.watch('config/**/*', ['larjectus']);
);

Here is an example of giving config access to stylus you would need the sample gulp task above :

stylus = require('gulp-stylus');

gulp.task('stylus', function() {
  return gulp.src('resources/stylus/main.styl')
    .pipe(stylus({
      rawDefine: {
        config: config
      }
    }).on('error', notify.onError(function(error) {
      return {
        title: 'Stylus error: ' + error.name,
        message: error.message,
        sound: 'Pop'
      };
    })))
  .pipe(gulp.dest('public/css/'))
  .pipe(sync.stream());
}

acidjazz/larjectus 适用场景与选型建议

acidjazz/larjectus 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 357 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 07 月 24 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「lumen」 「objectus」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 acidjazz/larjectus 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 acidjazz/larjectus 我们能提供哪些服务?
定制开发 / 二次开发

基于 acidjazz/larjectus 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 357
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-24