tasks/grunt-suitcss.js
function buildComponentAndCheckConformance(filepath) {
  var componentDir = path.join(process.cwd(), path.dirname(filepath));
  var deferred = Q.defer();

  resolve(componentDir, options.resolveOpts, function(err, tree) {
    if (err) {
      return deferred.reject(err);
    }

    var build = Build(flatten(tree));

    build.stylePlugins = function(build) {
      build.use('styles', function(file, done) {
        file.read(function(err, string) {
          if (err) {
            return deferred.reject(err);
          }

          if (options.conform) {
            try {
              file.string = conform(string);
            } catch (e) {
              return deferred.reject(e);
            }
          }

          done();
        });
      });
    };

    build.styles(function(err, builtCSS) {
      if (err) {
        return deferred.reject(err);
      }

      deferred.resolve(builtCSS);
    });
  });

  return deferred.promise;
}
function buildComponentAndCheckConformance(filepath) {
  var componentDir = path.join(process.cwd(), path.dirname(filepath));
  var deferred = Q.defer();

  resolve(componentDir, options.resolveOpts, function(err, tree) {
    if (err) {
      return deferred.reject(err);
    }

    var build = Build(flatten(tree));

    build.stylePlugins = function(build) {
      build.use('styles', function(file, done) {
        file.read(function(err, string) {
          if (err) {
            return deferred.reject(err);
          }

          if (options.conform) {
            try {
              file.string = conform(string);
            } catch (e) {
              return deferred.reject(e);
            }
          }

          done();
        });
      });
    };

    build.styles(function(err, builtCSS) {
      if (err) {
        return deferred.reject(err);
      }

      deferred.resolve(builtCSS);
    });
  });

  return deferred.promise;
}
function buildComponentAndCheckConformance ( filepath ) { var componentDir = path . join ( process . cwd ( ) , path . dirname ( filepath ) ) ; var deferred = Q . defer ( ) ; resolve ( componentDir , options . resolveOpts , function ( err , tree ) { if ( err ) { return deferred . reject ( err ) ; } var build = Build ( flatten ( tree ) ) ; build . stylePlugins = function ( build ) { build . use ( 'styles' , function ( file , done ) { file . read ( function ( err , string ) { if ( err ) { return deferred . reject ( err ) ; } if ( options . conform ) { try { file . string = conform ( string ) ; } catch ( e ) { return deferred . reject ( e ) ; } } done ( ) ; } ) ; } ) ; } ; build . styles ( function ( err , builtCSS ) { if ( err ) { return deferred . reject ( err ) ; } deferred . resolve ( builtCSS ) ; } ) ; } ) ; return deferred . promise ; }
Builds a component package based on a component.json file.
Will install packages if they don't exist locally.
Validate each component before returning built files
Builds a component package based on a component . json file . Will install packages if they don t exist locally . Validate each component before returning built files