Create css file and save it to dist
962117
function createCssFile(target, cssContent) {
    var cssData = Buffer.from(cssContent);
    var writeFile$ = rxjs_1.bindNodeCallback(fs_1.writeFile);
    // Write css file to dist
    return writeFile$(target, cssData);
}
901064
public function createAsset()
    {
        $css    = BASE_PATH."/public/css/";
        $js     = BASE_PATH."/public/js/";
        $source = realpath(__DIR__ . '/../assets/');
        $css_file   = file_get_contents($source."/jquery.bootgrid.css");
        $js_file    = file_get_contents($source."/jquery.bootgrid.js");
        $fajs_file  = file_get_contents($source."/jquery.bootgrid.fa.js");
        $fc = fopen($css."jquery.bootgrid.css", "w");
        fwrite($fc, $css_file);
        fclose($fc);
        $fj = fopen($js."jquery.bootgrid.js", "w");
        fwrite($fj, $js_file);
        fclose($fj);
        $fa = fopen($js."jquery.bootgrid.fa.js", "w");
        fwrite($fa, $fajs_file);
        fclose($fa);
    }
1107557
def get_css(self):
        
        thisdir = os.path.dirname(os.path.abspath(__file__))
        with open(os.path.join(thisdir, self.css), "r") as cssfile:
            return cssfile.read()
1337399
function compile() {
        debug('read %s', cssPath);
        fs.readFile(stylusPath, 'utf8', function(err, str){
          if (err) return error(err);
          var style = options.compile(str, stylusPath);
          var paths = style.options._imports = [];
          imports[stylusPath] = null;
          style.render(function(err, css){
            if (err) return next(err);
            debug('render %s', stylusPath);
            imports[stylusPath] = paths;
            mkdir(dirname(cssPath), { mode: parseInt('0700', 8), recursive: true }, function(err){
              if (err) return error(err);
              fs.writeFile(cssPath, css, 'utf8', next);
            });
          });
        });
      }
984081
def compileSass(sassPath):
    '''
    

    '''
    cssPath = os.path.splitext(sassPath)[0] + ".css"
    # subprocess.call(["sass", sassPath, cssPath])
    print("Compiling Sass")

    process = subprocess.Popen(["sass", sassPath, cssPath])
    process.wait()
1029765
function insertCss(styles, { replace = false, prepend = false, prefix = 's' } = {}) {
  const ids = []
  for (let i = 0; i < styles.length; i++) {
    const [moduleId, css, media, sourceMap] = styles[i]
    const id = `${prefix}${moduleId}-${i}`

    ids.push(id)

    if (inserted[id]) {
      if (!replace) {
        inserted[id]++
        continue
      }
    }

    inserted[id] = 1

    let elem = document.getElementById(id)
    let create = false

    if (!elem) {
      create = true

      elem = document.createElement('style')
      elem.setAttribute('type', 'text/css')
      elem.id = id

      if (media) {
        elem.setAttribute('media', media)
      }
    }

    let cssText = css
    if (sourceMap && typeof btoa === 'function') {
      // skip IE9 and below, see http://caniuse.com/atob-btoa
      cssText += `\n/*# sourceMappingURL=data:application/json;base64,${b64EncodeUnicode(
        JSON.stringify(sourceMap),
      )}*/`
      cssText += `\n/*# sourceURL=${sourceMap.file}?${id}*/`
    }

    if ('textContent' in elem) {
      elem.textContent = cssText
    } else {
      elem.styleSheet.cssText = cssText
    }

    if (create) {
      if (prepend) {
        document.head.insertBefore(elem, document.head.childNodes[0])
      } else {
        document.head.appendChild(elem)
      }
    }
  }

  return removeCss.bind(null, ids)
}
1186645
function cssTemplate (params) {
  // Localize parameters
  var items = params.items;
  var options = params.options;
  var tmplParams = {
    sprite: null,
    retina: null,
    items: [],
    options: options
  };

  var classFn = function (name, sep) {
    if (options.cssClass) {
      return '.' + cssesc(options.cssClass + sep + name, {isIdentifier: true});
    }
    else {
      return '.icon' + cssesc(sep + name, {isIdentifier: true});
    }
  };

  // Add class to each of the options
  items.forEach(function saveClass (item) {
    if (item.type === 'sprite') {
      item['class'] = classFn('', '');
      tmplParams.sprite = item;
    }
    else if (item.type === 'retina') {
      item['class'] = classFn('', '');
      tmplParams.retina = item;
    }
    else {
      item['class'] = classFn(item.name, '-');
      tmplParams.items.push(item);
    }
  });
  // Render and return CSS
  var tmplFile = options.template ?
    fs.readFileSync(path.resolve(process.cwd(), options.template), 'utf8') :
    tmpl[options.processor];
  var css = mustache.render(tmplFile, tmplParams);
  return css;
}
34936
function() {
            var book = this;

            var styles = book.config.get('styles');

            return _.reduce(styles, function(prev, filename, type) {
                return prev.then(function() {
                    var extension = path.extname(filename).toLowerCase();
                    if (extension != '.sass' && extension != '.scss') return;

                    book.log.info.ln('compile sass file: ', filename);

                    // Temporary CSS file
                    var tmpfile = type+'-'+Date.now()+'.css';

                    // Replace config
                    book.config.set('styles.'+type, tmpfile);

                    return renderSASS(
                        book.resolve(filename),
                        path.resolve(book.options.output, tmpfile)
                    );
                });
            }, Q());
        }
