diff --git a/README.md b/README.md index caf41c5..1807f91 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,6 @@ your site. You'll find a `vf-sample` component already placed in `./src/components` - ## 4. Footnotes - Why `yarn` and not `npm`? diff --git a/gulpfile.js b/gulpfile.js index 6ca8be9..03893f4 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -8,7 +8,16 @@ const {componentPath, componentDirectories, buildDestionation} = require('@visua require('./node_modules/\@visual-framework/vf-core/gulp-tasks/_gulp_rollup.js')(gulp, path, componentPath, componentDirectories, buildDestionation); require('./node_modules/\@visual-framework/vf-extensions/gulp-tasks/_gulp_rollup.js')(gulp, path, componentPath, componentDirectories, buildDestionation); -// Watch folders for changess +// Optional support for creating components +// `gulp vf-component` +try { + require(path.resolve(".", __dirname + "/node_modules/@visual-framework/vf-component-generator/gulp-tasks/vf-generator.js"))(gulp, path); +} catch (error) { + console.log("🛠 vf-component generator not found. To generate components: yarn add vf-component-generator --dev") + // console.error(error); +} + +// Watch folders for changes gulp.task('watch', function() { // left for convenience for local watch additions gulp.watch(['./build/css/styles.css'], gulp.series('eleventy:reload'));