gruntjs

Javascript variables in Gruntfile.js?

狂风中的少年 提交于 2019-12-06 17:24:53
问题 I'm maintaining a web application that uses Grunt extensively. I have to minify, copy my html, css, js files to different locations in different times. So to make it easy I created a simple javascript variable in my GruntFile.js as follows: var path="C:/dist"; uglify: { options: { mangle: false }, my_target: { files: { path+'/js/jsFile.js': ['src/js/jquery-1.10.2.min.js'] } } } When I am building this i am getting the following error >> SyntaxError: Unexpected token + Can't I Use path

yeoman generator font awesome

Deadly 提交于 2019-12-06 17:05:57
问题 I created a mobile application with the yeoman mobile-generator. Now I want to add font awesome. I tried this, but not really works in the compiling process. A small advice or experience would be great Okay, it's really a bit unclear. Sorry. The compiling process works, but console says 404 not founds for the fonts. It's not really clear to me how is a good way to do this. Creating the CSS from the scss files, implemeted the .min.css in the index.html with "<-- build: ... -->" or something

Warning: Running “compass:server” (compass) task

别来无恙 提交于 2019-12-06 16:35:02
问题 D:\Projects\mallspk>grunt serve Running "serve" task Running "clean:server" (clean) task >> 0 paths cleaned. Running "wiredep:app" (wiredep) task Running "wiredep:test" (wiredep) task Running "wiredep:sass" (wiredep) task Running "concurrent:server" (concurrent) task Warning: Running "compass:server" (compass) task Warning: Command failed: 'compass.bat' is not recognized as an internal or exter nal command, operable program or batch file. Use --force to continue. I have install the Yo angular

Webpack Loader not Working on Jenkins CI Build

纵饮孤独 提交于 2019-12-06 16:26:31
问题 I'm trying to integrate Weback into my current project and am having problems with a custom loader I built to create a concat banner and footer around each module's file contents, and to inject the __filename value. Everything works great doing local builds with grunt https://github.com/optimizely/marketing-website/tree/dfoxpowell/jordan-webpack-try/grunt/webpack grunt server //or grunt build --env=production //production build for uglify/dedupe Our staging build on Jenkins successfully runs

Development Workflow - Bootstrap (Less), Bower and Grunt

我是研究僧i 提交于 2019-12-06 15:07:05
I am trying to step up my game as far as my folder structure and workflow is considered. I have recently discovered that front end package management and automation of tasks are key to improve speed, decreasing dev time, decrease file size and increase profit. My issue is I am not too sure what the best method of using these tools are. I have a builds folder, which includes a dev and prod folder. My components are outside this folder in the bower_components folder. I usually customise bootstrap and take advantage of it's variables file and mixins. I have copied the bootstrap.less file, and the

grunt-init template conditional prompts

假装没事ソ 提交于 2019-12-06 14:49:13
I'm creating a new grunt-init template for my project and was wondering if there is a way to do conditional prompts based on the answers given to previous prompts. My main goal is to be able to use the Github API to create an issue when I create a new module in my project. After asking for the module information, I would ask if a Github issue should be created. If yes, then ask for information like assignee, milestone, labels. If no, I don't care about any of those features. Right now, I can just default them to blanks, but I'd like to just skip those prompts entirely. The init property

'define' is not defined error on RequireJS & Webapp Yo generator

北慕城南 提交于 2019-12-06 14:32:06
问题 I have struggled a few days to figure this out,, but finally I need your help today. my repo: https://github.com/seoyoochan/bitsnut-web what I want to achieve : - Load and optimize r.js - Write bower tasks for RequireJS and r.js : tasks are: minify & uglify & concatenation for RequireJS, and optimise with r.js on production - How to exclude js script tags in index.html when using wiredep tasks and load them through RequireJS loader? I use Yeoman 'Webapp' generator and generated the scaffold

Use Foundation instead of Bootstrap with SASS in a yeoman created application

喜夏-厌秋 提交于 2019-12-06 14:17:59
问题 I've created an AngularJS application with yeoman. Now I want to switch the front-end framework from bootstrap to foundation. After I installed foundation with bower install foundation --save Grunt will add the following line to my index.html file. <link rel="stylesheet" href="bower_components/foundation/css/foundation.css" /> How can I force grunt to use the sass way. For the sass way the index.html is untouched (except js files) but the main.scss file nedds the following line or simliar

Understanding r.js options w/grunt & backbone and relative paths

旧街凉风 提交于 2019-12-06 13:45:57
I'm trying to figure out how to use r.js. I keep getting errors thrown such a module path does not exist, or files getting dumped where they shouldn't be. I've got a single page application that is integrated with wordpress. I've adopted this backbone boilerplate for my general structure, although I've set things up quite different. My file structure is shown below. .Theme Folder ├── _assets | ├── _application | | ├── css | | ├── fonts | | ├── img | | ├── _js | | | ├── main.js //this is my require.js config file | | | ├── _app //here's where the boilerplate structure comes into play | | | ├──

Grunt concat failing with “Unable to find local grunt”

纵饮孤独 提交于 2019-12-06 13:45:22
问题 I have installed Grunt like so `npm install -g grunt-cli successfully. I have also installed the grunt-contrib-concat libary succesfully like so: npm install grunt-contrib-concat --save-dev I have created a package.json : { "name": "my-project-name", "version": "0.1.0", "devDependencies": { "grunt": "~0.4.1", "grunt-contrib-jshint": "~0.1.1", "grunt-contrib-nodeunit": "~0.1.2" } } and a Gruntfile.js : module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json