Upgraded Vue.js sample to GA. (#168)

This commit is contained in:
Sergei Sergeev 2017-03-31 01:34:42 +03:00 committed by Vesa Juvonen
parent fb66482027
commit 4a4fccf69b
15 changed files with 49 additions and 48 deletions

View File

@ -1,7 +1,5 @@
// Place your settings in this file to overwrite default and user settings.
{
"vsicons.presets.angular": false,
"typescript.tsdk": "./node_modules/typescript/lib",
"files.associations": {
"*.vue": "vue"
}
"tslint.configFile": "./config/tslint.json",
"tslint.ignoreDefinitionFiles": true
}

View File

@ -5,7 +5,7 @@
Sample Todo web part demonstrating how you can utilize [Vue](https://vuejs.org/v2) (a progressive framework for building user interfaces) with SharePoint Framework using handy [single-file components](https://vuejs.org/v2/guide/single-file-components.html) approach.
## Used SharePoint Framework Version
![drop](https://img.shields.io/badge/drop-RC0-green.svg)
![drop](https://img.shields.io/badge/drop-GA-green.svg)
## Applies to
@ -23,6 +23,7 @@ vuejs-todo-single-file-component|Sergei Sergeev ([@sergeev_srg](https://twitter.
Version|Date|Comments
-------|----|--------
0.0.1|January 27, 2017|Initial version.
0.0.2|March 30, 2017|Updated to GA
## Disclaimer
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

View File

@ -1,15 +1,15 @@
{
"entries": [
{
"entry": "./lib/webparts/todo/TodoWebPart.js",
"manifest": "./src/webparts/todo/TodoWebPart.manifest.json",
"outputPath": "./dist/todo.bundle.js"
"entry": "./lib/webparts/toDo/ToDoWebPart.js",
"manifest": "./src/webparts/toDo/ToDoWebPart.manifest.json",
"outputPath": "./dist/to-do.bundle.js"
}
],
"externals": {
"vue": "node_modules/vue/dist/vue.runtime.js"
},
"localizedResources": {
"todoStrings": "webparts/todo/loc/{locale}.js"
"toDoStrings": "webparts/toDo/loc/{locale}.js"
}
}

View File

@ -1,7 +1,7 @@
{
"solution": {
"name": "vue-todo-client-side-solution",
"id": "3a3be1f4-edfd-4816-8cfb-f100f1727031",
"id": "93e1bc8f-a063-4617-aa40-837e3b39f958",
"version": "1.0.0.0"
},
"paths": {

View File

@ -16,13 +16,11 @@
"export-name": false,
"forin": false,
"label-position": false,
"label-undefined": false,
"member-access": true,
"no-arg": false,
"no-console": false,
"no-construct": false,
"no-duplicate-case": true,
"no-duplicate-key": false,
"no-duplicate-variable": true,
"no-eval": false,
"no-function-expression": true,
@ -32,8 +30,6 @@
"no-unnecessary-semicolons": true,
"no-unused-expression": true,
"no-unused-imports": true,
"no-unused-variable": true,
"no-unreachable": true,
"no-use-before-declare": true,
"no-with-statement": true,
"semicolon": true,
@ -44,7 +40,7 @@
"valid-typeof": true,
"variable-name": false,
"whitespace": false,
"prefer-const": true
"prefer-const": false
}
}
}

View File

@ -1,33 +1,33 @@
{
"name": "vue-todo",
"version": "0.0.1",
"version": "0.0.2",
"private": true,
"engines": {
"node": ">=0.10.0"
},
"dependencies": {
"@microsoft/sp-client-base": "~0.7.0",
"@microsoft/sp-client-preview": "~0.9.0",
"@microsoft/sp-core-library": "~0.1.2",
"@microsoft/sp-webpart-base": "~0.4.0",
"@microsoft/sp-client-base": "~1.0.0",
"@microsoft/sp-core-library": "~1.0.0",
"@microsoft/sp-webpart-base": "~1.0.0",
"@types/webpack-env": ">=1.12.1 <1.14.0",
"vue": "^2.1.10",
"vue-class-component": "^4.4.0",
"vue-property-decorator": "^3.4.0",
"vue-template-compiler": "^2.1.10"
"vue": "^2.2.6",
"vue-class-component": "^5.0.1",
"vue-property-decorator": "^4.0.0",
"vue-template-compiler": "^2.2.6"
},
"devDependencies": {
"@microsoft/sp-build-web": "~0.9.0",
"@microsoft/sp-module-interfaces": "~0.7.0",
"@microsoft/sp-webpart-workbench": "~0.8.0",
"@microsoft/gulp-core-build-typescript": "^3.0.0",
"@microsoft/sp-build-web": "~1.0.0",
"@microsoft/sp-module-interfaces": "~1.0.0",
"@microsoft/sp-webpart-workbench": "~1.0.0",
"@types/chai": ">=3.4.34 <3.6.0",
"@types/mocha": ">=2.2.33 <2.6.0",
"css-loader": "^0.28.0",
"gulp": "~3.9.1",
"node-sass": "^4.3.0",
"sass-loader": "^4.1.1",
"css-loader": "^0.26.1",
"vue-loader": "^10.0.2",
"webpack-merge": "^2.4.0"
"node-sass": "^4.5.2",
"sass-loader": "^6.0.3",
"vue-loader": "^11.3.4",
"webpack-merge": "^4.1.0"
},
"scripts": {
"build": "gulp bundle",

View File

@ -1,5 +0,0 @@
var context = require.context('.', true, /.+\.test\.js?$/);
context.keys().forEach(context);
module.exports = context;

View File

@ -1,16 +1,16 @@
{
"$schema": "../../../node_modules/@microsoft/sp-module-interfaces/lib/manifestSchemas/jsonSchemas/clientSideComponentManifestSchema.json",
"id": "1c993233-909a-4662-8643-8548d961f2b3",
"alias": "TodoWebPart",
"id": "a0e1eddd-ea67-4775-a52b-0141c5807146",
"alias": "ToDoWebPart",
"componentType": "WebPart",
"version": "0.0.1",
"manifestVersion": 2,
"preconfiguredEntries": [{
"groupId": "1c993233-909a-4662-8643-8548d961f2b3",
"groupId": "a0e1eddd-ea67-4775-a52b-0141c5807146",
"group": { "default": "Under Development" },
"title": { "default": "Todo" },
"title": { "default": "ToDo" },
"description": { "default": "My Todo&#39;s" },
"officeFabricIconFontName": "Page",
"properties": {

View File

@ -4,11 +4,12 @@ import {
IPropertyPaneConfiguration,
PropertyPaneTextField
} from '@microsoft/sp-webpart-base';
import { escape } from '@microsoft/sp-lodash-subset';
import * as Vue from 'vue';
import TodoComponent from './components/todo/Todo.vue';
import * as strings from 'todoStrings';
import * as strings from 'toDoStrings';
import { ITodoWebPartProps } from './ITodoWebPartProps';
export default class TodoWebPart extends BaseClientSideWebPart<ITodoWebPartProps> {

View File

@ -1,10 +1,10 @@
declare interface ITodoStrings {
declare interface IToDoStrings {
PropertyPaneDescription: string;
BasicGroupName: string;
DescriptionFieldLabel: string;
}
declare module 'todoStrings' {
const strings: ITodoStrings;
declare module 'toDoStrings' {
const strings: IToDoStrings;
export = strings;
}

View File

@ -2,7 +2,7 @@
import { assert } from 'chai';
describe('TodoWebPart', () => {
describe('ToDoWebPart', () => {
it('should do something', () => {
assert.ok(true);
});

View File

@ -7,6 +7,7 @@
"declaration": true,
"sourceMap": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"types": [
"webpack-env"
]

View File

@ -0,0 +1,8 @@
// Type definitions for Microsoft ODSP projects
// Project: ODSP
/* Global definition for UNIT_TEST builds
Code that is wrapped inside an if(UNIT_TEST) {...}
block will not be included in the final bundle when the
--ship flag is specified */
declare const UNIT_TEST: boolean;

View File

@ -0,0 +1 @@
/// <reference path="@ms/odsp.d.ts" />