Update react app settings (#442)

* update code comment

* Update to SPFx 1.4.1
This commit is contained in:
Joel Rodrigues 2018-03-09 00:34:33 +00:00 committed by Vesa Juvonen
parent e0703d749f
commit a940cae3bc
10 changed files with 17764 additions and 36 deletions

View File

@ -20,7 +20,7 @@ I have added appSettingsGulp.js with one gulp task in it. The task starts just b
Since the gulp task I created contains checks based on string operations, it is required that the appSettings.json and appSettings.d.ts are in format as provided and just key-pairs are added to the json file and respective just new properties are added to the IAppSettings interface in the appSettings.d.ts.
## Used SharePoint Framework Version
![drop](https://img.shields.io/badge/drop-GA-green.svg)
![drop](https://img.shields.io/badge/drop-1.4.1-green.svg)
## Applies to
@ -43,6 +43,7 @@ react-app-settings | Velin Georgiev ([@VelinGeorgiev](https://twitter.com/veling
Version|Date|Comments
-------|----|--------
0.0.1|August 03, 2017 | Initial commit
0.0.2|March 08, 2018 | Update to SPFx 1.4.1
## 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,13 +1,18 @@
{
"entries": [
"$schema": "https://dev.office.com/json-schemas/spfx-build/config.2.0.schema.json",
"version": "2.0",
"bundles": {
"react-app-settings-bundle": {
"components": [
{
"entry": "./lib/webparts/reactAppSettings/ReactAppSettingsWebPart.js",
"manifest": "./src/webparts/reactAppSettings/ReactAppSettingsWebPart.manifest.json",
"outputPath": "./dist/react-app-settings.bundle.js"
"entrypoint": "./lib/webparts/reactAppSettings/ReactAppSettingsWebPart.js",
"manifest": "./src/webparts/reactAppSettings/ReactAppSettingsWebPart.manifest.json"
}
],
"externals": {},
]
}
},
"localizedResources": {
"reactAppSettingsStrings": "webparts/reactAppSettings/loc/{locale}.js"
}
"reactAppSettingsStrings": "lib/webparts/reactAppSettings/loc/{locale}.js"
},
"externals": {}
}

View File

@ -1,4 +1,5 @@
{
"$schema": "https://dev.office.com/json-schemas/spfx-build/package-solution.schema.json",
"solution": {
"name": "react-app-settings-client-side-solution",
"id": "9573efb7-06d1-4134-aa8d-f6b4803d6096",

View File

@ -1,4 +1,5 @@
{
"$schema": "https://dev.office.com/json-schemas/core-build/tslint.schema.json",
// Display errors as warnings
"displayAsWarning": true,
// The TSLint task may have been configured with several custom lint rules
@ -29,7 +30,6 @@
"no-switch-case-fall-through": true,
"no-unnecessary-semicolons": true,
"no-unused-expression": true,
"no-unused-imports": true,
"no-use-before-declare": true,
"no-with-statement": true,
"semicolon": true,

17712
samples/react-app-settings/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,26 +1,26 @@
{
"name": "react-app-settings",
"version": "0.0.1",
"version": "0.0.2",
"private": true,
"engines": {
"node": ">=0.10.0"
},
"dependencies": {
"@microsoft/sp-core-library": "~1.1.0",
"@microsoft/sp-webpart-base": "~1.1.1",
"@microsoft/sp-core-library": "~1.4.1",
"@microsoft/sp-webpart-base": "~1.4.1",
"@types/webpack-env": ">=1.12.1 <1.14.0",
"react": "15.4.2",
"react-dom": "15.4.2",
"@types/react": "0.14.46",
"@types/react-dom": "0.14.18",
"react": "15.6.2",
"react-dom": "15.6.2",
"@types/react": "15.6.6",
"@types/react-dom": "15.5.6",
"@types/react-addons-shallow-compare": "0.14.17",
"@types/react-addons-update": "0.14.14",
"@types/react-addons-test-utils": "0.14.15"
},
"devDependencies": {
"@microsoft/sp-build-web": "~1.1.0",
"@microsoft/sp-module-interfaces": "~1.1.0",
"@microsoft/sp-webpart-workbench": "~1.1.0",
"@microsoft/sp-build-web": "~1.4.1",
"@microsoft/sp-module-interfaces": "~1.4.1",
"@microsoft/sp-webpart-workbench": "~1.4.1",
"gulp": "~3.9.1",
"@types/chai": ">=3.4.34 <3.6.0",
"@types/mocha": ">=2.2.33 <2.6.0"

View File

@ -3,7 +3,7 @@ var fs = require('fs'),
build = require('@microsoft/sp-build-web');
/**
* Verifies if the appSettings.json and appSettings.d.ts are have the same appSetting keys.
* Verifies if the appSettings.json and appSettings.d.ts have the same appSetting keys.
*/
var verifyAppSettings = build.subTask('verify-app-settings', function(gulp, buildConfig, done) {

View File

@ -15,7 +15,7 @@ import { IReactAppSettingsWebPartProps } from './IReactAppSettingsWebPartProps';
export default class ReactAppSettingsWebPart extends BaseClientSideWebPart<IReactAppSettingsWebPartProps> {
public render(): void {
const element: React.ReactElement<IReactAppSettingsProps > = React.createElement(
const element: React.ReactElement<IReactAppSettingsProps> = React.createElement(
ReactAppSettings,
{
description: this.properties.description

View File

@ -8,7 +8,7 @@ import { escape } from '@microsoft/sp-lodash-subset';
*/
import * as appSettings from 'appSettings';
export default class ReactAppSettings extends React.Component<IReactAppSettingsProps, void> {
export default class ReactAppSettings extends React.Component<IReactAppSettingsProps, {}> {
public render(): React.ReactElement<IReactAppSettingsProps> {
return (
<div className={styles.reactAppSettings}>

View File

@ -7,10 +7,19 @@
"declaration": true,
"sourceMap": true,
"experimentalDecorators": true,
"skipLibCheck": true,
"typeRoots": [
"./node_modules/@types",
"./node_modules/@microsoft"
],
"types": [
"es6-promise",
"es6-collections",
"webpack-env"
],
"lib": [
"es5",
"dom",
"es2015.collection"
]
}
}