Logo
Explore Help
Sign In
iSharkFly-Docs/angular-docs-cn
1
0
Fork 0
You've already forked angular-docs-cn
Code Issues Pull Requests Packages Projects Releases Wiki Activity
angular-docs-cn/aio/tools/transforms/angular-base-package/processors/copyContentAssets.js

13 lines
260 B
JavaScript
Raw Normal View History

build(aio): copy content image assets
2017-04-01 07:01:44 +01:00
module.exports = function copyContentAssetsProcessor(copyFolder) {
return {
build(aio): auto-fill width/height to all image tags Parse all `<img>` tags, during doc-gen, and insert the width and height of the sourceed image, if neither are already specified. Warnings are reported if the `<img>` tag has no `src` attribute or the image cannot be loaded. The work is done in the `addImageDimensions` post-processor, which must be configured with a `basePath` so that it knows where to find the images. Closes #15888
2017-04-28 15:05:05 +01:00
$runBefore: ['postProcessHtml'],
build(aio): copy content image assets
2017-04-01 07:01:44 +01:00
assetMappings: [],
$process() {
this.assetMappings.forEach(map => {
copyFolder(map.from, map.to);
});
}
};
};
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.1 Page: 852ms Template: 9ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API