Copy the asset files
Copy all css, js, images asset files
196020
public function copyAssets()
    {
        // copy ASSETS
        //$source = $this->basePath . "resources" . $this->ds . "assets";
        //$this->copyFilesFromSource($source, resource_path("assets"));

        // copy WEBPACK.js
        $base = $source = $this->basePath . "resources" . $this->ds . "assets_setup" . $this->ds;
        $source = [
            $base . "webpack.mix.js",
            $base . "package.json",
            $base . "package-lock.json",
        ];
        $this->copyFilesFromSource($source, base_path(), false);
    }
347212
public function set_assets() {

		$this->assets['script'][ $this->type ] = $this->url . 'assets/js/' . $this->type . UIX_ASSET_DEBUG . '.js';
		$this->assets['style'][ $this->type ]  = $this->url . 'assets/css/' . $this->type . UIX_ASSET_DEBUG . '.css';

		parent::set_assets();

	}
512194
function assetFile(filename, callback) {
      const data = {
        source: files[filename].source,
        destination: files[filename].destination || path.join(path.dirname(filename), '.')
      }
      delete files[filename]
      metalsmithAssets(data)(files, metalsmith, callback)
    }
732435
def compile_assets
      sources_with_assets.each do |file|
        source = File.read file
        assets.each { |a| a.update_source! source }
        Utils.write_to_file source, file, preserve: true
      end
      self
    end
18753
public function set_assets() {

		$this->assets['style']['metabox']   = $this->url . 'assets/css/metabox' . UIX_ASSET_DEBUG . '.css';
		$this->assets['script']['baldrick'] = [
			'src'  => $this->url . 'assets/js/jquery.baldrick' . UIX_ASSET_DEBUG . '.js',
			'deps' => [ 'jquery' ],
		];
		parent::set_assets();
	}
127611
def build_assets(args):
    
    # Get the path to the JS directory
    asset_path = path.join(path.dirname(longclaw.__file__), 'client')
    try:
        # Move into client dir
        curdir = os.path.abspath(os.curdir)
        os.chdir(asset_path)
        print('Compiling assets....')
        subprocess.check_call(['npm', 'install'])
        subprocess.check_call(['npm', 'run', 'build'])
        os.chdir(curdir)
        print('Complete!')
    except (OSError, subprocess.CalledProcessError) as err:
        print('Error compiling assets:  {}'.format(err))
        raise SystemExit(1)
283487
function copySchemaFiles() {
    const resolvedSrcSchemaPaths = path.resolve(rootDir, srcSchemaPaths);

    glob(resolvedSrcSchemaPaths, void(0), function(error, files) {
        files.forEach((filePath) => {
        const destSchemaPath = filePath.replace(/(\bsrc\b)(?!.*\1)/, destDir);
            fs.copyFileSync(filePath, destSchemaPath);
        });
    });
}
537592
function bundle () {
  const ordered = order(deps[postcssify.entry], [], {})
  const l = ordered.length
  let ast
  for (let i = 0; i < l; i++) {
    const file = ordered[i]
    const style = styles[file]
    if (style === void 0) {
      return
    } else {
      if (!ast) {
        ast = style.clone()
      } else {
        ast.append(style)
      }
    }
  }
  if (ast) {
    postcss(processors).process(ast.toResult(), { to: dest, map: true }).then((result) => {
      fs.writeFile(dest, result.css, (err) => {
        if (err) {
          throw err
        } else {
          log.info('updated: %s', dest)
        }
      })
    }).catch((err) => log.error(err))
  }
}
1229628
protected function scripts()
    {
        $assetService = $this->getServiceLocator()->get(AssetService::SERVICE_ID);
        $cssFiles = [
            $assetService->getAsset('css/layout.css', 'tao'),
            $assetService->getAsset('css/tao-main-style.css', 'tao'),
            $assetService->getAsset('css/tao-3.css', 'tao')
        ];

        //stylesheets to load
        \tao_helpers_Scriptloader::addCssFiles($cssFiles);

        if(\common_session_SessionManager::isAnonymous()) {
            \tao_helpers_Scriptloader::addCssFile(
                $assetService->getAsset('css/portal.css', 'tao')
            );
        }
    }
824413
def copy_with(self, geometry=None, properties=None, assets=None):
        """"""
        def copy_assets_object(asset):
            obj = asset.get("__object")
            if hasattr("copy", obj):
                new_obj = obj.copy()
            if obj:
                asset["__object"] = new_obj

        geometry = geometry or self.geometry.copy()
        new_properties = copy.deepcopy(self.properties)
        if properties:
            new_properties.update(properties)
        if not assets:
            assets = copy.deepcopy(self.assets)
            map(copy_assets_object, assets.values())
        else:
            assets = {}
        return self.__class__(geometry, new_properties, assets)
