2.1.3 • Published 9 months ago
@visual-framework/vf-extensions v2.1.3
vf-extensions
This project supports sites using Visual Framework components, like vf-eleventy
It has reusable componentised code, Gulp tasks, modules and config.
What's here and what it does
Gulp tasks
in ./gulp-tasks/
gulp-build-search-index.js: scans compiled html to make a JS object search index- requires
yarn add strip-js striptags node-html-parser - Elements wrapped with
class="vf-search-client-side--no-index"will not be logged in the index
- requires
_gulp_rollup.js: require this bundle and get the files belowgulp-eleventy.js: specific to running Eleventygulp-fractal.js: specific to running Fractalgulp-util.js: utility tasks
Eleventy
in /11ty
eleventy-cmd.js: a fork of the default Eleventy cmd.jsindex.js: reusable extensions/config for Eleventy and to load the below tags and filtersvfEleventyCommonPlugin.js: Reusable config for sane defaults
Nunjucks tags
in ./tags/
codeblock.js: outputs highlight code markupmarkdwon_tag.js: process a text area as markdownrender.js: port-fork-enhancement of the Fractal render extension for Nunjucks for 11ty and the VF{% render '@'+variant.handle, variant.context, true, { escape: false, beautify: true, codetype: 'html', highlight: true } %}- second property is for merging the parent context to set defaults
- third option set escaping of code, beautify (formatting), code type (default: html) and highlighting (hljs)
spaceless.js: trim unneeded whitespace
Nunjucks filters
in ./filters/
markdown.js: process a string as markdownsection.js: split the content into excerpt and remainderpath.js: catch references to the "path" filter which is not part of 11ty and results in obtuse error codes
Assorted utilities
In ./utils/
minify-html.js: pass in html content and minify
Usage with Eleventy
Note: Projects utilising vf-eleventy make use of this package by default.
- a project based off
vf-eleventy yarn add @visual-framework/vf-extensionsin
eleventy.jsyou should have:
const vfEleventyExtension = require("@visual-framework/vf-extensions\/11ty");
config.addPlugin(vfEleventyExtension);- in
gulpfile.jsyou should have:
require('./node_modules/\@visual-framework/vf-extensions/gulp-tasks/_gulp_rollup.js')(gulp, path, componentPath, componentDirectories, buildDestionation);2.1.3
9 months ago
2.1.2
1 year ago
2.1.1
1 year ago
3.0.0
3 years ago
2.1.0-alpha.1
3 years ago
2.0.0-alpha.3
3 years ago
2.0.0-alpha.1
4 years ago
2.0.0-alpha.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
1.0.0-rc.1
5 years ago
1.0.0-rc.0
5 years ago
1.0.0-alpha.9
5 years ago
1.0.0-alpha.7
5 years ago
1.0.0-alpha.8
5 years ago
1.0.0-alpha.6
6 years ago
1.0.0-alpha.5
6 years ago
1.0.0-alpha.4
6 years ago
1.0.0-alpha.3
6 years ago
1.0.0-alpha.2
6 years ago
1.0.0-alpha.1
6 years ago