gruntjs

Grunt build not working in Yo Angular

和自甴很熟 提交于 2019-12-14 03:55:37
问题 I build a Angular App with Yo angular-genertor, I was building the app with Grunt Build fine, then I added Bootstrap 3 and also npm install grunt-bower-install I added these lines to the Grunt file module.exports = function (grunt) { require('load-grunt-tasks')(grunt); require('time-grunt')(grunt); //ADDED THIS LINE grunt.loadNpmTasks('grunt-bower-install'); grunt.initConfig({ yeoman: { // configurable paths app: require('./bower.json').appPath || 'app', dist: 'dist' }, //ADDED THESE LINES

Combining files using requirejs and grunt

好久不见. 提交于 2019-12-14 03:44:41
问题 I am trying to combine files using the grunt plugin for requirejs: https://www.npmjs.org/package/grunt-contrib-requirejs Here is the configuration: requirejs: compile: options: #appDir: './' baseUrl: "client" mainConfigFile: "client/test1.js" name: "test1" out: "build/test.js" onModuleBundleComplete: (data) -> outputFile = data.path fs.writeFileSync(outputFile, amdclean.clean( 'filePath': outputFile )) wrap: start: "" end: "" Here are the input and output javascript Input: test1.js var x =

How to run Grunt tasks during Xcode build phase?

淺唱寂寞╮ 提交于 2019-12-14 03:42:08
问题 I am developing a web application, which includes GruntJS build tasks. I deploy it using Phonegap/Cordova in the Xcode IDE. I would like to integrate the grunt build process into my Xcode project to simplify running the project. Ideally Xcode should run all the processes that I manually invoke using the Grunt CLI beforehand. My Gruntfile.js lies within the root Xcode project directory. I have a local grunt install (0.4.0rc4) in node_modules and grunt-cli installed globally. project - multiple

Acces-Control-Allow-Origin with Grunt Server and Flask SocketIO-app

我与影子孤独终老i 提交于 2019-12-14 03:15:58
问题 I'm getting the following error message when trying too connect my angular app, run with the Grunt server, with a socketIO Flask app: XMLHttpRequest cannot load http://localhost:8080/socket.io/1/?t=1381872821951. Origin http://localhost:9000 is not allowed by Access-Control-Allow-Origin. I have been doing some digging about this problem already and I know it comes from the fact the client (angularjs) is doing a request to a different server from which the response came. Which of the both

Gruntfile.js - Throwing error 'Recursive process.nextTick detected"

筅森魡賤 提交于 2019-12-14 02:14:48
问题 I have defined a simple Gruntfile.js per the official instructions and yet I am getting a warning when I run the grunt watch ('$ grunt watch') or grunt default task ('$ grunt '). The error is: (node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. I have read the related StackOverflow question and answer here: grunt throw "Recursive process.nextTick detected", but that didn't resolve my issue. My

Getting the angular app to run when using protractor

不想你离开。 提交于 2019-12-13 21:28:26
问题 I must be missing something here ... I'm trying to use protractor to run e2e tests for my angular application. The configuration file is something along the lines of: allScriptsTimeout: 11000, specs: [ 'src/**/*.e2e.js' ], capabilities: { browserName: 'firefox' }, baseUrl: 'http://localhost:8000/app/', framework: 'jasmine', jasmineNodeOpts: { showColors: true, isVerbose : true, includeStackTrace : true, defaultTimeoutInterval: 30000 } The test looks something like this: describe('example test

grunt assemble multiple files from one datafile

爷,独闯天下 提交于 2019-12-13 19:44:12
问题 I am trying to assemble multiple files using one template and one data file data.json { "site": { "title": "A Blog", "author": "Jon Schlinkert" }, "pages": [ { "metadata": { "title": "Blog Post #1", "summary": "", "categories": [""], "layout": "post.hbs", "gists": ["5898072"] }, "content": "This would get passed into the `body` tag, but it's not necessary if you only need to add a post from a gist." }, { "metadata": { "title": "Blog Post #2", "summary": "", "categories": [""], "layout": "post

Unique grunt globbing issue

我只是一个虾纸丫 提交于 2019-12-13 18:32:28
问题 Animate.css is an amazing library that I'm pulling into my project via bower (can't change the folder name). Unfortunately, the folder's name is "animate.css". I want to glob in my whole project (including bower_components) for /**.*.css . Unfortunately, grunt gets angry because animate.css is a folder, not a file. I need a way to ignore the folder, but not the file. Any tips? Here's what my task looks like now: cssmin: { deploy: { files: { '<%= config.prod %>/styles.min.css': ['<%= config

Set Env variables based on grunt task

喜你入骨 提交于 2019-12-13 15:18:53
问题 I have a webapp (emberjs) that I need to set env variables based on grunt task. So when I run grunt server it would choose development , and url will be set to localhost:5000 . But when i do grunt build , it would choose production and url will be set to production.com . The main issue for me is, how to read those variables from ember. Or how to make grunt look for a variable and change it based on the task Is it possible to do something like that? 回答1: After much googling and no good

Failing to setup a test environment with grunt, phantomjs and mocha

房东的猫 提交于 2019-12-13 13:29:34
问题 I'm trying to setup a test environment with grunt, phantomjs and mocha using yeoman. The problem is when run the test task I got the following warning: Warning: PhantomJS timed out, possibly due to a missing Mocha run() call. Use --force to continue. But I'm calling mocha.run() in my index.html file. Here it is: <!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Mocha Spec Runner</title> <link rel="stylesheet" href="bower