Я конкатенирую свои плагины с помощью Gulp, но они, похоже, получают незначительные изменения в неправильном порядке, в результате чего мое приложение ломается. Я использую плагин gulp-order, который, я считаю, правильно использую. Для тестирования я отключил функцию uglify(). Однако полученный файл всегда начинается с Angular, а не jQuery. Любая помощь будет принята с благодарностью!Gulp Plugin Order
...
//Gulp-order to make sure we load things correctly
var order = require('gulp-order');
...
var pluginOrder = [
'src/bower_components/jquery/dist/jquery.js',
'src/bower_components/bootstrap/dist/js/bootstrap.js',
'src/bower_components/angular/angular.js',
'src/bower_components/angular-route/angular-route.js',
'src/bower_components/angular-animate/angular-animate.js',
'src/bower_components/angular-sanitize/angular-sanitize.js',
'src/bower_components/angular-bootstrap/ui-bootstrap.js',
'src/bower_components/angular-bootstrap/ui-bootstrap-tpls.js',
'src/bower_components/**/*.js',
'!src/bower_components/**/*.min.js'
]; //make sure everything loads in the right order
gulp.task('squish-jquery', function() {
return gulp.src('src/bower_components/**/*.js')
.pipe(ignore.exclude([ "**/*.map" ]))
.pipe(order(pluginOrder)).on('error', gutil.log)
//.pipe(plugins.uglify().on('error', gutil.log))
.pipe(plugins.concat('jquery.plugins.min.js'))
.pipe(gulp.dest('build')).on('error', gutil.log);
});
начала каскадного файла, jquery.plugins.min.js:
/**
* @license AngularJS v1.3.15
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';
/* jshint maxlen: false */
/**
* @ngdoc module
* @name ngAnimate
* @description
*
* The `ngAnimate` module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives.
*
* <div doc-module-components="ngAnimate"></div>
*
* # Usage
*
* To see animations in action, all that is required is to define the appropriate CSS classes
* or to register a JavaScript animation via the `myModule.animation()` function. The directives that support animation automatically are:
* `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation
* by using the `$animate` service.
*
* Below is a more detailed breakdown of the supported animation events provided by pre-existing ng directives:
*
* |
Я сделал это первоначально, но у меня была та же проблема, которая привела к тому, что я получил плагин. –
извините, тогда попробовал проверить различия, но ничего не найдено .... только plugins.concat, который вы используете –
Спасибо за вашу помощь! –