承接 innoweb/silverstripe-requirements-resolver 相关项目开发

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

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

innoweb/silverstripe-requirements-resolver

最新稳定版本:3.0.0

Composer 安装命令:

composer require innoweb/silverstripe-requirements-resolver

包简介

Helper module to resolve the path to global requirements like jQuery and the like.

README 文档

README

Overview

Helper module to resolve the path to global requirements like jQuery, and the like.

This was built for Silverstripe 4 because the local jQuery and jQuery validate versions in framework were outdated and we needed a way to override those with a newer/more secure version.

It helps making sure that only one version of a certain library is included for a site.

It also makes sure that when a JS requirement is called twice, once with defer/async and once without, the requirement is included without async/defer to make sure all js code works.

Requirements

SilverStripe CMS 6, see composer.json

Installation

Install the module using composer:

composer require innoweb/silverstripe-requirements-resolver dev-master

Then run dev/build.

Usage

In PHP

Requirements::javascript(
    RequirementsResolver::get('jquery')
);

In template

<% require javascript($ResolveRequirement("jquery")) %>

Configuration

The following requirements are pre-configured in the module's config:

jquery: 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js'
'jquery-validate': 'https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.21.0/jquery.validate.min.js'
'jqueryui-js': 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.14.1/jquery-ui.min.js'

Additional requirements can be added the the module's config:

Innoweb\RequirementsResolver\RequirementsResolver:
  requirements:
    '{key}': '{URL}'

Once configured, the key can be used to load the Requirements path.

License

BSD 3-Clause License, see License

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2018-10-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固