Git Product home page Git Product logo

sass-include-paths's People

Contributors

strarsis avatar vwochnik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jmaroeder dkebler

sass-include-paths's Issues

Support other renderers like Stylus...

Just took a two second look at your source and wondering if your code could be "easily" altered to be more generic by supporting generating an array of paths for any "main" file type? Pass in your file type and it returns array for same. Maybe as easy as generating your glob strings instead of hard coding them?

The stylus renderer works pretty much the same, taking an array of paths http://stylus-lang.com/docs/js.html

var sassFoldersGlobStr    = '{stylesheets,sass}';
var sassLibFoldersGlobStr = '{stylesheets,sass,lib,dist,assets/{sass,stylesheets},scss}';
var sassFilesGlobStr      = '*.{sass,scss}';
var sassGemsGlobStr = path.join('gems/*', sassFoldersGlobStr);

If this doesn't involve a major rewrite I could maybe do it as a fork with your input on the best way.

Bower Components also needs to search in sassLibFoldersGlobStr

Here are some examples of popular bower components that are found using sassLibFoldersGlobStr but not using sassFoldersGlobStr:

  • bower_components/bootstrap-sass/assets/stylesheets
  • bower_components/font-awesome/scss

In truth, it would be nicest if there was some way that we could easily override the glob string in the opts argument.

Not picking up paths of bower compenents where "main" points to root of repo

I wrote a bower only version of this using wiredep but thought I would try this as it's a bit more flexible.

But the bowerComponents function is only returning paths of repos whose "main" key points to a file in a subdirectory of the repo.

For example if bower install "bemiby" it's main file is _bemify.scss in the root of that repo and your code does not add that to the array of paths.

Bower repos like "color-schemer" that have their "main" pointing to subdirectory like "/stylesheets" work fine.

here is my code.

paths: function(data) {
    Debug.L1("in sass paths function")

    let sass_paths = []
    .concat(sassIncl.bowerComponentsSync());
    Debug.L1('paths:\n' +  sass_paths);
    return sass_paths;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.