gruntjs

How make bower build the package?

早过忘川 提交于 2019-12-03 16:04:43
问题 Is there a way to make bower run a package grunt after it was cloned from GitHub? I'm trying to use Bower but one of the packages I'm using is the Bootstrap extension, x-editable. The problem is that while other packages push a fully built version to github so when installed by Bower you have a built version x-editable expect you to run a grunt file to build the package. That is a common practice in other package managers like npm but I could find how to make Bower build it on install. Which

How do I get a grunt task working with a Cloudbees Jenkins build

自闭症网瘾萝莉.ら 提交于 2019-12-03 15:53:18
I'm trying to get a Jenkins build up and running on Cloudbees. I've successfully gotten NodeJs installed and my source pulled from my BitBucket repository. I am trying to run my grunt task to minify and concatenate my JS and CSS files before deploying. However, I am not able to run the grunt program, even though it is successfully installed. Below is my build script: curl -s -o use-node https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/node/use-node NODE_VERSION=0.8.0 \ source ./use-node npm install npm install grunt grunt I've tried installing grunt with and without the

Grunt Typescript can't find angular core

别来无恙 提交于 2019-12-03 15:50:52
Question Why cant my Grunt Typescript compiler find the angular core? I guess it has something to do with the paths so the compiler cant find the libs in the node_modules directory. Error typescript/add.component.ts(1,25): error TS2307: Cannot find module 'angular2/core'. Setup Gruntfile.js Task typescript: { all: { src: ['typescript/**/*.ts'], dest: 'javascript/frontend', options: { target: "es5", module: "system", moduleResolution: "node", emitDecoratorMetadata: true, experimentalDecorators: true, removeComments: false, noImplicitAny: false } } typescript/add.component.ts import {Component}

Programmatically set options for grunt task?

对着背影说爱祢 提交于 2019-12-03 15:43:51
问题 I have a grunt task that looks at options with grunt.option('foo') . If I'm calling this task from grunt.task.run('my-task') , how can I change those arguments? I'm looking for something like: grunt.task.run('my-task', {foo: 'bar'}); which would be the equivalent of: $ grunt my-task --foo 'bar' Is this possible? (This question is another issue I ran in to but is not exactly the same, because in this case I don't have access to the original task's Gruntfile.js.) 回答1: If you can use task-based

Trying to set up Grunt to automate some testing, testing works fine in the browser but not at the command line

ⅰ亾dé卋堺 提交于 2019-12-03 15:34:34
I'm currently trying to incorporate GruntJS with a few plugins (PhantomJS Qunit and Connect plugins). However, setting up a simple test is throwing me errors and I can't find the solution despite a few days of searching. I'm using a local web server (MAMP) and the website is running on a CMS. Running the tests by accessing the test template in a browser works fine, but when trying to access the same tools via the command line using sudo grunt test PhantomJS return an odd error: Running "qunit:all" (qunit) task Testing http://user-guides:80/test/test.html Warning: PhantomJS timed out, possibly

How to get Grunt-Contrib-Copy to copy files/directories relative to given source path

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 15:28:24
问题 First time using this task and what I'm trying to achieve is the following: copy all directories/files from src/js/bower_components/* to build/assets/js/vendor/ I've tried using cwd property but it doesn't work at all when I use it.. I've set it to: src/js/bower_components/ From src . ├── Gruntfile └── src └── js └── bower_components └── jquery I currently get: . ├── Gruntfile └── build └── assets └── js └── vendor src └── js └── bower_components └── jquery What I'd like . ├── Gruntfile └──

Use Javascript frameworks without build tools like grunt and gulp? [closed]

随声附和 提交于 2019-12-03 15:05:06
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed last year . I'm trying out some modern Javascript frameworks like Angular, React, Vue and Ember, and they all want me to use build tools like npm , grunt , gulp , maven , etc. Web-programming used to be fun. Just change some files, refresh the browser and see if it works. Now every time I change something, I have to build it again, which takes quite some time. I really hate to see

References to font (font-awesome) resources are not updated in yeoman/angular grunt build

半腔热情 提交于 2019-12-03 15:01:25
问题 I'm aware of the SO threads about this (I've linked them below), but unfortunately I couldn't solve this with them, so please allow me this question :-) I've bootstrapped an AngularJS project with Yeoman and thus rely on a grunt.js build utilizing bower.js and SCSS. I want to use font-awesome and the glyphicons-halflings-regular from bootstrap-sass-official. When running "grunt serve" everything is fine, but when I want to create a fileset for distribution, the references to the font files

Use Global Variable to Set Build Output Path in Grunt

巧了我就是萌 提交于 2019-12-03 15:00:27
I have a couple grunt tasks and I am trying to share global variables across those tasks and I am running into issues. I have written a some custom tasks which set the proper output path depending on the build type. This seems to be setting things correctly. // Set Mode (local or build) grunt.registerTask("setBuildType", "Set the build type. Either build or local", function (val) { // grunt.log.writeln(val + " :setBuildType val"); global.buildType = val; }); // SetOutput location grunt.registerTask("setOutput", "Set the output folder for the build.", function () { if (global.buildType === "tfs

Big JS app testing - avoiding multiple karma.conf.js files

岁酱吖の 提交于 2019-12-03 14:38:39
问题 I use karma + jasmine + phantom for my headless Javascript tests. The problem I have is that I have a really big app consisting of a lot of JS modules which I want to test. So I need custom mocks for each case and custom includes for each case. karma.conf.js allows me only to have files array which consist of patterns for all the files to include which is GREAT if my app would be small and not a big app with ton of files and modules. My solution for now - create multiple karma.conf.js files