1seok2

add: make update html function

module.exports = {
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
},
"ignorePatterns": ["dist/", "node_modules/"],
};
\ No newline at end of file
{
"extends": "./node_modules/gts/"
}
module.exports = {
...require('gts/.prettierrc.json')
}
singleQuote: true,
semi: true,
useTabs: false,
tabWidth: 2,
trailingComma: 'all',
printWidth: 60,
arrowParens: 'always',
orderedImports: true,
bracketSpacing: true,
jsxBracketSameLine: false,
arrowParens: 'avoid',
};
\ No newline at end of file
......
......@@ -23,10 +23,12 @@
"@types/node": "^14.11.2",
"clean-webpack-plugin": "^3.0.0",
"css-loader": "^5.1.1",
"eslint": "^7.23.0",
"file-loader": "^6.2.0",
"gts": "^3.1.0",
"html-webpack-plugin": "^5.3.0",
"node-sass": "^5.0.0",
"prettier": "2.2.1",
"sass-loader": "^11.0.1",
"style-loader": "^2.0.0",
"ts-loader": "^8.0.17",
......@@ -34,5 +36,8 @@
"webpack": "^5.24.3",
"webpack-cli": "^4.5.0",
"webpack-dev-server": "^3.11.2"
},
"prettier": {
"tabWidth": 2
}
}
......
......@@ -15,7 +15,6 @@ import './assets/style/App.scss';
const App = (pathname : string) : string => {
/* id 없을 시 id 입력으로 redirect */
if(!getState().insta_id) pathname = '';
history.pushState('','', pathname);
return `
......
export const updateHtml = (
type : string = 'literal',
tag : string | HTMLElement = '<div></div>',
target : string = 'app'
) => {
const $target : null | HTMLElement = document.querySelector(target);
$target && ($target.innerHTML = `${tag}`)
}
\ No newline at end of file