jonkemp / gulp-bundle Goto Github PK
View Code? Open in Web Editor NEWParse build blocks in HTML to concatenate JavaScript and CSS files
License: MIT License
Parse build blocks in HTML to concatenate JavaScript and CSS files
License: MIT License
Howdy, It appears useref has been unpublished from the npm repository see: https://www.npmjs.org/package/useref making npm throw an error message when i try to install gulp-bundle
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'useref' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'gulp-bundle'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
Running npm install gulp-bundle --save-dev results in the following error:
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/useref
npm ERR! 404
npm ERR! 404 'useref' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'gulp-bundle'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
I'm trying this plugin, but I'm wondering how to approach the issue where when you've got a certain number of html files containing the bundle feature and a certain other number not. I see two approaches:
Please advise
Maybe what I'm thinking would already be possible, but I think it could be worth covering this to a gulp plugin instead of how it currently works.
I want to be able to run gulp-replace on files before they get handled by bundle. I think this would be easiest to accomplish via code somewhat like this:
gulp.task('html', resources, function() {
return gulp.src('**/*.html')
.pipe(replace(/@@value?/g, 'newval'))
.pipe(bundle())
.pipe(gulp.dest('dist'));
});
Also, the conversion to a gulp plugin may make the use of this a little less confusing. Is there any compelling reason to not convert this to a plugin (besides backwards compatibility)? For backwards compatibility, we could make it so that if the first argument is a string, handle the way things are handled currently. If it's anything else, go with the new way.
Hi,
Just tried to install gulp-bundle from npm, got this:
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'useref' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'gulp-bundle'
Its not terribly clear how this works. Is appdir the path to the *.html files or specifying the root for the search for the assets (usemin style).
Is there a way to specify where the modified *.html files go or do they always go in the same folder as the assets?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.