graygilmore / grunt-shopify-sass Goto Github PK
View Code? Open in Web Editor NEWConcatenate your Sass files as determined by the @import order.
License: MIT License
Concatenate your Sass files as determined by the @import order.
License: MIT License
Maybe even as neutral as grunt-css-import
?
I've tried the two following setups and the dist file doesn't seem to get generated. Am I doing something wrong?
shopify_sass:
options:
base: 'src/stylesheets'
files:
'assets/timber.scss.liquid': 'timber.scss'
shopify_sass:
files:
'assets/timber.scss.liquid': 'src/stylesheets/timber.scss'
Example:
@import 'file1.scss';
@import 'file2.scss';
If file1.scss
is empty the plugin will skip file2.scss
. Will need to fix this and add a new test.
Be able to watch a folder and build all Sass files in the root that aren't prefixed with _
. In terms of Shopify, this would allow us to watch a single stylesheets
folder and automatically build the theme.scss
, checkout.scss
and gift-card.scss
files into /assets
(and append them with .liquid
).
Pro: developers simply need to set the folders they want to watch and build to and they are done.
Con: we'd have to build every single file on each save, slowing the plugin down.
Maybe this could be turned into an option.
Not entirely sure what I'm doing wrong here. I'm using this plugin along with grunt-shopify
to get auto-uploading. Here's my setup:
Gruntfile.js
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-shopify-sass');
grunt.loadNpmTasks('grunt-shopify');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
shopify: {
options: {
api_key: '[redacted]',
password: '[redacted]',
url: '[redacted].myshopify.com',
theme: [redacted],
disable_growl_notifications: false
}
},
shopify_sass: {
files: {
'assets/theme.scss.liquid': 'styles/theme.scss'
}
},
coffee: {
compile: {
files: {
'assets/script.js': ['scripts/*.coffee']
},
},
},
watch: {
coffee: {
files: ['scripts/*.coffee'],
tasks: ['coffee']
},
shopify_sass: {
files: ['styles/*'],
tasks: ['shopify_sass']
},
shopify: {
files: ['assets/*', 'themes/*', 'snippits/*', 'config/*', 'layout/*'],
tasks: ['shopify'],
},
},
});
grunt.registerTask('default', ['watch']);
};
For some reason when I run grunt
the grunt-shopify
plugin runs fine (it watches files and uploads them automatically) but this plugin won't generate assets/theme.scss.liquid
when I modify styles/theme.scss
.
I've also tried running grunt shopify_sass
and get this output:
Running "shopify_sass:files" (shopify_sass) task
Done, without errors.
however assets/theme.scss.liquid
still isn't being generated.
Any ideas as to what I'm doing wrong here? Thanks in advance!
As it stands, any styles in the src
file will be lost as the plugin is only looking for @import
. Would be nice to simply replace each @import
with the contents of that file and then build to dest
.
installed it as explained in documentation but has no effect. Files are not concated and copied to dest. Is this packages still supported?
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.