# Use vue-seuqnce in your own project

First let's create a directory, initialize npm, and [install webpack locally](https://github.com/zenuml/language-reference/tree/021e55b7c7f2fd3c875a54d061e915817c0e25d6/guides/installation/README.md#local-installation):

```bash
mkdir vue-sequence-demo && cd vue-sequence-demo
npm init -y
npm install --save-dev webpack
npm install --save-dev webpack-dev-server
npm install --save vue-sequence
```

Now we'll create the following directory structure and contents:

**project**

```diff
  vue-sequence-demo
  |- package.json
  |- webpack.config.js
  |- index.html
  |- index.js
```

**index.js**

```javascript
import Vue from 'vue'
import 'vue-sequence/dist/main.css'
import VueSequence from 'vue-sequence'

Vue.component('seq-diagram', VueSequence.SeqDiagram)
window.Vue = Vue
```

**index.html**

```markup
<html>
  <head>
    <title>Vue Sequence Demo</title>
  </head>
  <body>
    <div id="diagram">
      <seq-diagram :code="code"></seq-diagram>
    </div>
    <script src="./dist/bundle.js"></script>
    <script>
      new Vue({
        el: '#diagram',
        data: { code: 'A.methodA()' }
      })
    </script>
  </body>
</html>
```

**webpack.config.js**

```javascript
const path = require('path');

module.exports = {
  entry: './index.js',
  node: { fs: 'empty' },
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, 'dist')
  },
  devServer: {
    contentBase: '.',
  },
  resolve: {
    extensions: ['.js'],
    alias: {
      'vue$': 'vue/dist/vue.esm.js'
    },
  },
  module: {
    rules: [
      {
        test: /\.css$/,
        use: [ 'style-loader', 'css-loader' ]
      }
    ]
  }

};
```

**package.json**

```javascript
{
  "name": "vue-sequence-demo",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "webpack-dev-server --open",
  },
  "keywords": [],
  "author": "",
  "devDependencies": {
    "css-loader": "^0.28.7",
    "style-loader": "^0.18.2",
    "webpack": "^3.5.6",
    "webpack-dev-server": "^2.7.1"
  },
  "dependencies": {
    "vue-sequence": "^0.3.4"
  }
}
```

Now, let's run the application:

```bash
npm run start
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zenuml.gitbook.io/language-reference/overview/use-vue-seuqnce-in-your-own-project.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
