mercadolibre / chico

A collection of easy-to-use UI components.
http://chico.mercadolibre.com
MIT License
343 stars 87 forks source link

add: index.js #1337

Closed neysimoes closed 7 years ago

neysimoes commented 7 years ago
'use strict';
let gulp          = require('gulp'),
    sass          = require('gulp-sass'),
    chico         = require('chico');

(...)
  .pipe(sass({
      includePaths: [chico()]
    }))
(...)

Import Chico on Scss files:

@import 'src/shared/styles/mixins';
@import 'src/shared/styles/variables';
atma commented 7 years ago

@neysimoes The main field in the package.json file should indicate the entry point to the program. Sorry, but entry point that only returns the name of the directory where is installed the package is not the entry point, it is some kind of path resolver. Current state is not perfect but at least it not confuse by it usage.

Just use some importer like sass-module-importer or write your own by using the official node-sass API If you want to avoid of the relative paths mess.