987050
function createWebpack ({ alias = {}, context, name = 'index' }) {
  const pkgJson = require(path.join(context, 'package.json'));
  const ENV = process.env.NODE_ENV || 'development';
  const isProd = ENV === 'production';
  const hasPublic = fs.existsSync(path.join(context, 'public'));
  const plugins = hasPublic
    ? [new CopyWebpackPlugin([{ from: 'public' }])]
    : [];

  return {
    context,
    devtool: isProd ? 'source-map' : 'cheap-eval-source-map',
    entry: [
      `./src/${name}.tsx`,
      isProd
        ? null
        : 'webpack-plugin-serve/client'
    ].filter((entry) => entry),
    mode: ENV,
    output: {
      chunkFilename: `[name].[chunkhash:8].js`,
      filename: `[name].[hash:8].js`,
      globalObject: `(typeof self !== 'undefined' ? self : this)`,
      path: path.join(context, 'build')
    },
    resolve: {
      alias,
      extensions: ['.js', '.jsx', '.ts', '.tsx']
    },
    module: {
      rules: [
        {
          test: /\.css$/,
          exclude: /(node_modules)/,
          use: [
            isProd
              ? MiniCssExtractPlugin.loader
              : require.resolve('style-loader'),
            {
              loader: require.resolve('css-loader'),
              options: {
                importLoaders: 1
              }
            },
            {
              loader: require.resolve('postcss-loader'),
              options: {
                ident: 'postcss',
                plugins: () => [
                  require('precss'),
                  require('autoprefixer'),
                  require('postcss-simple-vars'),
                  require('postcss-nested'),
                  require('postcss-import'),
                  require('postcss-clean')(),
                  require('postcss-flexbugs-fixes')
                ]
              }
            }
          ]
        },
        {
          test: /\.css$/,
          include: /node_modules/,
          use: [
            isProd
              ? MiniCssExtractPlugin.loader
              : require.resolve('style-loader'),
            require.resolve('css-loader')
          ]
        },
        {
          test: /\.(js|ts|tsx)$/,
          exclude: /(node_modules)/,
          use: [
            require.resolve('thread-loader'),
            {
              loader: require.resolve('babel-loader'),
              options: require('@polkadot/dev-react/config/babel')
            }
          ]
        },
        {
          test: /\.md$/,
          use: [
            require.resolve('html-loader'),
            require.resolve('markdown-loader')
          ]
        },
        {
          test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
          use: [
            {
              loader: require.resolve('url-loader'),
              options: {
                limit: 10000,
                name: 'static/[name].[hash:8].[ext]'
              }
            }
          ]
        },
        {
          test: [/\.eot$/, /\.ttf$/, /\.svg$/, /\.woff$/, /\.woff2$/],
          use: [
            {
              loader: require.resolve('file-loader'),
              options: {
                name: 'static/[name].[hash:8].[ext]'
              }
            }
          ]
        }
      ]
    },
    node: {
      child_process: 'empty',
      dgram: 'empty',
      fs: 'empty',
      net: 'empty',
      tls: 'empty'
    },
    optimization: {
      runtimeChunk: 'single',
      splitChunks: {
        cacheGroups: {
          vendorOther: {
            chunks: 'initial',
            enforce: true,
            name: 'vendor',
            test: /node_modules\/(asn1|bn\.js|buffer|cuint|elliptic|lodash|moment|readable-stream|rxjs)/
          },
          vendorReact: {
            chunks: 'initial',
            enforce: true,
            name: 'react',
            test: /node_modules\/(chart|i18next|react|semantic-ui)/
          },
          polkadotJs: {
            chunks: 'initial',
            enforce: true,
            name: 'polkadotjs',
            test: /node_modules\/(@polkadot\/wasm-(crypto|dalek-ed25519|schnorrkel))/
          }
        }
      }
    },
    performance: {
      hints: false
    },
    plugins: plugins.concat([
      new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
      new webpack.DefinePlugin({
        'process.env': {
          NODE_ENV: JSON.stringify(ENV),
          VERSION: JSON.stringify(pkgJson.version),
          WS_URL: JSON.stringify(process.env.WS_URL)
        }
      }),
      new HtmlWebpackPlugin({
        inject: true,
        template: path.join(context, `${hasPublic ? 'public/' : ''}${name}.html`),
        PAGE_TITLE: 'Polkadot/Substrate Portal'
      }),
      new webpack.optimize.SplitChunksPlugin(),
      new MiniCssExtractPlugin({
        filename: `[name].[contenthash:8].css`
      }),
      isProd
        ? null
        : new WebpackPluginServe({
          port: 3000,
          static: path.join(process.cwd(), '/build')
        })
    ]).filter((plugin) => plugin),
    watch: !isProd
  };
}
405750
function writeFile(file, css) {
  return new Promise((resolve, reject) => {
    fs.writeFile(file, css, err => {
      if (err) {
        return reject(err);
      }
      resolve();
    })
  });
}
23975
function (startDir, config) {
            if (config.optimizeCss.indexOf("standard") !== -1) {
                var i, fileName,
                    fileList = file.getFilteredFileList(startDir, /\.css$/, true);
                if (fileList) {
                    for (i = 0; i < fileList.length; i++) {
                        fileName = fileList[i];
                        logger.trace("Optimizing (" + config.optimizeCss + ") CSS file: " + fileName);
                        optimize.cssFile(fileName, fileName, config);
                    }
                }
            }
        }
