yoheimune / grunt-compass-multiple Goto Github PK
View Code? Open in Web Editor NEWat grunt, compile compass files at multi threads.
License: MIT License
at grunt, compile compass files at multi threads.
License: MIT License
For my second option, either this plugin or compass is creating both a CSS folder and a template folder. I have no idea why.
My gruntfile:
compassMultiple: {
options : {
// if you need, you can set options.
javascriptsDir: './js',
environment: 'development',
outputStyle: 'nested'
},
// multiple option provides you to compile multi sassDir.
all: {
options: {
multiple: [
{
sassDir: 'sass',
cssDir: './'
},{
sassDir: 'sass/template',
cssDir: 'CSS'
}
]
}
}
}
So my file structure is.
-sass/
--template/
---pages.scss
---posts.scss
--style.scss
-CSS/
--pages.css
--posts.css
-template/
--pages.css
--posts.css
-style.css
...
I ran into an issue providing sass files and config.rb files when the sass lived up two or more directories.
Will create a PR to fix this as supplying only the config.rb file works for me.
The default output prefixes every line with stdout:
, adds unnecessary newlines and reports the execution time differently than the original compass task (e.g., execTime: 12345ms
instead of Compilation time: 12.345s
.
I'll be shortly creating a pull request to fix this visual details. Meanwhile, I can say that the execution time for my use case dropped more than 60%.
I cannot get sourcemaps to compile.
compassMultiple: {
options : {
environment: 'development',
outputStyle: 'nested',
importPath: './magento/skin/frontend/rwd/default/scss/',
relativeAssets: true,
cacheDir: skinDir + 'scss/.sass-cache/',
sourcemap: true,
time: true
},
common : {
options: {
// every compile needs sassDir and cssDir.
sassDir: skinDir + 'scss',
cssDir: skinDir + 'css',
}
}
},
The image-url method can not compile the domain name address specified。
I have only been able to get grunt-compass-multiple to work if I supply the sassDir and cssDir options in compassMultiple.common.options, and not in compassMultiple.options.
Not sure which of these you need but I am running:
compass v1.0.3
grunt -cli v0.1.13
grunt v0.4.5
ruby 2.1.5p273
Gruntfile configuration which does not compile:
compassMultiple: {
options : {
sassDir: skinDir + 'scss',
cssDir: skinDir + 'css',
environment: 'development',
outputStyle: 'nested',
importPath: 'some-path',
relativeAssets: true,
cacheDir: skinDir + 'scss/.sass-cache/',
},
}
Gruntfile configuration which would compile:
compassMultiple: {
options : {
environment: 'development',
outputStyle: 'nested',
importPath: 'some-path',
relativeAssets: true,
cacheDir: skinDir + 'scss/.sass-cache/',
},
common : {
options: {
sassDir: skinDir + 'scss',
cssDir: skinDir + 'css'
}
}
}
You claim it's faster than just running Compass (or grunt-contrib-compass), but I see no actual numbers on it.
In a project with a following structure
project
tools
build
module 1
static
sass
css
Running the grunt task from build
folder I get the following error:
error: { [Error: Command failed: You must compile individual stylesheets from the project directory.]
killed: false, code: 1, signal: null }
How can I solve this issue?
Hi,
I'm evaluating your this task and while doing some testing against grunt-contrib-compass I found rather weird thing.
Say we have multiple css we want to compile like: fonts.css, bootstrap.css and main.css. Then if one of them gets updated then on next compile all three will be rewritten with new versions. I'm not sure whether they a recompiled or just rewritten from cache, but even though - doesn't it waste time on updating those that where not changed?
May be it's bug? What do you think?
Is there anyway to run this task with other tasks? I'm trying to use it with grunt watch,
sass: {
options: {
livereload: false,
},
files: ['app/styles//*.{scss,sass}', 'app/modules//*.{scss,sass}'],
tasks: ['compassMultiple:app', 'autoprefixer:app']
},
But autoprefixer doesn't run. Is there an option somewhere?
I noticed you use grunt-lib-contrib.
It's deprecated and I would recommend you switch to the extracted modules instead:
stripPath
=> strip-path
minMaxInfo
=> maxmin
getNamespaceDeclaration
=> ticket
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.