Link demo CSS to the package dist for the given component.

@param {String} component The name of the component to link.
348508
function linkCss(component) {
  const destination = path.join(demo, component);

  process.chdir(destination);

  const dist = path.join(packages, component, 'dist');
  const source = path.relative(destination, dist);

  fs.readdirSync(source).forEach(file => {
    fs.symlinkSync(path.join(source, file), file);
  });

  console.log(chalk.green('success'), 'Linked demo CSS');
}
662908
function(target, dist) { // eslint-disable-line complexity
        var compareObject = function(targetObj, distObj) {
            var result = false;

            snippet.forEach(targetObj, function(item, key) {
                result = (item === distObj[key]);

                return result;
            });

            return result;
        };
        var result = true;
        var isDiff;

        if (typeof target !== typeof dist) {
            result = false;
        } else if (_.isArray(target) && target.length !== dist.length) {
            result = false;
        } else if (_.isObject(target)) {
            isDiff = !compareObject(target, dist) || !compareObject(dist, target);

            result = !isDiff;
        } else if (target !== dist) {
            result = false;
        }

        return result;
    }
260453
function linkIfExists(pkgs) {
  const sharedDepsDirs = getSharedDepDirs(pkgs, packageHash);

  if (sharedDepsDirs.length) {
    logPkgsMsg('Linking', sharedDepsDirs);
    linkPackages(sharedDepsDirs);
  } else {
    log('No shared dependencies found');
  }
}
498735
public static void replaceComponent(Component component, Component replacement) {

        if (!component.isAttached()) {
            throw new IllegalArgumentException("Component must be attached");
        }
        HasComponents parent = component.getParent();
        if (parent instanceof ComponentContainer) {
            ((ComponentContainer)parent).replaceComponent(component, replacement);
        } else if (parent instanceof SingleComponentContainer) {
            ((SingleComponentContainer)parent).setContent(replacement);
        } else {
            throw new IllegalArgumentException("Illegal class for parent: " + parent.getClass());
        }
    }
1113324
public function onComponentConfigure($component)
    {
        $this->onComponentsList();
        Breadcrumbs::register('component-configure', function($breadcrumbs) use($component) {
            $breadcrumbs->parent('components');
            $breadcrumbs->push('Configuration: ' . $component->getFullName());
        });
        view()->share('breadcrumbs', Breadcrumbs::render('component-configure'));
    }
57927
function (component) {
    var callbacks = this.callbacks;
    if (component.beforeStep) {
      callbacks.beforeStep.splice(callbacks.beforeStep.indexOf(component), 1);
    }
    if (component.step) {
      callbacks.step.splice(callbacks.step.indexOf(component), 1);
    }
    if (component.afterStep) {
      callbacks.afterStep.splice(callbacks.afterStep.indexOf(component), 1);
    }
  }
1264422
function initComponentsDir (config, dir) {
    // iterate over file names in directory
    _.each(fs.readdirSync(dir), file => {
        // get absolute file
        var absDir = `${dir}/${file}`
        // stat file to check if it is directory
        var stat = fs.statSync(absDir)
        // if file is directory them in should contain component
        if (stat.isDirectory()) {
            initComponentDir(config, absDir, file)
        }
        // ignore anything else
        else {
            debug('initComponentsDir: ignoring %s', absFile)
        }
    })
}
1336369
private function processComponents($src, $to)
	{
		// Component directory
		if (is_dir($src))
		{
			$dirHandle = opendir($src);

			while (false !== ($element = readdir($dirHandle)))
			{
				if (false !== strpos($element, 'com_'))
				{
					$this->symlink($src . '/' . $element, $to . '/components/' . $element);
				}
			}
		}
	}
992441
protected void addAllPackagesLink(Content div) {
        Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
                allpackagesLabel, "", "packageListFrame");
        Content span = HtmlTree.SPAN(linkContent);
        div.addContent(span);
    }