112098
private function generateAssets()
    {
        $sourceDir = $this->skeletonDir;

        $relPath = '/Resources/ui/';
        $this->copyFiles($sourceDir . $relPath, $this->getAssetsDir($this->bundle) . '/ui', true);
        $this->renderFiles(
            $sourceDir . $relPath . '/js/',
            $this->getAssetsDir($this->bundle) . '/ui/js/',
            array('bundle' => $this->bundle, 'demosite' => $this->demosite),
            true
        );
        $this->renderFiles(
            $sourceDir . $relPath . '/scss/',
            $this->getAssetsDir($this->bundle) . '/ui/scss/',
            array('bundle' => $this->bundle, 'demosite' => $this->demosite),
            true
        );

        if (!$this->demosite) {
            // Files
            $this->removeDirectory($this->getAssetsDir($this->bundle) . '/ui/files/');

            // Images
            $this->removeDirectory($this->getAssetsDir($this->bundle) . '/ui/fonts/');

            // JS
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/js/search.js');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/js/demoMsg.js');

            // Images
            $this->removeDirectory($this->getAssetsDir($this->bundle) . '/ui/img/demosite/');
            $this->removeDirectory($this->getAssetsDir($this->bundle) . '/ui/img/buttons/');
            $this->removeDirectory($this->getAssetsDir($this->bundle) . '/ui/img/dummy/');
            $this->removeDirectory($this->getAssetsDir($this->bundle) . '/ui/img/backgrounds/');

            // SCSS
            // SCSS - Blocks
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/blocks/_img-icon.scss');

            // SCSS - Forms
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/forms/_form-widget.scss');

            // SCSS - Structures
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/_splash.scss');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/docs/splash.md');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/_submenu.scss');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/docs/submenu.md');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/_blog-item.scss');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/docs/blog-item.md');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/docs/blog-item-summary.md');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/_search-results.scss');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/docs/search-results.md');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/_breadcrumb-nav.scss');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/docs/breadcrumb.md');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/_header-visual.scss');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/docs/header-visual.md');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/_newsletter.scss');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/docs/newsletter.md');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/_pagination.scss');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/docs/pagination.md');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/structures/_demosite-msg.scss');

            // SCSS - Header
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/header/_main-nav.scss');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/header/_site-nav.scss');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/header/_language-nav.scss');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/header/_contact-nav.scss');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/header/_search-form.scss');

            // SCSS - Footer
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/footer/_social-footer.scss');

            // SCSS - Pageparts
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/components/pageparts/_service-pp.scss');

            // SCSS - Config
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/config/vendors/_cargobay-imports.scss');
            $this->removeFile($this->getAssetsDir($this->bundle) . '/ui/scss/config/vendors/_cargobay-vars.scss');

            // SCSS - Mixins
            $this->removeDirectory($this->getAssetsDir($this->bundle) . '/ui/scss/helpers/mixins/');
        }

        $relPath = '/Resources/admin/';
        $this->copyFiles($sourceDir . $relPath, $this->getAssetsDir($this->bundle) . '/admin', true);

        $this->assistant->writeLine('Generating ui assets : <info>OK</info>');
    }
1316189
def compile_assets(self):
        
        try:
            # Move into client dir
            curdir = os.path.abspath(os.curdir)
            client_path = os.path.join(os.path.dirname(__file__), 'longclaw', 'client')
            os.chdir(client_path)
            subprocess.check_call(['npm', 'install'])
            subprocess.check_call(['npm', 'run', 'build'])
            os.chdir(curdir)
        except (OSError, subprocess.CalledProcessError) as err:
            print('Error compiling assets:  {}'.format(err))
            raise SystemExit(1)
19867
def compress_css(paths, variant=nil, asset_url=nil)
      @asset_contents = {}
      css = concatenate_and_tag_assets(paths, variant)
      css = @css_compressor.compress(css) if Jammit.compress_assets
      case variant
      when nil      then return css
      when :datauri then return with_data_uris(css)
      when :mhtml   then return with_mhtml(css, asset_url)
      else raise PackageNotFound, "\"#{variant}\" is not a valid stylesheet variant"
      end
    end
1254271
function copyResources(output, plugin) {
    var logger = output.getLogger();

    var options    = output.getOptions();
    var outputRoot = options.get('root');

    var state = output.getState();
    var resources = state.getResources();

    var pluginRoot      = plugin.getPath();
    var pluginResources = resources.get(plugin.getName());

    var assetsFolder = pluginResources.get('assets');
    var assetOutputFolder = path.join(outputRoot, 'gitbook', plugin.getNpmID());

    if (!assetsFolder) {
        return Promise();
    }

    // Resolve assets folder
    assetsFolder = path.resolve(pluginRoot, assetsFolder);
    if (!fs.existsSync(assetsFolder)) {
        logger.warn.ln('assets folder for plugin "' + plugin.getName() + '" doesn\'t exist');
        return Promise();
    }

    logger.debug.ln('copy resources from plugin', assetsFolder);

    return fs.copyDir(
        assetsFolder,
        assetOutputFolder,
        {
            deleteFirst: false,
            overwrite: true,
            confirm: true
        }
    );
}
175769
protected function _loadAssets()
    {
        if (Configure::read('CrudView.useAssetCompress')) {
            $this->AssetCompress->css('CrudView.crudview', ['block' => true]);
            $this->AssetCompress->script('CrudView.crudview_head', ['block' => 'headjs']);
            $this->AssetCompress->script('CrudView.crudview', ['block' => true]);

            return;
        }

        $config = Configure::read('CrudView');
        if (!$config) {
            return;
        }

        if (!empty($config['css'])) {
            $this->Html->css($config['css'], ['block' => true]);
        }

        if (!empty($config['js'])) {
            foreach ($config['js'] as $block => $scripts) {
                $this->Html->script($scripts, ['block' => $block]);
            }
        }
    }
1248965
function copyFile (src, done) {
        var dest = path.join(outdir, path.relative(compiler.dirname, src))
        var dirname = utils.dirname(dest)

        if (dirname === dest) {
          copy(src, dest, compiler.dirname, done)
        } else {
          mkdirp(dirname, function (err) {
            if (err) return done(err)
            copy(src, dest, compiler.dirname, done)
          })
        }
      }
1240687
function copyAssetsLess() {
  return gulp.src(['./src/assets/stylesheets/*.less'])
    .pipe(replace(/\.\.\/.\.\/.\.\//g, function () {
      return '../../../../';
    }))
    .pipe(replace(/@import '\.\.\/\.\.\/.*\//g, function () {
      return '@import \'';
    }))
    .pipe(rename({dirname: ''}))
    .pipe(gulp.dest(libraryDist + '/dist/less'));
}