Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for main-bower-files #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Support for main-bower-files #5

wants to merge 1 commit into from

Conversation

renarsvilnis
Copy link

Added support for main-bower-files.

@hail2u
Copy link
Owner

hail2u commented Apr 13, 2015

With your PR, main-bower-files can find only _normalize.scss, but _normalize.scss needs SCSS files in its sub-directories. I guess this does not work as expected in most cases.

Is it worth specifying a main field?

@renarsvilnis
Copy link
Author

Well all that main-bower-files does is adds imports to scss files from bower_components (depending on configuration), which it gets looking for main in bower.json.

// site.scss
@charset 'UTF-8';

// Vendors - all the CSS files from external libraries and frameworks
// bower:scss
// endbower

// Utils - gathers all Sass tools and helpers used across the project.
...

So the sub-directory scss files that _normalize.scssimports works great for cases, where you want to include all of normalize.

@hail2u
Copy link
Owner

hail2u commented Apr 13, 2015

In bower.json spec:

The primary acting files necessary to use your package.

So main field should be list of all SCSS files or unspecified. If not, it will be only useful to gulp/Grunt with main-bower-files. And maintaining list of files can be hard. This is the reason why I didn't specify main field in bower.json.

Another concern:

Preprocessor files like CoffeeScript should be compiled.

This clause rejects preprocessor files in main field. Leaving main field unspecified will be safest option, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants