fix loc strings module name and config to bundle the strings.
This commit is contained in:
parent
1a547030cc
commit
1a833f0f4e
|
@ -31,6 +31,9 @@
|
||||||
"react-dom/server": "node_modules/react-dom/dist/react-dom-server.min.js"
|
"react-dom/server": "node_modules/react-dom/dist/react-dom-server.min.js"
|
||||||
},
|
},
|
||||||
"localizedResources": {
|
"localizedResources": {
|
||||||
"helloWorldStrings": "webparts/helloWorld/loc/{locale}.js"
|
"todoStep1Strings": "webparts/todo-step-1/loc/{locale}.js",
|
||||||
|
"todoStep2Strings": "webparts/todo-step-2/loc/{locale}.js",
|
||||||
|
"todoStep3Strings": "webparts/todo-step-3/loc/{locale}.js",
|
||||||
|
"todoStep4Strings": "webparts/todo-step-4/loc/{locale}.js"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"group": { "default": "Under Development" },
|
"group": { "default": "Under Development" },
|
||||||
"title": { "default": "Todo step 1" },
|
"title": { "default": "Todo step 1" },
|
||||||
"description": { "default": "Todo sample webpart step 1" },
|
"description": { "default": "Todo sample webpart step 1" },
|
||||||
"officeFabricIconFontName": "Page",
|
"officeFabricIconFontName": "BulletedList",
|
||||||
"properties": {
|
"properties": {
|
||||||
"description": "Todo"
|
"description": "Todo"
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {
|
||||||
PropertyPaneTextField
|
PropertyPaneTextField
|
||||||
} from '@microsoft/sp-client-preview';
|
} from '@microsoft/sp-client-preview';
|
||||||
|
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep1Strings';
|
||||||
import Todo, { ITodoProps } from './components/Todo';
|
import Todo, { ITodoProps } from './components/Todo';
|
||||||
import { ITodoWebPartProps } from './ITodoWebPartProps';
|
import { ITodoWebPartProps } from './ITodoWebPartProps';
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
declare interface ITodoStrings {
|
declare interface ITodoStep1Strings {
|
||||||
PropertyPaneDescription: string;
|
PropertyPaneDescription: string;
|
||||||
BasicGroupName: string;
|
BasicGroupName: string;
|
||||||
DescriptionFieldLabel: string;
|
DescriptionFieldLabel: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'todoStrings' {
|
declare module 'todoStep1Strings' {
|
||||||
const strings: ITodoStrings;
|
const strings: ITodoStep1Strings;
|
||||||
export = strings;
|
export = strings;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ import {
|
||||||
import TodoForm from './TodoForm';
|
import TodoForm from './TodoForm';
|
||||||
import TodoTabs from './TodoTabs';
|
import TodoTabs from './TodoTabs';
|
||||||
|
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep2Strings';
|
||||||
import styles from '../style/Todo.module.scss';
|
import styles from '../style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,7 +16,7 @@ import {
|
||||||
ITodoTask,
|
ITodoTask,
|
||||||
ItemOperationCallback
|
ItemOperationCallback
|
||||||
} from '../ITodoWebPartProps';
|
} from '../ITodoWebPartProps';
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep2Strings';
|
||||||
import styles from '../style/Todo.module.scss';
|
import styles from '../style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -24,7 +24,7 @@ import {
|
||||||
ItemOperationCallback
|
ItemOperationCallback
|
||||||
} from '../ITodoWebPartProps';
|
} from '../ITodoWebPartProps';
|
||||||
|
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep2Strings';
|
||||||
import styles from '../style/Todo.module.scss';
|
import styles from '../style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,7 +23,7 @@ import {
|
||||||
|
|
||||||
import TodoList from './TodoList';
|
import TodoList from './TodoList';
|
||||||
|
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep2Strings';
|
||||||
import styles from '../style/Todo.module.scss';
|
import styles from '../style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
declare interface ITodoStrings {
|
declare interface ITodoStep2Strings {
|
||||||
TodoListTitle: string;
|
TodoListTitle: string;
|
||||||
TodoListTabNameAllTasks: string;
|
TodoListTabNameAllTasks: string;
|
||||||
TodoListTabNameCompleted: string;
|
TodoListTabNameCompleted: string;
|
||||||
|
@ -33,7 +33,7 @@ declare interface ITodoStrings {
|
||||||
TitleEmptyErrorMessage: string;
|
TitleEmptyErrorMessage: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'todoStrings' {
|
declare module 'todoStep2Strings' {
|
||||||
const strings: ITodoStrings;
|
const strings: ITodoStep2Strings;
|
||||||
export = strings;
|
export = strings;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ import {
|
||||||
} from './ITodoWebPartProps';
|
} from './ITodoWebPartProps';
|
||||||
|
|
||||||
import Todo, { ITodoProps } from './components/Todo';
|
import Todo, { ITodoProps } from './components/Todo';
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep3Strings';
|
||||||
import styles from './style/Todo.module.scss';
|
import styles from './style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,7 +21,7 @@ import {
|
||||||
import TodoForm from './TodoForm';
|
import TodoForm from './TodoForm';
|
||||||
import TodoTabs from './TodoTabs';
|
import TodoTabs from './TodoTabs';
|
||||||
|
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep3Strings';
|
||||||
import styles from '../style/Todo.module.scss';
|
import styles from '../style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,7 +16,7 @@ import {
|
||||||
ITodoTask,
|
ITodoTask,
|
||||||
ItemOperationCallback
|
ItemOperationCallback
|
||||||
} from '../ITodoWebPartProps';
|
} from '../ITodoWebPartProps';
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep3Strings';
|
||||||
import styles from '../style/Todo.module.scss';
|
import styles from '../style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -24,7 +24,7 @@ import {
|
||||||
ItemOperationCallback
|
ItemOperationCallback
|
||||||
} from '../ITodoWebPartProps';
|
} from '../ITodoWebPartProps';
|
||||||
|
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep3Strings';
|
||||||
import styles from '../style/Todo.module.scss';
|
import styles from '../style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,7 +23,7 @@ import {
|
||||||
|
|
||||||
import TodoList from './TodoList';
|
import TodoList from './TodoList';
|
||||||
|
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep3Strings';
|
||||||
import styles from '../style/Todo.module.scss';
|
import styles from '../style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -14,7 +14,7 @@ import {
|
||||||
ITodoTaskList
|
ITodoTaskList
|
||||||
} from '../ITodoWebPartProps';
|
} from '../ITodoWebPartProps';
|
||||||
|
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep3Strings';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TodoDataProvider interact with current sharepoint site to accomplish
|
* TodoDataProvider interact with current sharepoint site to accomplish
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
declare interface ITodoStrings {
|
declare interface ITodoStep3Strings {
|
||||||
TodoListTitle: string;
|
TodoListTitle: string;
|
||||||
TodoListTabNameAllTasks: string;
|
TodoListTabNameAllTasks: string;
|
||||||
TodoListTabNameCompleted: string;
|
TodoListTabNameCompleted: string;
|
||||||
|
@ -33,7 +33,7 @@ declare interface ITodoStrings {
|
||||||
TitleEmptyErrorMessage: string;
|
TitleEmptyErrorMessage: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'todoStrings' {
|
declare module 'todoStep3Strings' {
|
||||||
const strings: ITodoStrings;
|
const strings: ITodoStep3Strings;
|
||||||
export = strings;
|
export = strings;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ import {
|
||||||
} from './ITodoWebPartProps';
|
} from './ITodoWebPartProps';
|
||||||
|
|
||||||
import Todo, { ITodoProps } from './components/Todo';
|
import Todo, { ITodoProps } from './components/Todo';
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep4Strings';
|
||||||
import styles from './style/Todo.module.scss';
|
import styles from './style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,7 +21,7 @@ import {
|
||||||
import TodoForm from './TodoForm';
|
import TodoForm from './TodoForm';
|
||||||
import TodoTabs from './TodoTabs';
|
import TodoTabs from './TodoTabs';
|
||||||
|
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep4Strings';
|
||||||
import styles from '../style/Todo.module.scss';
|
import styles from '../style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,7 +16,7 @@ import {
|
||||||
ITodoTask,
|
ITodoTask,
|
||||||
ItemOperationCallback
|
ItemOperationCallback
|
||||||
} from '../ITodoWebPartProps';
|
} from '../ITodoWebPartProps';
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep4Strings';
|
||||||
import styles from '../style/Todo.module.scss';
|
import styles from '../style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -24,7 +24,7 @@ import {
|
||||||
ItemOperationCallback
|
ItemOperationCallback
|
||||||
} from '../ITodoWebPartProps';
|
} from '../ITodoWebPartProps';
|
||||||
|
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep4Strings';
|
||||||
import styles from '../style/Todo.module.scss';
|
import styles from '../style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,7 +23,7 @@ import {
|
||||||
|
|
||||||
import TodoList from './TodoList';
|
import TodoList from './TodoList';
|
||||||
|
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep4Strings';
|
||||||
import styles from '../style/Todo.module.scss';
|
import styles from '../style/Todo.module.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -14,7 +14,7 @@ import {
|
||||||
ITodoTaskList
|
ITodoTaskList
|
||||||
} from '../ITodoWebPartProps';
|
} from '../ITodoWebPartProps';
|
||||||
|
|
||||||
import * as strings from 'todoStrings';
|
import * as strings from 'todoStep4Strings';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TodoDataProvider interact with current sharepoint site to accomplish
|
* TodoDataProvider interact with current sharepoint site to accomplish
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
declare interface ITodoStrings {
|
declare interface ITodoStep4Strings {
|
||||||
TodoListTitle: string;
|
TodoListTitle: string;
|
||||||
TodoListTabNameAllTasks: string;
|
TodoListTabNameAllTasks: string;
|
||||||
TodoListTabNameCompleted: string;
|
TodoListTabNameCompleted: string;
|
||||||
|
@ -33,7 +33,7 @@ declare interface ITodoStrings {
|
||||||
TitleEmptyErrorMessage: string;
|
TitleEmptyErrorMessage: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'todoStrings' {
|
declare module 'todoStep4Strings' {
|
||||||
const strings: ITodoStrings;
|
const strings: ITodoStep4Strings;
|
||||||
export = strings;
|
export = strings;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue