wiredep

Combine and minify all bower libraries with gruntjs

谁说我不能喝 提交于 2020-01-01 09:57:14
问题 Is there a way to combine and minify all bower installed libraries into 1 file automatically? First I tried the most basic approach: combine all .js files from all subdirectories: uglify: { options: {compress: true}, my_target: { files: { 'vendor.js': ['bower_components/**/*.js'], } } } But this is obviously a bad approach. It also doesn't work because of too many errors. I manually deleted all the files and kept only 1 (main) file that each library has, and it worked. Is there a way to do

Gulp and wire dep not injecting file type *.*.js files

泄露秘密 提交于 2019-12-11 08:18:52
问题 I am facing below issue - I have Yeomen generator and wiredep to inject bower dependencies in index.html file. I have installed angular tree view by bower then noticed that lib files and css file of angular tree view are not getting injected in index file. After debugging for while found that the lib file of angular tree view has one extras dot (angular.treeview.js) same with the css file as well So how to inject that file in index.html i have below task in inject.js file in gulp folder to

How to add specific bower components as IE8 conditional block in Gulp

安稳与你 提交于 2019-12-10 15:05:43
问题 I have several bower components, of which I need some components like json3 , respondjs , es5shim to be added in an IE8 conditional block (in build as well as serve) like this : <!--[if lt IE 9]> <script src="bower_components/json3/json3.js"></script> <![endif]--> How should I proceed to write the task? I could not find any suitable examples with gulp-inject as well as wiredep for this issue. Please advise 回答1: It is possible with gulp-filter and gulp-inject's starttag option. Suppose you

grunt-wiredep on multiple files with different dependencies

不打扰是莪最后的温柔 提交于 2019-12-04 18:45:13
问题 The current project structure is somewhat like this: -index.html | -bower.json | +-bower_components The proposed project structure will add a few more static html files in the project root. Till now I have been managing all the frontend dependencies in bower.json and had it automatically included in index.html using the grunt-wiredep task. But with new files getting added, each file will have different set of dependencies. -index.html | -file-with-some-other-bower-dependency.html | -bower

Combine and minify all bower libraries with gruntjs

痞子三分冷 提交于 2019-12-04 04:27:18
Is there a way to combine and minify all bower installed libraries into 1 file automatically? First I tried the most basic approach: combine all .js files from all subdirectories: uglify: { options: {compress: true}, my_target: { files: { 'vendor.js': ['bower_components/**/*.js'], } } } But this is obviously a bad approach. It also doesn't work because of too many errors. I manually deleted all the files and kept only 1 (main) file that each library has, and it worked. Is there a way to do this all automatically? Also, is it advisable to do it? (i.e. combine all vendor libraries into 1 file) I

grunt-wiredep on multiple files with different dependencies

…衆ロ難τιáo~ 提交于 2019-12-03 12:02:27
The current project structure is somewhat like this: -index.html | -bower.json | +-bower_components The proposed project structure will add a few more static html files in the project root. Till now I have been managing all the frontend dependencies in bower.json and had it automatically included in index.html using the grunt-wiredep task. But with new files getting added, each file will have different set of dependencies. -index.html | -file-with-some-other-bower-dependency.html | -bower.json | +bower_components What would be an efficient way of managing these files with different bower

Is there an injector like grunt-wiredep that works for NPM dependencies?

落花浮王杯 提交于 2019-12-03 10:47:32
问题 Most packages nowadays are available in both NPM and Bower. I have to have NPM around, but I'd like cut Bower out of the loop on my project. I'm currently relying on grunt-wiredep to create <script> includes in my index.html . This tool looks at all of the Bower configs to pull all the necessary js and css files into my index.html for me. Is there a tool that will do the same for NPM dependencies? 回答1: You would be able to do that using a module bundler like Browserify or Webpack. For getting

Is there an injector like grunt-wiredep that works for NPM dependencies?

ぃ、小莉子 提交于 2019-12-03 01:17:45
Most packages nowadays are available in both NPM and Bower. I have to have NPM around, but I'd like cut Bower out of the loop on my project. I'm currently relying on grunt-wiredep to create <script> includes in my index.html . This tool looks at all of the Bower configs to pull all the necessary js and css files into my index.html for me. Is there a tool that will do the same for NPM dependencies? You would be able to do that using a module bundler like Browserify or Webpack . For getting started with Browserify , you will need to first install it via NPM globally npm install -g browserify