I am following the step by step on https://www.npmjs.com/package/grunt-scss-lint
I have installed everything, and seems to be working fine when I type in Terminal 'scss-lint'.
However I want this to be running in Grunt
Gruntfile:
scsslint: {
allFiles: [
'src/scss/**/*.scss',
],
options: {
bundleExec: true,
config: '.scss-lint.yml',
reporterOutput: 'scss-lint-report.xml',
colorizeOutput: true
}
},
grunt.registerTask('default', ['js', 'html', 'scsslint',]);
so I type in grunt in terminal which will run the tasks and in terminal - this pops up:
Running "scsslint:allFiles" (scsslint) task
Running scss-lint on allFiles
Please make sure you have ruby installed: ruby -v
Install the scss-lint gem by running:
gem update --system && gem install scss-lint
Running through grunt does not work but typing scss-lint in terminal works.
I did the following message but this message does not disappear
Your problem is related to the bundleExec parameter. If you set it to true, the plugin will expect the gem to be installed via bundler.
Set it to false, and it will work.
scsslint: {
allFiles: [
'src/scss/**/*.scss',
],
options: {
bundleExec: false,
config: '.scss-lint.yml',
reporterOutput: 'scss-lint-report.xml',
colorizeOutput: true
}
},
grunt.registerTask('default', ['js', 'html', 'scsslint',]);
Related
We have tried below steps:
on node command prompt we tried exciting below commands
Npm install -g cucumber
Also we tried
npm install -g protractor-cucumber
cucumber --version
Above command opening webstorm editor.
We have created feature file(feature/testfeature.feature)
Now to generate skeleton we tried running below command on cmd prompt.
Cucumber.js
It is opening webstorm editor
We are not able to see skeleton file
Could you please suggest if we are missing anything
We should be able to create skeleton file using npm command.
Thanks in advance.
If you have to generate Step definitions structure/skeleton in your console you have to run the protractor command
protractor your_conf.js
your conf.js should look like this -
exports.config = {
directConnect: true,
baseUrl: '',
capabilities: {
'browserName':
(process.env.TEST_BROWSER_NAME || 'firefox'),
'version':
(process.env.TEST_BROWSER_VERSION || 'ANY')
},
onPrepare: function () {
var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
global.expect = chai.expect;
browser.manage().window().maximize();
},
setDefaultTimeout : 60 * 1000,
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
specs: [
'../Features/*.feature'
],
cucumberOpts: {
monochrome: true,
strict: true,
plugin: ["pretty"],
require: ['../StepDefinitions/*.js', '../Support/*.js']
}
};
I'm trying to run a basic app with gruntjs. Everything works fine, but once I try to run my sass-related grunt task, I have this error:
$ grunt sass
Running "sass:dist" (sass) task
Warning: spawn ENOENT Use --force to continue.
I already have installed Ruby and Sass, and Nodejs.
This is my Gruntfile.js:
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
style: 'expanded'
},
files: {
'css/main.css': 'css/main.scss'
}
}
},
watch: {
css: {
files: ['css/main.scss'],
tasks: ['sass']
}
},
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.registerTask('default', ['sass']);
};
Ruby and Sass versions:
$ ruby -v
ruby 2.0.0p598 (2014-11-13) [x64-mingw32]
$ sass -v
Sass 3.4.9 (Selective Steve)
Ruby Path is already in my PATH variable.
I am trying to run my first project using grunt. i am stuck at the point when i try running grunt in the command line i get an error/warning like this:
Traviss-MacBook-Pro-2:GRUNT Travis$ grunt compass
>> Local Npm module "grunt-contrib-jshint" not found. Is it installed?
>> Local Npm module "grunt-contrib-qunit" not found. Is it installed?
Warning: Task "compass" not found. Use --force to continue.
Aborted due to warnings.
I installed both jshint and qunit so i am lost on what to do next for fixing this problem.
Any help would be greatly appreciated, thank you.
Here is my grunt.js file
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';'
},
dist: {
src: ['src/**/*.js'],
dest: 'dist/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
}
}
},
qunit: {
files: ['test/**/*.html']
},
jshint: {
files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
options: {
// options here to override JSHint defaults
globals: {
jQuery: true,
console: true,
module: true,
document: true
}
}
},
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint', 'qunit']
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('test', ['jshint', 'qunit']);
grunt.registerTask('default', ['jshint', 'qunit', 'concat', 'uglify']);
};
You probably don't have the 'grunt-contrib' modules that use qunit and jshint in a grunt task form. You should be able to check with something like npm ls | grep contrib.
I'd suggest, within your project, running:
npm install grunt-contrib-jshint --save-dev
and
npm install grunt-contrib-qunit --save-dev
I would've expected some of the other grunt.loadNpmTasks()-specified modules to choke too, so I'm a little surprised more errors are not happening.
As for "Warning: Task "compass" not found", there is no 'compass' target in your gruntfile (as there is for qunit, watch, etc.), so that makes sense. You'll either want to add in a 'compass' task to do stuff under that name or specify another target to grunt on the command-line (or omit any specific target to execute your default ['jshint', 'qunit', 'concat', 'uglify'] tasks).
I am working on my website and I want to use Susy as well as Compass. I am using Grunt too. When I run my grunt task I get this error:
Denniss-MacBook-Pro:portfolio dennis$ grunt --trace
Running "compass:dev" (compass) task
Gem::LoadError on line ["1990"] of /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb: Unable to activate susy-2.1.1, because sass-3.2.17 conflicts with sass (~> 3.3.0)
Run with --trace to see the full backtrace
Warning: ↑ Use --force to continue.
Aborted due to warnings.
This is my Grunt file:
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
options: {
livereload: true
},
css: {
files: ['_sass/*.{scss,sass}'],
tasks: ['compass:dev']
},
js: {
files: ['js/*.js'],
tasks: ['uglify']
}
},
compass: {
options: {
require: 'susy'
},
dev: {
options: {
sassDir: ['_sass'],
cssDir: ['css'],
environment: 'development',
}
},
production: {
options: {
sassDir: ['_sass'],
cssDir: ['css'],
outputStyle: 'compressed',
environment: 'production',
}
}
},
uglify: {
all: {
files: {
'js/main.min.js': [
'js/libs/*.js',
'js/src/*.js'
]
}
}
},
connect: {
port: 8000
}
});
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.registerTask('default', ['compass:dev', 'uglify','connect', 'watch']);
grunt.registerTask('production', ['compass:production', 'uglify']);
}
I just don't know what to do, thanks in advance!
There is the problem with dependencies they are incompatible:
susy 2.0.0 depends on sass ~> 3.3.0
compass 0.12.3 depends on sass = 3.2.14
you can list all you gems by:
gem list
try to do this:
gem install compass --pre
This should work.
I'm trying to get a build system for the Jekyll gem in sublime text. In my sublime-project I have the following:
"build_systems":
[
{
"name":"jekyll",
"cmd":"/Users/kaass/.rvm/gems/ruby-1.9.3-p327/bin/jekyll",
"shell":true,
"path":"/Users/kaass/.rvm/bin/rvm-auto-ruby",
"working_dir":"$project_path"
}
]
I have tried playing around with env as well as different options above, but always get some sort of error pertaining to ruby or jekyll not found or env: ruby_noexec_wrapper not found
I'm running 10.8.2 and my path :
kaass:~ kaass$ echo $PATH
/Users/kaass/.rvm/gems/ruby-1.9.3-p327/bin:/Users/kaass/.rvm/gems/ruby-1.9.3-p327#global/bin:/Users/kaass/.rvm/rubies/ruby-1.9.3-p327/bin:/Users/kaass/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/bin:/usr/X11R6/bin
Everything I'm trying to call is already in my path.
I had a similar problem running rake within the correct rvm environment.
This is the sublime-project file I ended up with:
{
"folders":
[
{
"path": "data"
}
],
"build_systems":
[
{
"name": "rake",
"cmd": "source ~/.rvm/environments/ruby-1.9.3-p194#mygemset && rake",
"shell": true,
"path": "/bin:/usr/bin:/usr/local/bin:~/.rvm/bin",
"working_dir": "$project_path"
}
]
}
The trick was to add ~/.rvm/bin to the path and to source the environment of the rvm gemset.
Then I can even use the "rake" command without specifying a full path.
The rest is straight-forward.