Skip to content

Commit

Permalink
Add support for creating components
Browse files Browse the repository at this point in the history
  • Loading branch information
khawkins98 committed Nov 19, 2021
1 parent 2ab423c commit f0dfd00
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`?
Expand Down
11 changes: 10 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit f0dfd00

Please sign in to comment.