gruntjs

Assets missing in Angular application built using grunt

怎甘沉沦 提交于 2019-12-20 09:48:43
问题 I have built an application using Yeoman and AngularJS (and all the stuff that goes along with it like Grunt and Bower). It all works perfectly when running locally using grunt serve . However, after running grunt and deploying the application, there are a couple of missing assets and I'm not sure what the best way to solve it is. Firstly, running Grunt seems to copy the images across to dist but it renames them without adjusting the references in the CSS. app/images/uparrow.png becomes dist

Grunt livereload with node.js application

荒凉一梦 提交于 2019-12-20 09:37:51
问题 I have written an application in Node.js (with Express & socket.io) and I would like to use Grunt to compile my client-side stuff with livereload while developing and being connected to Node.js application. How can I do this? (Preferably without running Node.js app in another port and client in another port, because of pathing and cross-domain issues) I installed also Yeoman and it's using out of the box grunt-contrib-livereload package, but from what I understood it's using Node.js Connect

How should I configure grunt-usemin to work with relative path

百般思念 提交于 2019-12-20 08:38:52
问题 I have a grunt project backed by a yeoman-generator that I've built based on the generator-webapp, if it's of any help, you can find it on GitHub The grunt project makes us of the grunt-usemin task. My project involve building a multilingual website, and to keep things clean, I've decided to put all the pages written in a language in a folder name after the 2-letter shortcode of the said language. | project/ |--dist/ |----en/ |------index.html |------404.html |------... |----fr/ |------index

How should I configure grunt-usemin to work with relative path

眉间皱痕 提交于 2019-12-20 08:38:33
问题 I have a grunt project backed by a yeoman-generator that I've built based on the generator-webapp, if it's of any help, you can find it on GitHub The grunt project makes us of the grunt-usemin task. My project involve building a multilingual website, and to keep things clean, I've decided to put all the pages written in a language in a folder name after the 2-letter shortcode of the said language. | project/ |--dist/ |----en/ |------index.html |------404.html |------... |----fr/ |------index

QunitJS-Tests don't start: PhantomJS timed out, possibly due to a missing QUnit start() call

扶醉桌前 提交于 2019-12-20 06:36:29
问题 I have set up my test environment as described here with QunitJS + PhantomJS + GruntJS: http://jordankasper.com/blog/2013/04/automated-javascript-tests-using-grunt-phantomjs-and-qunit/ If I execute the tests (grunt task) locally everything works fine. But If I try to execute the tests on our buildserver it throws following error: I checked the URL and path several times and the html-document for starting the qunit tests is also available on the configured path on our build server. Any ideas

Grunt uglify not finding files

懵懂的女人 提交于 2019-12-20 02:32:30
问题 I have the following directory structure: --development -js -pages --js -pages I'm trying to take all files in development/js/pages and output them js/pages and minify them using grunt uglify but still keep seperate files - I don't want to combine all the files together. I've tried the following: build: { src: 'development/js/pages/*.js', dest: 'js/page', options: { sourceMap: true, compress: true, mangle: true } } but this gives me an error: unable to write js/page file Then I tried this,

Pig: loading a data file using an external schema file

风格不统一 提交于 2019-12-19 19:49:42
问题 I have a data file and a corresponding schema file stored in separate locations. I would like to load the data using the schema in the schema-file. I tried using A= LOAD '<file path>' USING PigStorage('\u0001') as '<schema-file path>' but get an error. What is the syntax for correctly loading the file? The schema file format is something like: data1 - complex - - - - format - - data1 event_type - - - - - long - "ends '\001'" data1 event_id - - - - - varchar(50) - "ends '\001'" data1 name

Latest version of jQuery for TypeScript is throwing syntax errors? [duplicate]

浪尽此生 提交于 2019-12-19 18:56:12
问题 This question already has answers here : Successful build with many errors in typescript typing files (2 answers) Closed 4 years ago . I am almost 100% sure I am doing something wrong to cause this as I am incredibly new to TypeScript and have been updating an old codebase. When I update jQuery to the latest version I get the following errors when I try and build my project using grunt. /jquery/jquery.d.ts(279,40): error TS1005: ',' expected. /jquery/jquery.d.ts(279,61): error TS1005: '='

grunt uglify task failing

萝らか妹 提交于 2019-12-19 17:47:03
问题 When running grunt, I get the following error: Warning: Unable to write "client/dist/js/build.js" file (Error code: undefined). Use --force to continue. The config of uglify in my Gruntfile.js : uglify: { build: { src: ['client/src/js/*.js'], dest:['client/dist/js/build.js'] } } I'm using grunt-contrib-uglify . Any ideas why this is happening? 回答1: Assuming your Grunt Version is 0.4.0, AFAIK you are not using the most recent Syntax (See https://github.com/gruntjs/grunt-contrib-uglify#usage

grunt usemin doesnt affect the html file(index.html)

眉间皱痕 提交于 2019-12-19 17:37:51
问题 i have a grunt script that uses usemin but the weird thing is is that the index.html file is not affected by usemin at all! it means that my file still has all the <!-- build:css styles/main.css --> <link rel="stylesheet" href="styles/style.css"> <link rel="stylesheet" href="styles/bs-growl-notifications.css"> <!-- endbuild --> the weirdest part in the log is this(it does nothing although it found the blocks-see full log): Processing as HTML - dist/index.html Update the HTML to reference our