Skip to content

Commit eeb678a

Browse files
Merge pull request #101 from microsoftgraph/mhawker/vue-sample-demo
Vue.js Sample from //Build
2 parents ad33829 + d2098fd commit eeb678a

File tree

23 files changed

+1060
-13
lines changed

23 files changed

+1060
-13
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"editor.formatOnSave": true,
3-
"editor.defaultFormatter": "esbenp.prettier-vscode"
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"vetur.format.enable": false
45
}

docs/components/login.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,17 @@ The `mgt-login` component defines these CSS custom properties
5151
mgt-login {
5252
--font-size: 14px;
5353
--font-weight: 600;
54+
--width: '100%';
5455
--height: '100%';
5556
--margin: 0;
5657
--padding: 12px 20px;
5758
--color: #201f1e;
5859
--background-color: transparent;
5960
--background-color--hover: #edebe9;
6061
--popup-content-background-color: white;
61-
--popup-command-font-size: 12px; }
62+
--popup-command-font-size: 12px;
63+
--popup-command-margin: 0;
64+
--popup-padding: 16px;
6265
}
6366
```
6467

samples/vue-app/.browserslistrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not ie <= 8

samples/vue-app/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
15+
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw?

samples/vue-app/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Vue.js Sample for MGT
2+
3+
This sample shows how to incorporate the Microsoft Graph Toolkit into a [Vue.js](https://vuejs.org/) app.
4+
5+
The sample was initially created with the [vue-cli](https://cli.vuejs.org/) tool for Typescript and dart-sass.
6+
7+
## Setting up Vue for MGT
8+
9+
1. Install MGT with `npm install @microsoft/mgt`
10+
2. In your `App.vue` or other Vue components, add an import with the components you want to use E.g. `import { MgtMsalProvider, MgtLogin, MgtAgenda } from '@microsoft/mgt';`.
11+
3. Now you can use those MGT components in your Vue component!
12+
13+
## Project setup
14+
```
15+
npm install
16+
```
17+
18+
### Compiles and hot-reloads for development
19+
```
20+
npm run serve
21+
```
22+
23+
### Compiles and minifies for production
24+
```
25+
npm run build
26+
```
27+
28+
### Run your tests
29+
```
30+
npm run test
31+
```
32+
33+
### Lints and fixes files
34+
```
35+
npm run lint
36+
```
37+
38+
### Customize configuration
39+
See [Configuration Reference](https://cli.vuejs.org/config/).

samples/vue-app/package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "vue-app",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint"
9+
},
10+
"dependencies": {
11+
"@microsoft/mgt": "0.1.1",
12+
"vue": "^2.6.10",
13+
"vue-class-component": "^7.0.2",
14+
"vue-property-decorator": "^8.1.0"
15+
},
16+
"devDependencies": {
17+
"@vue/cli-plugin-typescript": "^3.6.0",
18+
"@vue/cli-service": "^3.6.0",
19+
"sass": "^1.18.0",
20+
"sass-loader": "^7.1.0",
21+
"typescript": "^3.4.3",
22+
"vue-template-compiler": "^2.5.21"
23+
}
24+
}

samples/vue-app/postcss.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
plugins: {
3+
autoprefixer: {}
4+
}
5+
}
Lines changed: 62 additions & 0 deletions
Loading
Lines changed: 50 additions & 0 deletions
Loading

samples/vue-app/public/exit.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)