strarsis / sass-include-paths Goto Github PK
View Code? Open in Web Editor NEWGenerates include paths for node-sass for packages from popular package managers like npm, bower, ruby gem, ruby bundler.
License: MIT License
Generates include paths for node-sass for packages from popular package managers like npm, bower, ruby gem, ruby bundler.
License: MIT License
(self assigned)
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.
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.
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;
Expose the used glob strings so the user can easily change them.
Hello,
I'm facing an issue to run this command:
$ sassc $(sassIncludePaths --sassc --node_modules) [...]
Internal Error: File to read not found or unreadable: [...]
Where can I fix it ?
Thanks
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.