ttree/gulpfilejs

针对Flow框架和Neos CMS项目的Gulpfile.js打包文件

安装: 664

依赖项: 0

建议者: 0

安全: 0

星标: 1

关注者: 4

分支: 1

开放性问题: 0

语言:JavaScript

类型:neos-build

1.1.0 2018-08-31 15:44 UTC

This package is auto-updated.

Last update: 2024-08-26 03:51:19 UTC


README

原文件由jonnitto创建,并精心打包以适应您的Flow框架和Neos CMS项目。

安装

composer require --dev ttree/gulpfilejs

安装包后,您可以复制模板文件

cp -rT Build/Gulp/templates ./

警告:检查templates目录的内容,以避免覆盖您发行版中的重要内容。您可以选择不使用提供的模板或根据自身需求进行定制。以下文档基于官方模板。

编辑发行版目录中的package.json以匹配您的需求。

nvm use # to enable the correct 
yarn install
yarn run tasks

您必须看到类似以下内容

[14:14:53] Tasks for ~/Sites/dev/www.domain.dev/Build/Gulp
[14:14:53] ├── build             Generates all  Assets, Javascript and CSS files
[14:14:53] │   --b, --beautify  … Beautify and dont't compress files
[14:14:53] │   --d, --debug     … Files dont't get compressed and sourcemaps get genereated
[14:14:53] │   --m, --maps      … Write sourcemaps
[14:14:53] ├── css              Render CSS Files
[14:14:53] │   --b, --beautify  … Beautify and dont't compress files
[14:14:53] │   --d, --debug     … Files dont't get compressed and sourcemaps get genereated
[14:14:53] │   --m, --maps      … Write sourcemaps
[14:14:53] ├─┬ default           Generates all  Assets, Javascript and CSS files &  watch them
[14:14:53] │ │ --b, --beautify  … Beautify and dont't compress files
[14:14:53] │ │ --d, --debug     … Files dont't get compressed and sourcemaps get genereated
[14:14:53] │ │ --m, --maps      … Write sourcemaps
[14:14:53] │ └─┬ <series>
[14:14:53] │   ├── build
[14:14:53] │   └── watch
[14:14:53] ├── js               Render Javascript Files
[14:14:53] │   --b, --beautify  … Beautify and dont't compress files
[14:14:53] │   --d, --debug     … Files dont't get compressed and sourcemaps get genereated
[14:14:53] │   --m, --maps      … Write sourcemaps
[14:14:53] ├── jsLint           Lint Javascript files
[14:14:53] ├── optimizeImages   Optimize images and overrite them in the public folder
[14:14:53] ├─┬ pipeline         Build task for pipeline
[14:14:53] │ └─┬ <series>
[14:14:53] │   ├── build
[14:14:53] │   └── optimizeImages
[14:14:53] ├── scss             Render _all.scss and _allsub.scss Files
[14:14:53] ├── sprite           Create SVG Sprite
[14:14:53] └── watch            Watch files and regenereate them
✨  Done in 5.61s.

请检查jonnitto获取更多信息。

警告:此包目前不支持Babel,我们通常选择使用Bublé,也许将来会有所改变。原版的jonnitto支持Bublé(默认)和Babel。

功能

  • RollupJS(模块打包器)
  • Bublé(快速、功能齐全的ES2015编译器)
  • PostCSS
  • Browsersync
  • 使用Broetli和Zoepfli进行资产(JS/CSS)预压缩
  • Gulp, Uglify, 图像优化,SVG精灵,...

配置

您可以在config.json中查看默认配置,如果您需要为特定的站点包覆盖配置,您可以在Configuration目录中创建一个Gulp.json,如下所示

{
    "root": {
        "notifications": true
    },
    "browserSync": {
        "enable": true,
        "proxy": "https://www.domain.dev:8180"
    },
    "tasks": {
        "compress": true
    }
}

此配置将启用系统通知、Browsersync并启用使用Broetli和Zoepfli的全局静态资产(JS/CSS)压缩。

鸣谢

所有辛勤工作都由jonnitto完成。

打包和分支由ttree ltd - neos解决方案提供商赞助。

我们尽力用爱心制作这个包,我们欢迎赞助、支持请求等,请联系我们。

许可协议

根据MIT许可协议,请参阅LICENSE