You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 20, 2022. It is now read-only.
Should only copy required files (ie. js, css). Should NOT copy bower.json, README.md, MIT-LICENSE.txt, etc. Looks like bower.json declares the main: file that needs to be included.
Vendor files need to be minified (ie. require.js). (Edit: I see it's supposed to be doing that, in gulp js, but for some reason it's not working)
You can use something like gulp-bower or gulp-bower-files to only copy the required files.
[Edit:] Found the problem. Looks like after build/vendor files are copied, that somehow cancels out the changes made to require.js. You have to exclude require.js from the vendor copy task, and then just copy/minify directly from source. This works:
gulp.task('copy', ['sass'], function () {
return es.concat(
// update index.html to work when built
gulp.src(['source/index.html'])
.pipe(gulp.dest('build')),
// copy config-require
gulp.src(['source/js/config-require.js'])
.pipe(uglify().on('error', handleError))
.pipe(gulp.dest('build/js')),
// copy template files
gulp.src(['source/js/**/*.html'])
.pipe(gulp.dest('build/js')),
// copy vendor files
gulp.src(['source/vendor/**/*', '!source/vendor/requirejs/require.js'])
.pipe(gulp.dest('build/vendor')),
// copy assets
gulp.src(['source/assets/**/*'])
.pipe(gulp.dest('build/assets')),
// minify requirejs
gulp.src(['source/vendor/requirejs/require.js'])
.pipe(uglify())
.pipe(gulp.dest('build/vendor/requirejs'))
);
});
[Edit:]gulp-bower-files is deprecated. Take a look at 'main-bower-files' instead.
The text was updated successfully, but these errors were encountered:
mpiasta-ca
changed the title
Copy of /vendor needs optimization
gulp copy of /vendor needs optimization
Oct 7, 2014
mpiasta-ca
changed the title
gulp copy of /vendor needs optimizationgulp copy of /source/vendor moving too many files to build
Oct 8, 2014
mpiasta-ca
changed the title
gulp copy of /source/vendor moving too many files to build
gulp task for /source/vendor is including too many files for build
Oct 8, 2014
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
bower.json
,README.md
,MIT-LICENSE.txt
, etc. Looks likebower.json
declares themain:
file that needs to be included.gulp js
, but for some reason it's not working)You can use something like
gulp-bower
orgulp-bower-files
to only copy the required files.[Edit:] Found the problem. Looks like after
build/vendor
files are copied, that somehow cancels out the changes made torequire.js
. You have to excluderequire.js
from the vendor copy task, and then just copy/minify directly from source. This works:[Edit:]
gulp-bower-files
is deprecated. Take a look at 'main-bower-files' instead.The text was updated successfully, but these errors were encountered: