Skip to content

Commit

Permalink
add package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
akbarjoudi committed Mar 21, 2020
1 parent 887d837 commit 59e93c5
Show file tree
Hide file tree
Showing 11 changed files with 104 additions and 127 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# node_modules
/node_modules

/package-lock.json
85 changes: 14 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# vuejs
vuejs
=====
for yii2 web application

for yii2 web application

## Installation
Installation
------------

The preferred way to install this extension is through [composer](https://getcomposer.org/download/).

Expand All @@ -20,20 +21,11 @@ or add

to the require section of your `composer.json` file.

## After installing the extension, first install the vuejs framework

Either run

```
# install deps
npm install
```

Usage
-----

---

Once the extension is installed, simply use it in your code by :
Once the extension is installed, simply use it in your code by :

```php
<?php
Expand All @@ -56,70 +48,21 @@ use aki\vue\Vue;
. "}"),
]
]); ?>

<p>{{ message }}</p>
<button v-on:click="reverseMessage">Reverse Message</button>

<p v-if="seen">Now you see me</p>


<ol>
<li v-for="todo in todos">
{{ todo.text }}
</li>
</ol>

<p>{{ message }}</p>
<input v-model="message">


<?php Vue::end(); ?>
```

Add Vue Router

---

simply use it in your code by :

```php
<?php
use aki\vue\Vue;
use aki\vue\VueRouter;
use aki\vue\VueComponent;
?>
<?php Vue::begin([
'id' => "vue-app",
'vueRouter'=> VueRouter::widget([
'routes' => [
[
'path' => '/foo',
'component' => new VueComponent([
'template' => '@vueroot/views/foo.php',
'components' => [
'yoo-component'=> new VueComponent([
'template' => '<div>yoo!!! {{id}}</div>',
'props' => [
'id'
]
])
],
])
],
[
'path' => '/bar',
'component' => new VueComponent([
'template' => '<div>hello</div>'
])
]
]
])
]); ?>

<router-link to="/foo">Go to Foo</router-link>
<router-link to="/bar">Go to Bar</router-link>

<!-- route outlet -->
<?= VueRouter::$outlet ?><!-- <router-view></router-view> -->
<?php Vue::end(); ?>
```
3 changes: 0 additions & 3 deletions components/HelloWorld.php

This file was deleted.

24 changes: 13 additions & 11 deletions node_modules/axios/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 12 additions & 9 deletions node_modules/debug/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions node_modules/follow-redirects/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions node_modules/ms/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 13 additions & 11 deletions node_modules/vue-router/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 59e93c5

Please sign in to comment.