gruntjs

Where did the grunt min task go?

限于喜欢 提交于 2020-01-04 12:57:11
问题 I watched many tutorials on grunt where some min task was used. I couldn't find any plugins referring to similar task. I would guess that devs have updated it and renamed to uglify am i right? And another issue i had was the installation of grunt. Can it still be installed globally, or should i install grunt-cli globally and grunt locally in order to use it for my local projects?? This: sudo npm install -g grunt doesn't work for me, only: sudo npm install -g grunt-cli npm install grunt --save

Loading jQuery into Grunt.js using the grunt-contrib-jasmine plugin

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-04 12:36:50
问题 I am trying to load jQuery into my tests using Grunt.js and the grunt-contrib-jasmine plugin. Here is a gist of my Gruntfile.js and I've referenced jQuery in the jasmine.options.vendor array as the documentation suggests. https://gist.github.com/anonymous/4751371 However, when I run a very simple test, it fails because jQuery isn't getting loaded: describe('like module', function() { var $ul; beforeEach(function() { $ul = $('<ul><li class="no-results"></li></ul>'); }); it('should test the

how to set up grunt + browserify + tsify + babelify?

我与影子孤独终老i 提交于 2020-01-04 06:09:27
问题 I am struggling to set up grunt + browserify + tsify + babelify (with debug). The below gruntfile setting does compile typescript, but no babel transpling is happening. Can anybody let me know how to do this? (i might need to use gulp to do this??) browserify: { main: { src: 'app/scripts/main.ts', dest: 'app/scripts/bundle.js', }, options: { browserifyOptions: { plugin: [['tsify']], transform: [['babelify', {presets: ['es2015'], extensions: ['.ts']}]], debug: true } } } tsconfig.json has

Grunt-browserify+mapify+coffeescript = module not found with relative path

隐身守侯 提交于 2020-01-04 01:57:07
问题 I try to get grunt-browserfy working with relative path for coffeescript but I always have an error message when I try to build my sources : >> Error: module "src/app/utils/includeMixin" not found from "/[ABSOLUTE-PATH-TO-MY-PROJECT]/project/src/app/app-audit.coffee" I have my file hierarchy presented like this : project |- build | |- libs.js | |- audit.js |- src |- app |- app-audit.coffee |- utils |- includeMixin.coffee |- vendor |- node_modules |- gruntfile.coffee I use grunt-browserify

Thinkster.io Angularjs tutorial Chapter 3 - Problems connecting to Firebase

 ̄綄美尐妖づ 提交于 2020-01-03 23:13:23
问题 I'm following this tutorial, building an angularjs app with connection to the firebase database. I'm stuck at chapter 3 where my app is supposed to make it initial connection to the database. I kind of felt that problems were in front of me since my command prompt and jshint tells me: Running "jshint:all" (jshint) task app\scripts\controllers\posts.js line 0 col 0 Bad option: 'app'. line 8 col 1 'app' is not defined. app\scripts\services\post.js line 0 col 0 Bad option: 'app'. line 2 col 1

Thinkster.io Angularjs tutorial Chapter 3 - Problems connecting to Firebase

限于喜欢 提交于 2020-01-03 23:12:14
问题 I'm following this tutorial, building an angularjs app with connection to the firebase database. I'm stuck at chapter 3 where my app is supposed to make it initial connection to the database. I kind of felt that problems were in front of me since my command prompt and jshint tells me: Running "jshint:all" (jshint) task app\scripts\controllers\posts.js line 0 col 0 Bad option: 'app'. line 8 col 1 'app' is not defined. app\scripts\services\post.js line 0 col 0 Bad option: 'app'. line 2 col 1

Grunt expand files, what patterns are acceptable in src?

匆匆过客 提交于 2020-01-03 19:33:31
问题 Snippet from gruntfile.js sass: { compile: { files: [{ expand: true, cwd: 'css/', src: ['^[^_].scss'], dest: '../css/', ext: '.css' }] } }, This should work according to rubular. Basically I want to compile all .scss files in the 'css' directory, unless they start with an underscore. However, that pattern doesn't match anything? Any ideas? 回答1: Try this pattern: ['*.scss', '!_*.scss'] . It'll make the distinction more explicit, too. sass: { compile: { files: [{ expand: true, cwd: 'css/', src:

Sass variable declaration precedence

前提是你 提交于 2020-01-03 16:55:17
问题 I am declaring variable of same name in two files. I import them in a following order and found a conflict. FileName: Modal.scss $gray : #e1e1e1; // Imported first FileName: Variable.scss $gray : #999; // imported later Expected behaviour is that Value should be overwritten. However, I am getting First imported value (#e1e1e1) instead of (#999)in CSS. Am I doing the wrong thing declaring variable multiple times? 回答1: Apparently, it will take first variable declaration. For example when you

Sass variable declaration precedence

懵懂的女人 提交于 2020-01-03 16:54:15
问题 I am declaring variable of same name in two files. I import them in a following order and found a conflict. FileName: Modal.scss $gray : #e1e1e1; // Imported first FileName: Variable.scss $gray : #999; // imported later Expected behaviour is that Value should be overwritten. However, I am getting First imported value (#e1e1e1) instead of (#999)in CSS. Am I doing the wrong thing declaring variable multiple times? 回答1: Apparently, it will take first variable declaration. For example when you

getting json data into assemble templates in grunt

北慕城南 提交于 2020-01-03 15:55:04
问题 I am using assemble (https://github.com/assemble/assemble) via a grunt plugin to build static pages. I have been using grunt for a while now so understand how it all works, yet this is my first time using assemble so I looked at this for ref (http://blog.parkji.co.uk/2013/07/06/building-a-static-site-using-grunt-and-assemble.html). Everything seemed to be working fine. However, I want to introduce JSON data to the mix and have looked at the docs on the assemble site (http://assemble.io/docs