承接 tomfun/js-templating-bundle 相关项目开发

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

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

tomfun/js-templating-bundle

Composer 安装命令:

composer require tomfun/js-templating-bundle

包简介

This bundle provides integration of gulp into Symfony2. Twigjs tag for twig.

README 文档

README

gulp task example:

var gulp       = require('gulp'),
    _          = require('underscore'),
    execSync   = require('exec-sync'),
    //watch = require('gulp-watch'),

    exportPath = './web';

gulp.task('default', ['dump-bundles'], function () {
    var bower           = require('main-bower-files'),
        bowerNormalizer = require('gulp-bower-normalize'),
        bowerData       = bower();
    return gulp.src(bowerData, {base: './bower_components'})
        .pipe(bowerNormalizer({bowerJson: './bower.json', flatten: true}))
        .pipe(gulp.dest(exportPath));
});

gulp.task('dump-bundles', function () {
    var myData = execSync('app/console tommy:js:dump --screen');
    var colors = require('colors/safe');
    myData = JSON.parse(myData);
    _.each(myData, function (data, type) {
        var was = {};
        _.each(data, function (path, dest) {
            if (!was.hasOwnProperty(path)) {
                was[path] = [];
            }
            was[path].push(dest);
        });
        _.each(was, function (dests, path) {
            if (dests.length > 1) {
                _.each(dests, function (dest) {
                    console.log(colors.yellow(dest) + " (" + exportPath + "/" + type + dest.substr(1) + ")\n");
                });
                console.log(
                    colors.green("  file:\n")
                    + path
                    + colors.green("\n  was already placed by:\n")
                );
            }
        });
    });
    var src = myData.js;
    _.each(src, function (path, dest) {
        dest = dest.substr(1);
        dest = dest.replace(/\/[^\/]+$/, '');
        //process one by one
        gulp.src(path/*, {base: './bower_components'}*/)
            //.pipe(normalize, compress, ...)
            .pipe(gulp.dest(exportPath + '/js' + dest));
    });
});

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2015-06-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固