Webpack 5 support with updated packages (#131)

- Update to Webpack 5
- Use @effortlessmotion dynamic html and inline source plugins
- Remove .clasp.json and use SAMPLE file
- Consistent prettier formatting throughout
- Update packages to latest versions

Co-authored-by: Kevin Malakoff <kmalakoff@gmail.com>
This commit is contained in:
Elisha Nuchi
2022-06-20 01:59:26 -04:00
committed by GitHub
parent 0adf784ba1
commit fd73dc051c
25 changed files with 7690 additions and 17891 deletions
@@ -11,29 +11,20 @@ const SheetEditor = () => {
useEffect(() => {
// Call a server global function here and handle the response with .then() and .catch()
serverFunctions
.getSheetsData()
.then(setNames)
.catch(alert);
serverFunctions.getSheetsData().then(setNames).catch(alert);
}, []);
const deleteSheet = sheetIndex => {
serverFunctions
.deleteSheet(sheetIndex)
.then(setNames)
.catch(alert);
const deleteSheet = (sheetIndex) => {
serverFunctions.deleteSheet(sheetIndex).then(setNames).catch(alert);
};
const setActiveSheet = sheetName => {
serverFunctions
.setActiveSheet(sheetName)
.then(setNames)
.catch(alert);
const setActiveSheet = (sheetName) => {
serverFunctions.setActiveSheet(sheetName).then(setNames).catch(alert);
};
// You can also use async/await notation for server calls with our server wrapper.
// (This does the same thing as .then().catch() in the above handlers.)
const submitNewSheet = async newSheetName => {
const submitNewSheet = async (newSheetName) => {
try {
const response = await serverFunctions.addSheet(newSheetName);
setNames(response);
@@ -56,7 +47,7 @@ const SheetEditor = () => {
<FormInput submitNewSheet={submitNewSheet} />
<TransitionGroup className="sheet-list">
{names.length > 0 &&
names.map(name => (
names.map((name) => (
<CSSTransition
classNames="sheetNames"
timeout={500}