grunt-contrib-concat

bower add Jquery UI theme in style

早过忘川 提交于 2019-12-06 04:25:45
In my project I have included to jQuery UI.I am using Bower, Yeoman and Grunt. I added jQuery UI: bower install jquery-ui --save . but the jQuery UI theme was not included in Bower style components. <!-- build:css(.) styles/vendor.css --> <!-- bower:css --> <link rel="stylesheet" href="bower_components/components-font-awesome/css/font-awesome.css" /> <!-- endbower --> <!-- endbuild --> <!-- build:css(.tmp) styles/main.css -> Help me with this problem . This is not issue with library . its in Grunt-wiredep which has problem in injecting dependencies which has file name like jquery-ui,socket-io

requires a peer of grunt@>=0.4.0

自闭症网瘾萝莉.ら 提交于 2019-12-05 01:22:08
Why do I get the error below? My grunt version is > v0.4.0 npm install grunt-contrib-concat --save-dev +-- UNMET PEER DEPENDENCY grunt@>=0.4.0 Error messages: ..Projects\Hartz\Hartz>npm install grunt-contrib-concat --save-dev Hartz@1.0.0 C:..\Projects\Hartz\Hartz +-- UNMET PEER DEPENDENCY grunt@>=0.4.0 `-- grunt-contrib-concat@1.0.1 npm WARN grunt-contrib-jshint@1.0.0 requires a peer of grunt@>=0.4.0 but none was installed. npm WARN grunt-contrib-concat@1.0.1 requires a peer of grunt@>=0.4.0 but none was installed. npm WARN Hartz@1.0.0 No repository field. grunt -V grunt-cli v1.2.0 grunt v1.0

How can I skip a grunt task if a directory is empty

ぐ巨炮叔叔 提交于 2019-12-03 07:03:49
I'm using grunt-contrib's concat and uglify modules to process some javascript. Currently if src/js/ is empty, they will still create an (empty) concat'd file, along with the minified version and a source map. I want to task to detect if the src/js/ folder is empty before proceeding, and if it is, then the task should skip (not fail). Any ideas how to do this? The solution may not be the prettiest, but could give you an idea. You'll need to run something like npm install --save-dev glob first. This is based on part of the Milkshake project you mentioned. grunt.registerTask('build_js', function

Grunt concat files on a different domain or on different server

北城以北 提交于 2019-12-02 01:51:01
问题 Edit working version and explanation I want to concat files from different server into my destination folder using grunt, and grunt-concat and with something like that: concat: { options: { separator: ';' }, dist: { src: ['dev.staticcontent.com/media/clientcontent/library/*.js', 'js/*.js'], dest: 'dist/<%= pkg.name %>.js' } }, each time I tried, I received no error from grunt, but my dist/marketing-home.js file is empty... Like it didn't find anything. Console: C:\Project\My>grunt Running

Gruntjs: replace templates when copying a file

[亡魂溺海] 提交于 2019-12-01 04:18:10
I am writing a Gruntjs script which should concatenate + replace template of some JS files into target directory (contrib-concat) copies + replace template of some other files (contrib-copy) package the files into a zip file contrib-concat has a boolean option process to replace templates (like <% pkg.version %> ) when processing files. contrib-copy also has an option processContent , however I don't know how to trigger template processing with this option. module.exports = function(grunt) { grunt.initConfig({ meta: { banner: ' \ /*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%=

Gruntjs: replace templates when copying a file

岁酱吖の 提交于 2019-12-01 02:27:19
问题 I am writing a Gruntjs script which should concatenate + replace template of some JS files into target directory (contrib-concat) copies + replace template of some other files (contrib-copy) package the files into a zip file contrib-concat has a boolean option process to replace templates (like <% pkg.version %> ) when processing files. contrib-copy also has an option processContent , however I don't know how to trigger template processing with this option. module.exports = function(grunt) {

Replace all the text with specified replacement using grunt replace

萝らか妹 提交于 2019-11-29 17:42:45
I have a .html file which contains id="fixedtext", I want to replace all these id with id="uniquetext" the grunt-text-replace just replaces the first id it finds and doesnot parse the entire text. Any idea how can I make either grunt-text-replace https://github.com/yoniholmes/grunt-text-replace or grunt-replace https://www.npmjs.com/package/grunt-replace to do this for the entire document and not just for the first occurrence. replace: { dist: { options:{ patterns:[{ match:'id="fixedtext"', replacement: 'id="'+something[i++] +'"' }], files:[ { expand: true, src:['./source.html'], dest:'./dest

ENOTSUP using Grunt

本小妞迷上赌 提交于 2019-11-29 14:34:01
I'm using Grunt to minify and concatenate files for an AngularJS web application. Our source is on a file share and I'm connecting to it via a mapped drive. Whenever Grunt runs over my source directory, I get an error on one of my concat tasks. The error is "ENOTSUP, operation not supported on socket". If I copy the source, local, Grunt runs, fine. For the sake of our source control, I need Grunt to watch and run over the mapped drive. The concat task uses grunt-contrib-concat. I've tried reinstalling Node and rolling back grunt-contrib-concat to version 0.4.0. That didn't work. Any help/ideas

Grunt concat + uglify with sourcemaps

蓝咒 提交于 2019-11-28 17:14:06
I use concat to merge JS files into one file and uglify to minimize the JavaScript. How can I create a sourcemaps file that uses the source JS files? My current gruntfile: concat: { options: { // define a string to put between each file in the concatenated output separator: ';' }, dist: { // the files to concatenate src: ['<%= config.src %>/js/**/*.js'], // the location of the resulting JS file dest: '<%= config.dist %>/js/main.js' } }, uglify: { dist: { files: { '<%= config.dist %>/js/main.min.js': ['<%= concat.dist.dest %>'] } } }, Damon Friendship You need to enable source maps on both the

Why is it recommended to use concat then uglify when the latter can do both?

烂漫一生 提交于 2019-11-28 16:31:28
I keep seeing the recommendation for making JS files ready for production to be concat then uglify. For example here , in on of Yeoman's grunt tasks. By default the flow is: concat -> uglifyjs. Considering UglifyJS can do both concatenation and minification, why would you ever need both at the same time? Thanks. Running a basic test to see if there is a performance difference between executing concat and then uglify vs. just uglify . package.json { "name": "grunt-concat-vs-uglify", "version": "0.0.1", "description": "A basic test to see if we can ditch concat and use only uglify for JS files."