From b463ab73b338e9f08f74de0cc968003deefebb7c Mon Sep 17 00:00:00 2001 From: Devanand Date: Sat, 7 Dec 2019 16:09:09 +0530 Subject: [PATCH 1/2] Created Readme Added a base level documentation on usage. --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7aa484c --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# Vue Adapter for Fractal + +This adapter lets you use Vue as a template engine in [Fractal](http://fractal.build). It's based on Fractal's [Handlebars adapter](https://github.com/frctl/handlebars). This adapter aims to maintain a Vue flavor rather than achieve complete feature parity with the Handlebars adapter. The goal is to facilitate writing Vue components that can easily be used in other projects. + +## Installation + +Install the adapter via NPM: + +``` +npm i --save fractal-vue-adapter +``` + +You have to add this adapter via github to your project, e.g. in the package.json: + +"@swey/fractal-vue-adapter": "swey/fractal-vue-adapter#v0.3.5", + +In your fractal.js just set the engine like this: + +```javascript +const Vue = require('vue'); + +fractal.components.set('engine', '@swey/fractal-vue-adapter'); +fractal.components.set('ext', '.(vue|html)'); +``` + +In the fractal.js you can also add plugins, e.g.: + +``` +Vue.use(require('./src/js/plugins/GlobalsPlugin')); +``` From adf61d32eb5913ddec2e413894d822d1323f62ac Mon Sep 17 00:00:00 2001 From: Devanand Date: Sat, 7 Dec 2019 16:24:02 +0530 Subject: [PATCH 2/2] Fixed the install command --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7aa484c..8687f0d 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,10 @@ This adapter lets you use Vue as a template engine in [Fractal](http://fractal.b Install the adapter via NPM: ``` -npm i --save fractal-vue-adapter +npm i --save swey/fractal-vue-adapter ``` -You have to add this adapter via github to your project, e.g. in the package.json: - -"@swey/fractal-vue-adapter": "swey/fractal-vue-adapter#v0.3.5", - -In your fractal.js just set the engine like this: +#### In your fractal.js just set the engine like this: ```javascript const Vue = require('vue'); @@ -23,7 +19,7 @@ fractal.components.set('engine', '@swey/fractal-vue-adapter'); fractal.components.set('ext', '.(vue|html)'); ``` -In the fractal.js you can also add plugins, e.g.: +#### In the fractal.js you can also add plugins, e.g.: ``` Vue.use(require('./src/js/plugins/GlobalsPlugin'));