modularscale / modularscale-sass

Modular scale calculator built into your Sass

Home Page:http://www.modularscale.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Publish to an eyeglass module

scottkellum opened this issue · comments

I'm taking a look at this now because I'd like to use modular scale as a dependency for an eyeglass module I'm creating.

As far as I can tell eyeglass simply requires the module's sass files to be in a directory called 'sass' under the module root. As I see it there are two options: Rename 'stylesheets' directory to 'sass' or create a new 'sass' directory with an index.scss file that @imports the sass from 'stylesheets' dir. I think the first option is cleaner. Would that be ok for you? I'll put it together and give you a PR later today.

Interestingly eyeglass could also offer a completely different way to go: It enables exposing javascript functions as sass functions, and so perhaps modularscale-js could be repurposed to also function as a sass module meaning a single codebase could be used for both js and sass! I don't know if that would be better or worse performance wise (js vs libsass math execution?). Just an idea but if you think it could be useful I'll look in to it.

@DominicBarnard Sounds great! Yeah agree renaming the dir to sass sounds cleaner.

I dig the idea of including the JS here. As you may note there is already Ruby code to speed up Compass compilation so something similar for Eyeglass would be super helpful as well as adding the functionality of non-integer values.

I appreciate you reaching out! I always worry about implementing things I don’t currently use because it almost always results in bugs.

@scottkellum Awesome. Yeah I know what you mean. Today is my first go at using eyeglass but if it works out I'll be looking to use it for all my sass stuff as far as I can as I love the idea of a single package manager to rule them all. So I'll be sure to test it through as much as I can before I PR. The straight sass version should be fairly simple to get going and I'll look in to a js version as I get time.

I'm gonna tackle this

You don't have to rename your directory. Just set sassDir: "<path to sass files>" in the eyeglass-exports.js file.