Deprecated in favor of grunt-contrib-compass.
kahlil / grunt-compass Goto Github PK
View Code? Open in Web Editor NEWDeprecated in favor of grunt-contrib-compass
Home Page: http://git.io/2lAlQg
License: MIT License
Deprecated in favor of grunt-contrib-compass
Home Page: http://git.io/2lAlQg
License: MIT License
Deprecated in favor of grunt-contrib-compass.
This doesn't work:
watch: {
files: ['<config:lint.all>','static/scss/*.scss'],
tasks: 'lint compass qunit'
},
// https://github.com/kahlil/grunt-compass
compass: {
src: 'static/scss',
dest: 'static/css',
linecomments: config.assets.css.linecomments,
outputstyle: config.assets.css.output_style
},
But this does:
watch: {
files: ['<config:lint.all>','static/scss/*.scss'],
tasks: 'lint compass qunit'
},
// https://github.com/kahlil/grunt-compass
compass: {
src: {
src: 'static/scss',
dest: 'static/css',
linecomments: config.assets.css.linecomments,
outputstyle: config.assets.css.output_style
}
},
In grunt-compass/tasks/compass.js
src = this.data.src
// this.data == 'static/scss',
// that why this.data.src == undefined and so on...
But maybe it's just me and I misconfigured grunt.js (I'm new to grunt) ?
I'm posting this issue to let you know that we will be publishing Grunt 0.4 on Monday, February 18th.
If your plugin is not already Grunt 0.4 compatible, would you please consider updating it? For an overview of what's changed, please see our migration guide.
If you'd like to develop against the final version of Grunt before Monday, please specify "grunt": "0.4.0rc8"
as a devDependency in your project. After Monday's release, you'll be able to use "grunt": "~0.4.0"
to actually publish your plugin. If you depend on any plugins from the grunt-contrib series, please see our list of release candidates for compatible versions. All of these will be updated to final status when Grunt 0.4 is published.
Also, in an effort to reduce duplication of effort and fragmentation in the developer community, could you review the grunt-contrib series of plugins to see if any of your functionality overlaps significantly with them? Grunt-contrib is community maintained with 40+ contributors—we'd love to discuss any additions you'd like to make.
Finally, we're working on a new task format that doesn't depend on Grunt: it's called node-task. Once this is complete, there will be one more conversion, and then we'll never ask you to upgrade your plugins to support our changes again. Until that happens, thanks for bearing with us!
If you have any questions about how to proceed, please respond here, or join us in #grunt on irc.freenode.net.
Thanks, we really appreciate your work!
I am running into a weird bug when I am importing some files with just variables and mixins defined and then underneath those imports, I'm importing other sass files that actually use those variables and mixins and the plugin is spitting out this error:
Running "compass:src" (compass) task
compass compile
was initiated.COMPASS output:
error sass/global/app.sass (Line 8: Undefined variable: "$Standard".)
identical stylesheets/global/app.css
unchanged sass/global/forms.sass
unchanged sass/global/mixins.sass
unchanged sass/global/vars.sass
unchanged sass/ie.sass
unchanged sass/pages/capture.sass
unchanged sass/pages/review.sass
unchanged sass/print.sass
overwrite stylesheets/screen.css
Error: Command failed:
Task "compass:src" failed. Use --force to continue.Aborted due to warnings.
However, if I just run grunt again, a second time in a row, without changing any of the files, it works properly and compiles everything correctly.. See the attached image for the complete terminal output
As I would like to continue my includes via sass' @imports it's pretty annoying that the src
parameter only accepts an entire directory and includes all files in a random order.
See this thread why it should be avoided to include whole directories: http://stackoverflow.com/questions/4778627/is-it-possible-to-import-a-whole-directory-in-sass-using-import
The code does work perfectly when you set up compass the right way and configurate grunt to run the task with the watch option. But it does not work when you configure it as a general task and then run it with "grunt" or "grunt compass"
It does mention "compass compile
was initiated." in the console, but the only thing compass does is creating the folders, it doesn't create the css files.
This is the config file I used for grunt:
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
compass: {
files: ['assets/sass/**/*.scss'],
tasks: 'compass'
},
watch: {
files: '<config:compass.files>',
tasks: 'compass'
}
});
// Default task.
grunt.registerTask('default', 'compass');
grunt.loadTasks('grunt/grunt-compass/tasks');
};
Just a short question: when grunt 0.4 is released, will this be maintained in the future or should I have a look at grunt-contrib-compass instead?
Hi, it would be nice if I can have two grunt tasks with different config: one to watch my SASS files during development (ie. outputstyle: expanded) and second task for production build (with ie. outputstyle: compressed). And this is what I just achieved. But I miss in the production build the option to force processing of SASS files. As there aren't any changes so the compass without --force option doesn't want to reprocess files from extended to compressed style. I hope you know what I mean :)
Kris
I get this error when running the watch command:
Running "watch" task
Waiting...OK
>> File "css/scss/global.scss" changed.
timers.js:103
if (!process.listeners('uncaughtException').length) throw e;
^
Error
at /usr/local/lib/node_modules/grunt/lib/util/task.js:47:25
at Object.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:390:2)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/usr/local/lib/node_modules/grunt/lib/grunt/utils.js:17:14)
at Module._compile (module.js:449:26)
and here is my grunt.js file:
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
watch: {
files: ['css/scss/*'],
tasks: ['compass-clean compass']
},
compass: {
dest: {
src: 'css/scss',
dest: 'css',
outputstyle: 'compressed',
linecomments: false,
forcecompile: true,
debugsass: false,
relativeassets: true
}
},
});
grunt.loadNpmTasks('grunt-compass');
grunt.registerTask('default', 'watch');
};
If only compass-clean or compass is defined as a task, no error is raised. Same behavior if i define it like: tasks: ['compass-clean', 'compass']
node v0.8.15
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.
Since we did not receive a CI status on the greenkeeper/initial
branch, we assume that you still need to configure it.
If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/
.
We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organiszation’s settings page, under Installed GitHub Apps.
At the moment, you cannot use <% template %>
style templates in the config paths.
You need to do something like this:
src = grunt.template.process(this.data.src),
dest = grunt.template.process(this.data.dest),
It seems like that the option --debug-info
is not a valid option.
My compass --help
shows below:
compass compile --help
Usage: compass compile [path/to/project] [path/to/project/src/file.sass ...] [options]
Description:
compile project at the path specified or the current director if not specified.
Options:
--time Display compilation times.
-r, --require LIBRARY Require the given ruby LIBRARY before running commands.
This is used to access compass plugins without having a
project configuration file.
-l, --load FRAMEWORK_DIR Load the framework or extensions found in the FRAMEWORK directory.
-L, --load-all FRAMEWORKS_DIR Load all the frameworks or extensions found in the FRAMEWORKS_DIR directory.
-q, --quiet Quiet mode.
--trace Show a full stacktrace on error
--force Allows some failing commands to succeed instead.
--dry-run Dry Run. Tells you what it plans to do.
--boring Turn off colorized output.
-c, --config CONFIG_FILE Specify the location of the configuration file explicitly.
--app APP Tell compass what kind of application it is integrating with. E.g. rails
--sass-dir SRC_DIR The source directory where you keep your sass stylesheets.
--css-dir CSS_DIR The target directory where you keep your css stylesheets.
--images-dir IMAGES_DIR The directory where you keep your images.
--javascripts-dir JS_DIR The directory where you keep your javascripts.
-e, --environment ENV Use sensible defaults for your current environment.
One of: development (default), production
-s, --output-style STYLE Select a CSS output mode.
One of: nested, expanded, compact, compressed
--relative-assets Make compass asset helpers generate relative urls to assets.
--no-line-comments Disable line comments.
-?, -h, --help Show this message
Mac OSX 10.8.2 / Compass 0.11.5 (Antares) / Sass 3.1.5 (Brainy Betty) / ruby 1.8.7
Hello, i'm wondering how I can do a little trick for my develop/production environment switch. The thing is, this is my scss dir:
| src/
| ---- scss/
| -------- main.scss
If I've compress that in my dev environment, it work as expected, giving me the next input:
| public/
| ---- css/
| -------- main.css
Now, my question is: can I output a file with not the same name (ex: main.scss -> main.min.scss, foo.scss -> foo.min.scss) instead of the default name?
Hello anyone, since i'm using the new version of Grunt (grunt-cli), the plugin isn't working correctly, it's creating me a config.rb file in each folder of the Compass project.
For example, i have the next folder structure (look at the components folder):
And when i compile, it creates me the config.rb within the components folder!
That's my Gruntfile's compass snippet:
compass: {
dev: {
basePath: 'src/scss',
config: 'src/scss/config.rb',
src: './',
dest: '../../public/css/dev',
forcecompile: true
},
build: {
basePath: 'src/scss',
config: 'src/scss/config.rb',
src: './',
dest: '../../public/css/build',
forcecompile: true,
environment: 'production'
}
}
grunt: ~0.4.0
grunt-compass: ~0.3.8
Help!
Thanks.
Hey @sindresorhus
I deprecated grunt-compass with the npm deprecate command, is that all I need to do to deprecate it correctly?
https://npmjs.org/package/grunt-compass
Thx,
Kahlil
It would be great to be able to reuse my config.rb
file that is not located in the project root.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.