lin3s/distribution
Composer 安装命令:
composer require lin3s/distribution
包简介
Distribution library for different purposes inside LIN3S
关键字:
README 文档
README
Distribution library for different purposes inside LIN3S.
Downloads from packagist (PHP):
Why?
In LIN3S, we are working with many libraries and projects and usually all of them need scripts to automate some process. This library centralize this kind of scripts and tasks improving its reusability.
Installation
At this moment, this package contains PHP and JavaScript code, so you can manage this library from NPM and from Composer.
If your project is in PHP, be sure that Composer is installed in your system and execute the following command:
$ composer require lin3s/distribution
Otherwise, if your project is in JavaScript, be sure that Node is installed in your system and execute the following command:
$ npm install lin3s-distribution --save-dev # # OR # $ yarn add lin3s-distribution --dev
Usage
The following code is the basic configuration to make it work with Webpack.
'use strict'; const Webpack = require('lin3s-distribution').Webpack; const options = { entry: { 'app': './app/Resources/assets/js/entry-app.js', }, input: { base: 'app', scss: 'app/Resources/scss', includedNodeModules: [ 'swiper' ] }, output: { jsPath: './web', jsPublicPath: '/', jsFilename: '[name].js', jsFilenameProduction: '[name].[chunkhash].js', cssPath: '', cssPublicPath: '/', cssFilename: '[name].css', cssFilenameProduction: '[name].[contenthash].css' }, postcss: { autoprefixer: { browsers: ['last 2 versions'] } }, manifest: '../../manifest.json' }; module.exports = Webpack(options);
Symfony integration
Firstly, you need to install the bundle in your app kernel.
// app/config/AppKernel.php public function registerBundles() { $bundles = [ // ... new LIN3S\Distribution\Php\Symfony\Lin3sDistributionBundle(), // ... ]; }
Once the bundle has been enabled you can manage the configuration. The following is the default config:
# app/config/config.yml lin3s_distribution: webpack: manifest_path: "%kernel.root_dir%/../manifest.json" public_js_path: "/js/" public_css_path: "/css/"
Optionally you can enable the webpack default configuration doing this:
# app/config/config.yml lin3s_distribution: webpack: ~
Finally replace your script and link html tags with the following Twig tags.
{# app/Resources/views/base.html.twig #} (...) <head> (...) {% webpack_entry_css 'app' %} </head> <body> (...) {% webpack_entry_js 'app' %} </body>
Licensing Options
lin3s/distribution 适用场景与选型建议
lin3s/distribution 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 17.33k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 09 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「distribution」 「lin3s」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lin3s/distribution 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lin3s/distribution 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lin3s/distribution 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Base bundle for Symfony Distributions
Helper classes for building WordPress theme in the LIN3S way
Shared Kernel of LIN3S projects for different purposes
Anyrel - Distributor
Symfony style routing for WordPress
Distribution library for different purposes inside LIN3S
统计信息
- 总下载量: 17.33k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-14