Skip to content

Commit

Permalink
fix: removed requirejs loader from normal dist file
Browse files Browse the repository at this point in the history
Fixes #154
  • Loading branch information
ocombe committed Mar 23, 2015
1 parent ec079b0 commit cfcf07b
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 31 deletions.
19 changes: 0 additions & 19 deletions dist/ocLazyLoad.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ocLazyLoad.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ocLazyLoad.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ocLazyLoad.min.js.map

Large diffs are not rendered by default.

31 changes: 23 additions & 8 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gulp.task('clean', function() {
.pipe(clean());
});

gulp.task('build-minify', ['build-files', 'build-files-require'], function() {
gulp.task('build-minify', ['build-files-require'], function() {
var rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
header = require('gulp-header'),
Expand Down Expand Up @@ -45,15 +45,14 @@ gulp.task('build-minify', ['build-files', 'build-files-require'], function() {

});

gulp.task('build-files-require', function() {
gulp.task('build-files-require', ['build-files'], function() {
var rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
header = require('gulp-header'),
babel = require('gulp-babel'),
ngAnnotate = require('gulp-ng-annotate'),
pkg = require('./package.json'),
concat = require('gulp-concat'),
gulpIgnore = require('gulp-ignore'),
sourcemaps = require('gulp-sourcemaps'),
banner = ['/**',
' * <%= pkg.name %> - <%= pkg.description %>',
Expand All @@ -64,11 +63,20 @@ gulp.task('build-files-require', function() {
' */',
''].join('\n');

return gulp.src('src/**/*.js')
return gulp.src([
'src/ocLazyLoad.core.js',
'src/ocLazyLoad.directive.js',
'src/ocLazyLoad.loaders.common.js',
'src/ocLazyLoad.loaders.core.js',
'src/ocLazyLoad.loaders.cssLoader.js',
'src/ocLazyLoad.loaders.requireJSLoader.js',
'src/ocLazyLoad.loaders.templatesLoader.js',
'src/ocLazyLoad.polyfill.ie8.js'
])
.pipe(sourcemaps.init())
.pipe(babel({ blacklist: ["strict"] }))
.pipe(ngAnnotate())
.pipe(gulpIgnore.exclude('**/*.jsLoader.js'))
.pipe(gulp.dest('dist/modules'))
.pipe(concat('ocLazyLoad.require.js'))
.pipe(header(banner, {pkg: pkg}))
.pipe(sourcemaps.write('.'))
Expand All @@ -83,7 +91,6 @@ gulp.task('build-files', ['clean'], function() {
ngAnnotate = require('gulp-ng-annotate'),
pkg = require('./package.json'),
concat = require('gulp-concat'),
gulpIgnore = require('gulp-ignore'),
sourcemaps = require('gulp-sourcemaps'),
banner = ['/**',
' * <%= pkg.name %> - <%= pkg.description %>',
Expand All @@ -94,12 +101,20 @@ gulp.task('build-files', ['clean'], function() {
' */',
''].join('\n');

return gulp.src('src/**/*.js')
return gulp.src([
'src/ocLazyLoad.core.js',
'src/ocLazyLoad.directive.js',
'src/ocLazyLoad.loaders.common.js',
'src/ocLazyLoad.loaders.core.js',
'src/ocLazyLoad.loaders.cssLoader.js',
'src/ocLazyLoad.loaders.jsLoader.js',
'src/ocLazyLoad.loaders.templatesLoader.js',
'src/ocLazyLoad.polyfill.ie8.js'
])
.pipe(sourcemaps.init())
.pipe(babel({ blacklist: ["strict"] }))
.pipe(ngAnnotate())
.pipe(gulp.dest('dist/modules'))
.pipe(gulpIgnore.exclude('**/*.requirejsLoader.js'))
.pipe(concat('ocLazyLoad.js'))
.pipe(header(banner, {pkg: pkg}))
.pipe(sourcemaps.write('.'))
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"gulp-concat": "~2.5.2",
"gulp-exec": "~2.1.1",
"gulp-header": "~1.2.2",
"gulp-ignore": "^1.2.1",
"gulp-json-editor": "~2.2.1",
"gulp-ng-annotate": "~0.5.2",
"gulp-prompt": "~0.1.2",
Expand Down

0 comments on commit cfcf07b

Please sign in to comment.