grunt-contrib-concat

Grunt: Access Sequence/List Data from External YAML File

亡梦爱人 提交于 2020-06-28 05:19:13
问题 I am trying to access values from an external YAML file in my Gruntfile using: external = grunt.file.readYAML('_config.yml'); The _config.yml file has the following example data: computer: parts: - name: brand1 type: cpu - name: brand2 type: gpu - name: brand3 type: hd I've been trying to access the multi-level YAML data using <%= %> grunt templating to get the different name and type values. module.exports = { concat: { src: ['htdocs/<%= external.computer.parts['type'] %>/<%= external

how to write advanced concat grunt script that find matches in seperate folders?

安稳与你 提交于 2020-01-06 14:52:29
问题 I need to write an advanced concat script using grunt. here is my boilerplate: ___js |____dist | |____vents | | |____commonEvents.js | | |____compare.js |____libs |____src | |____events | | |____carousel.common.js | | |____compare.js | | |____styles.common.js | |____handlers | | |____carousel.common.js | | |____compare.js | | |____style.common.js I want the concat task to look into "src/events" and "src/handlers" directory and find all the files ending with ".common.js" and concat them

bower add Jquery UI theme in style

亡梦爱人 提交于 2020-01-02 10:03:52
问题 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 . 回答1: This is not issue with library .

Is 'El Capitan's' rootless breaking old grunt configs?

不想你离开。 提交于 2019-12-22 06:58:13
问题 After migrating to El Capitan, it seems users are experiencing an issue with grunt installations, possibly related to the rootless changes of El Capitan. In particular, running the grunt --force command results in EPERM errors. The workflow is as follows: Assuming npm has been installed, navigate to the grunt directory with package.json and gruntfile.js and invoke grunt: grunt --force Example Gruntfile.js file contents: module.exports = function(grunt) { // All configuration goes here grunt

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

╄→尐↘猪︶ㄣ 提交于 2019-12-21 01:27:11
问题 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? 回答1: 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

Interpolated array in Grunt template is interpreted as a string

吃可爱长大的小学妹 提交于 2019-12-12 02:56:09
问题 Previous title: "Why is Grunt's concat task not using dynamic configuration values?" I am trying to dynamically configure the files that are concatenated by Grunt, and in doing so I came across this issue where the grunt-contrib-concat plugin does not seem to pick up the dynamically set values. At first I thought I was doing something wrong, but after creating my own task and using the same dynamic values everything came out just as intended. So that leaves the question of why is the grunt

new to grunt - warning: task “concat, uglify” not found

て烟熏妆下的殇ゞ 提交于 2019-12-12 02:27:14
问题 As the title says I'm new to Grunt. I am following a tutorial located at: http://24ways.org/2013/grunt-is-not-weird-and-hard/. It is an older tutorial but most seems to work the same. I have installed "grunt-contrib-concat" and "grunt-contrib-uglify" and can run both individually. But when I run grunt , I get the following error: Warning: Task "concat, uglify" not found. Use --force to continue. Aborted due to errors. I've been looking around and can't seem to figure it out. My files are as

using grunt to CONCATENATE FILES in sequence

痞子三分冷 提交于 2019-12-11 20:12:59
问题 i'm new to grunt and i want to concatenate java script files to one file using grunt and i have 6 js files but they need to be in some sequence to run the code without errors like jquery should loaded in first but the result file which came from grunt not preserve this sequence i tried many things like arrange them in src or make more than one folder but it didn't work note - when i make manual concatenation in one file by copy and paste it works fine so is there any command to make grunt

Grunt. Programmatically merge corresponding files in parallel folders with concat

只愿长相守 提交于 2019-12-11 14:56:11
问题 that's my first post on StackOverflow!:D I mean... ever! Anyway... I couldn't find any clear answer to this, and maybe I'm missing something really obvious. I'm really new to Grunt as well. I'm looking for a way to merge parallel css files in two different folders in few lines of code. So a better solution than doing this for each couple of files: concat : { options : { separator : '\n' }, css : { files:{ '<%= pkg.dest %>/app/css/main_blue.css' : [ 'app/css/base/main_blue.css', 'app/css

requires a peer of grunt@>=0.4.0

那年仲夏 提交于 2019-12-06 18:41:48
问题 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