gruntjs

How to specify multiple source-maps in uglify grunt task?

喜你入骨 提交于 2019-12-18 05:46:06
问题 I am using grunt-contrib-uglify plugin in my grunt 0.4 . I have the following task: uglify: { dist: { options: { sourceMap: 'dist/sm/sm.js' }, files: grunt.file.expandMapping(['*.js'], 'dist/js', { cwd: 'dist/js' }) } }, As you can see, uglify is configured to compress multiple files, and there is only one source-map specified. (I am not able to figure out a way to specify multiple sourcemap outputs). Also, uglify is overwriting the soucemap after compressing each js file. How do I configure

how to run npm/grunt command from jenkins

五迷三道 提交于 2019-12-18 04:29:12
问题 I'm new to this area and was trying to run the following commands from jenkins: npm install grunt quickStart So far I've a jenkins running on a window machine as a window service and I've also installed NodeJs plugin for jenkins. However, I'm stuck and quit confused following instructions here, its asking me to to add one or mode nodeJs installation and I could not find those setting and not even sure if I even need them in the first place. Here is the bit that's asking me to do: I cannot see

can grunt server use for production application deployment

青春壹個敷衍的年華 提交于 2019-12-18 01:15:15
问题 i am at fresher level,i want to know about the Grunt server is able to handle production application deployment. .. please help me. 回答1: Yes you can run grunt in production, You can see this post for how to do it. What's the purpose of gruntjs server task? But, i woudn't recommend that . Grunt server is basically designed to help the developer to run your app, without using an actual server. Apart from serving pages, It does some tasks like compiling sass, less files and reloading the page

FontAwesome fails to load fonts locally and in electron app

元气小坏坏 提交于 2019-12-17 23:42:47
问题 I have downloaded FontAwesome using npm and then copied the css-file and the fonts into the right folders in the root-diretory of my electron-application using grunts copy task. So far so good. Everything is where it is supposed to be. Now, when i am referencing FontAwesome in my app, the icons do not get loaded. These are the errors that I get in the console: Failed to decode downloaded font: file:///path/to/fonts/fontawesome-webfont.woff2?v=4.4.0 OTS parsing error: Failed to convert WOFF 2

Access node.js/grunt server through localhost:port on virtual machine

筅森魡賤 提交于 2019-12-17 23:05:40
问题 I'm running a node.js server locally on port 9000 through Grunt. I also have a virtual machine running (vmware), but I can't access the node server through that. I've already configured the VM to access my Apache server on the host through localhost, but :9000 gives 'not found'. Anyone know how to do this? 回答1: Got it! In my project's Grunt.js file there was this setting: grunt.initConfig({ ... connect: { options: { port: 9000, // Change this to '0.0.0.0' to access the server from outside.

Cannot find module 'internal/fs' after upgrading to node 7

杀马特。学长 韩版系。学妹 提交于 2019-12-17 23:04:30
问题 We've recently tried to upgrade to node v7.0.0 on our build server, but started to have issues during the application build task failing on the "bower_concat" step: Loading "bower-concat.js" tasks...ERROR Error: Cannot find module 'internal/fs' What we have installed: node v7.0.0 (installed via yum "nodesource" repository) npm 4.0.1 using grunt (if this is relevant) grunt-bower-concat 0.6.0 The grunt build task configuration: grunt.registerTask( 'build:prod', [ 'clean:prod', 'copy:prod',

npm windows install globally results in npm ERR! extraneous

北慕城南 提交于 2019-12-17 22:29:15
问题 I am new to grunt and npm. So I am trying some "cookbook-example" on the site 'http://tech.pro/tutorial/1190/package-managers-an-introductory-guide-for-the-uninitiated-front-end-developer#front_end_developers'. You should not have to look there now, but I thought it could be good to share the site. So far so good, til it comes to the global installing. (Ok, some errors I had to figure out, but now I have working npm). When it comes to the point trying to install something globally I get stuck

Pass Options to a grunt task while running it

旧巷老猫 提交于 2019-12-17 22:23:06
问题 I thought there was a way to do this, and that I'd stumbled on it before. I have read these answers but they're not what I'm talking about: Programmatically pass arguments to grunt task? Grunt conditional option Accessing the process / environment from a grunt template I also looked at the grunt docs but it isn't there: https://github.com/gruntjs/grunt/wiki/Configuring-tasks Is there a syntax like this? grunt.task.run 'htmlmin:allFiles:collapseWhitespace=true' 回答1: You can use that syntax but

Grunt debugging from Webstorm

邮差的信 提交于 2019-12-17 22:05:09
问题 Its possible to run grunt tasks within WebStorm through external tools. However, is it possible to avail debugging with external tools? By running tasks like grunt server or grunt test within WebStorm, it would make debugging a lot easier if it's possible with external tools like grunt. 回答1: You have to run grunt-cli as a Node application: Create a new Node.js Run/Debug configuration: Run->Edit configurations... In Path to Node choose your node binary, ie: /Users/someuser/nvm/v0.10.5/bin/node

ReferenceError: Can't find variable: require at

时间秒杀一切 提交于 2019-12-17 21:59:32
问题 I have a question about using jasmine with Grunt. I keep getting an error, ReferenceError: Can't find variable: require at whenever I run my jasmine tests. Here is my jasmine entry for my Gruntfile.js : jasmine: { js: { src: jsFiles, options: { specs: 'tests/*_spec.js', helpers: 'tests/helpers/*', vendor: 'vendor/*' } } }, I can run a dummy test without a require just fine, but when I include a require in a test, like so, I get the require error. var testD = require('../src/events_to_actions'