591473
function palette({ baseColor: themeColor = baseColor, src = 'css/rsuite.min.css', dist } = {}, doneCallback) {

  try {
    if (!dist) {
      throw  `ERROR: [option.dist] is required`;
    }
  } catch (e) {
    console.log(e.red);
    return;
  }

  const originColors = color.calcColors(baseColor);
  const themeColors = color.calcColors(themeColor);
  const distPath = Path.dirname(dist);

  const ensureDir = path => new Promise((resolve) => {
    fse.ensureDir(path, () => resolve());
  });

  const readData = path => new Promise(resolve => {
    fs.readFile(path, 'utf-8', (err, data) => {
      resolve(data || '');
    });
  });

  const writeData = (path, data) => new Promise((resolve, reject) => {
    fs.writeFile(path, data, (err) => {
      if (err) {
        reject(err);
      }
      resolve();
    });
  });

  const handleCallback = (...args) => doneCallback && doneCallback(args);

  const generateThemes = async function () {
    try {
      await ensureDir(distPath);
      let data = await readData(Path.join(rootPath, src));
      originColors.forEach((color, index) => {
        data = data.replace(new RegExp(color, 'g'), themeColors[index]);
      });
      await  writeData(dist, data);
      console.log(`Palette ${dist}` + '[SUCCESS]'.green);
      handleCallback();
    } catch (e) {
      console.log(`Palette ${dist}` + '[FAILD]'.red);
      handleCallback(e);
    }
  };

  generateThemes();

  return module.exports;
}
464403
function loadComponent(component) {
        if (component.initialize) {
            component.initialize(app);
        }
        if (component.beforeDispatchCallback) {
            beforeDispatchCallbacks.push(component.beforeDispatchCallback);
        }
        S.defineProperties(app.request, component.requestMethods, true);
        S.defineProperties(app.response, component.responseMethods, true);
        S.defineProperties(Helper.prototype, component.helperMethods, true);
    }
879213
function (component) {
    var callbacks = this.callbacks;
    if (component.beforeStep) callbacks.beforeStep.push(component);
    if (component.step)       callbacks.step.push(component);
    if (component.afterStep)  callbacks.afterStep.push(component);
  }
740005
function package(cb) {
    const pkgjson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
    delete pkgjson.scripts;
    delete pkgjson.devDependencies;
    const filepath = './dist/package.json';
    fs.writeFileSync(filepath, JSON.stringify(pkgjson, null, 2), 'utf-8');
    console.log('package.json Copied to Dist Directory');
    cb();
}
294758
function Link(props) {
  const { activeClassName, router, className: classNameProps, naked, ...other } = props;

  const className = clsx(classNameProps, {
    [activeClassName]: router.pathname === props.href && activeClassName,
  });

  if (naked) {
    return <NextComposed className={className} {...other} />;
  }

  return <MuiLink component={NextComposed} className={className} {...other} />;
}
19153
function addFiles(name) {
  const componentDir = `${packagesDir}/${name}`;
  const componentSrcDir = `${packagesDir}/${name}/src`;
  const componentStyleDir = `${packagesDir}/${name}/style`;
  const upperComponentName = getComponentName(name);
  /* eslint-disable-next-line */
  console.log(`Adding new component：${upperComponentName}`);

  if (!fs.existsSync(componentDir)) {
    fs.mkdirSync(componentDir);
    fs.mkdirSync(componentSrcDir);
    fs.mkdirSync(componentStyleDir);
  } else {
    /* eslint-disable-next-line */
    console.log(`${upperComponentName} already exists, please choose another name.`);
    process.exit(2);
  }
  addFilesToIndex(name);
}
459236
function Component(bowerObj, files) {
    this.bowerObj = bowerObj;
    this.files = files;
    this.name = bowerObj['name'];
    this.version = bowerObj['version'];
  }
768119
function (callback) {
		fs.mkdir("./dist", function (err) {
			if (err && err.code !== "EEXIST") {
				callback(err);
				return;
			}

			callback(null);
		});
	}