1263133
function cssFilesToStyleTag(dom) {
    const rootDir = `${__dirname}/`;

    const styles = m('div', {}, cssFiles.map(file => m('link', { rel: 'stylesheet', href: rootDir + file })));

    m.render(dom, styles);
  }
917333
function loadCss() {
    var cssFileName = fs.path.join(fs.knownFolders.currentApp().path, application.cssFile);

    var applicationCss;
    if (FSA.fileExists(cssFileName)) {
        FSA.readText(cssFileName, function (r) { applicationCss = r; });
        //noinspection JSUnusedAssignment
        application.cssSelectorsCache = styleScope.StyleScope.createSelectorsFromCss(applicationCss, cssFileName);

        // Add New CSS to Current Page
        var f = frameCommon.topmost();
        if (f && f.currentPage) {
            f.currentPage._resetCssValues();
            f.currentPage._styleScope = new styleScope.StyleScope();
            //noinspection JSUnusedAssignment
            f.currentPage._addCssInternal(applicationCss, cssFileName);
            f.currentPage._refreshCss();
        }
    }
}
1211809
function (options, dir, callback) {
  async.forEachOf(options.icon, function (icon, resolution, callback) {
    var iconFile = path.join(dir, 'share/icons/hicolor', resolution, 'apps', options.id + '.png')
    options.logger('Creating icon file at ' + iconFile)

    fs.copy(icon, iconFile, callback)
  }, function (err) {
    callback(err && new Error('Error creating icon file: ' + (err.message || err)))
  })
}
1146168
function css () {
  b.css('substance.css', DIST + 'substance.css', { variables: true })
  b.css('substance.css', DIST + 'substance.next.css')
  b.css('substance-pagestyle.css', DIST + 'substance-pagestyle.css', {variables: true})
  b.css('substance-pagestyle.css', DIST + 'substance-pagestyle.next.css')
  b.css('substance-reset.css', DIST + 'substance-reset.css', {variables: true})
  b.css('substance-reset.css', DIST + 'substance-reset.next.css')
}
1053677
function build_dist_min(){
  // run webpack
  return gulp.src('index.js').pipe(webpackStream(createWebpackConfig({
    mode: 'production',
    entry: classicEntry,
    output: {
        filename:'oidc-client.min.js',
        libraryTarget:'var',
        library:'Oidc'
    },
    plugins: [],
    devtool: false,
    optimization: {
      minimizer: [
        new UglifyJsPlugin({
          uglifyOptions: {
            keep_fnames: true
          }
        })
      ]
    }
  }), webpack))
  .pipe(gulp.dest('dist/'));
}
94449
def add_cssfile(self, src: str) -> None:
        """"""
        self.head.appendChild(Link(rel='stylesheet', href=src))