定制 nanuc/js-snippets 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

nanuc/js-snippets

Composer 安装命令:

composer require nanuc/js-snippets

包简介

README 文档

README

composer require nanuc/js-snippets

Publish config (optionally): php artisan vendor:publish --provider="Nanuc\JSSnippets\JSSnippetsServiceProvider" --tag=config

Usage

<x-js-snippet>
    <script>
        console.log('Hello');
        console.log('I will');
        console.log('get minified');
        console.log('and downloaded as a plain Javascript file');
    </script>
</x-js-snippet>

Scripts in the js-snippet component will get minified (thanks to https://github.com/tedious/JShrink) and loaded as separate Javascript source.

You need to define the stack that the script tag will be pushed to (default: scripts).

By default this will only be run in the production environment (you can change this in the config).

Behind the scenes

The component will minify its content and put it in a file in the view cache. It will also generate a key based on the content.

Then it will create a script tag with a link that downloads this file as a plain Javascript source.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2021-05-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固