投稿時間:2021-10-09 17:18:49 RSSフィード2021-10-09 17:00 分まとめ(25件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
TECH Engadget Japanese ファーウェイの34インチ曲面ゲーミングディスプレーが5000円オフ! Amazonでクーポン配布中 https://japanese.engadget.com/sale-huawei-gaming-display-073742946.html amazon 2021-10-09 07:37:42
python Pythonタグが付けられた新着投稿 - Qiita 機械学習の可視化を簡単に美しく https://qiita.com/hima2b4/items/bf0fa0a405898dcacfb8 決定木の深さと評価尺度の関係特徴量重要度といった具合にいろいろありますが、これらを確認できるようにするにはそれぞれコードを組み立てないといけないので、なかなか大変だな・・・と思っていた矢先に「Yellowbrick」という機械学習のパフォーマンスを可視化するライブラリがあることを知り、適用してみました。 2021-10-09 16:53:26
python Pythonタグが付けられた新着投稿 - Qiita RaspberryPiの死活監視システムを Azure IoT Central で構築した https://qiita.com/AkitoArai709/items/0aad2956f4cdad989869 やりたいことリソース情報をダッシュボードに表示CPU・メモリ使用率等のリソース増加の通知デバイスのシステムダウン通信不可の通知環境RaspberryPiModelBPythonazureiotdeviceltpipパッケージgtsysstatltdebパッケージgtインストールpipinstallazureiotdevicesudoaptinstallsysstatシステム構成ラズパイからCPU・メモリ等のデバイスリソース情報をAzureIoTCentralに送信して、ダッシュボードにリアルタイムでリソース情報を表示します。 2021-10-09 16:34:59
python Pythonタグが付けられた新着投稿 - Qiita Pillow(PIL)で生成するgifの画質を上げる https://qiita.com/Mechanetai/items/4ec988a463fe649a52f9 写真の場合では、いらすとやのようなシンプルなイラストではなく、写真でも試してみましょう。 2021-10-09 16:31:57
js JavaScriptタグが付けられた新着投稿 - Qiita なんちゃら Observer 学習 https://qiita.com/tnakai-r2/items/a91d1c0373efa451e891 practiceindexhtmlstylecssobserverjsCodepenではrootMarginが上手く機能しなかったので、ローカルのほうが良さそうです。 2021-10-09 16:54:00
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) atom パッケージを入れられなくなった https://teratail.com/questions/363599?rss=all 2021-10-09 16:57:02
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) python googleの自動ログインについて https://teratail.com/questions/363598?rss=all pythongoogleの自動ログインについて前提・実現したいことgoogleのログイン画面のメールアドレスを入力する欄にメールアドレスを入力したいです。 2021-10-09 16:54:57
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) インポートしたAssetのDemo Sceneをそのまま使うべきか? https://teratail.com/questions/363597?rss=all インポートしたAssetのDemoSceneをそのまま使うべきかこんにちわ今、Dゲーム開発をしています。 2021-10-09 16:47:29
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【rails】フォロー機能を実装したい https://teratail.com/questions/363596?rss=all 【rails】フォロー機能を実装したい前提・実現したいことRailsでフォロー機能を作っています。 2021-10-09 16:15:49
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Mac M1 poetryでmlagentsライブラリのインストールができない https://teratail.com/questions/363595?rss=all MacMpoetryでmlagentsライブラリのインストールができない環境poetrynbsppythonnbspnbspnbspnbsp問題仮想環境へのmlagentsライブラリのインストールが失敗しました。 2021-10-09 16:13:34
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 縦横スクロールでimageのサイズを変えるには? https://teratail.com/questions/363594?rss=all 2021-10-09 16:11:41
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) python データから正弦波の和に近似できるか https://teratail.com/questions/363593?rss=all matlab 2021-10-09 16:00:54
AWS AWSタグが付けられた新着投稿 - Qiita Amplify×Nuxt.jsで外部APIにPOSTしようとしたらハマった話 https://qiita.com/takashi-5/items/d5af6e85f12f345bf8a1 Amplify×Nuxtjsで外部APIにPOSTしようとしたらハマった話背景NuxtjsをAmplifyCLIでデプロイして外部オリジンのAPIをPOSTしようとしていた。 2021-10-09 16:12:50
AWS AWSタグが付けられた新着投稿 - Qiita AWS CloudFormation (Infrastructure as Code) https://qiita.com/haruki_uejima/items/44f2304fa5088efcffe9 AWSCloudFormationInfrastructureasCode【AWSCloudFormationInfrastructureasCode】今回のSprintでCloudFormationをきっちり理解するCloudFormationとは。 2021-10-09 16:06:24
Azure Azureタグが付けられた新着投稿 - Qiita RaspberryPiの死活監視システムを Azure IoT Central で構築した https://qiita.com/AkitoArai709/items/0aad2956f4cdad989869 やりたいことリソース情報をダッシュボードに表示CPU・メモリ使用率等のリソース増加の通知デバイスのシステムダウン通信不可の通知環境RaspberryPiModelBPythonazureiotdeviceltpipパッケージgtsysstatltdebパッケージgtインストールpipinstallazureiotdevicesudoaptinstallsysstatシステム構成ラズパイからCPU・メモリ等のデバイスリソース情報をAzureIoTCentralに送信して、ダッシュボードにリアルタイムでリソース情報を表示します。 2021-10-09 16:34:59
Ruby Railsタグが付けられた新着投稿 - Qiita Rails 下書き機能の実装で使うenum,draft ,status,publishedについて https://qiita.com/Hashimoto-Noriaki/items/be3cfe2261493df60832 ︎参考資料下書き記事と公開記事を作成下書き記事と公開記事を作成を作成するには、modelのarticlerbなどにenumstatusdraftpublishedを使います。 2021-10-09 16:22:24
海外TECH DEV Community Is Microservices a good choice ? https://dev.to/benjioe/is-microservices-a-good-choice-ge7 Is Microservices a good choice ContextI work on a big year old application k blocs of code with some really bad choices No unit testsan Anemic architecture But in a great company A QA teams who test regressionsA small team dev only Times to make clean codeA project of rewriting the application with new technologiesAs you imagine the QA teams are a big bottleneck and everything that s can reduce test regression is good The rewritingWith rewriting the CTO wants unit tests A Microservices architecture with One service by feature with duplications between servicesA single databaseA single repository but one makefile by service What s I thinksI agree that s Microservice can avoid regression but I think s it s too complicated I don t want to have to manage database conflicts or update services each time I change the database My guess is with Unit testsOpen CLose principleDDDAnd maybe SOA service by bound context We can almost avoid regressions and it will be a better start if we really need microservices What do you think 2021-10-09 07:41:00
海外TECH DEV Community 7 Amazing Tips While Redesigning Your Website https://dev.to/gw78ah/7-amazing-tips-while-redesigning-your-website-255g Amazing Tips While Redesigning Your WebsiteRedesigning a website may be a stressful time consuming and complex task It s natural if the amount of information you need to know in order to build a new fresh design repulses you However if you take the time to educate yourself and gain hands on experience you can avoid making mistakes and achieve your goals Here are seven golden pointers for redesigning your website to get you started When you consider rebuilding your website you most likely imagine something huge and powerful It s the ideal opportunity to give your website a bold and dramatic new appearance However the world is not what you might assume  READ More Amazing Tips While Redesigning Your Website 2021-10-09 07:39:14
海外TECH DEV Community Ethical Hacking Roadmap - A Beginners Tutorial https://dev.to/gw78ah/ethical-hacking-roadmap-a-beginners-tutorial-33m2 Ethical Hacking Roadmap A Beginners TutorialWho is an Ethical Hacker An ethical hacker is a computer network specialist who deals with the security posture of an organization His job involves eliciting security flaws in the organization he is working for by testing all aspects of the system and its services for any sort of vulnerabilities The key point to notice is that all this is done with the permission of the owners of the organization and without any malicious intent An ethical hacker is also known as a white hat hacker and is the stark opposite of a black hat hacker a k a crackers who hack with the sole purpose of bringing about some sort of disruption or chaos from the vulnerabilities they find  Read More Ethical Hacking Roadmap A Beginners Guide 2021-10-09 07:26:31
海外TECH DEV Community Must-see + collection, build a vite-react-cil enterprise scaffolding from scratch https://dev.to/lgf196/must-see-collection-build-a-vite-react-cil-enterprise-scaffolding-from-scratch-2bpd Must see collection build a vite react cil enterprise scaffolding from scratch Project Address Case Actual CombatProject addressvite react cil Case actual combat ant simple pro is a middle office solution that supports vue react angular big frameworks Version has all been refactored with vite JoL player is a powerful react player developed by typescript and bate version is refactored with vite Basic preparation Create a new folder config public src Generate package json and execute the following command npm init Added index html tsconfig json vite config ts gitignore filesThe project infrastructure is as follows ├ーconfig Project scaffolding configuration file├ーpublic static file├ーsrc source code├ーindex html root├ー gitignore git ignores files├ーvite config ts Project global vite configuration file├ーtsconfig json Project global ts configuration file└ーpackage json package json Start Installation must depend onDevelopment npm install vite typescript vitejs plugin react refresh DProduction npm install react react dom S Write configurationCreate a new main tsx App tsx app css under the src folder Write the following code in the src App tsx fileimport React FC useEffect from react import app css const App FC gt useEffect gt console log vite react cil return lt div gt lt h gt Welcome to vite react cil lt h gt lt div gt export default App Write the following code in the src app css file padding margin App width px Write the following code in the src main tsx fileimport React from react import ReactDOM from react dom import App from App ReactDOM render lt React StrictMode gt lt App gt lt React StrictMode gt document getElementById root Write the following code in the tsconfig json file compilerOptions baseUrl paths src types vite client target ESNext useDefineForClassFields true lib DOM DOM Iterable ESNext allowJs false skipLibCheck false esModuleInterop true allowSyntheticDefaultImports true strict true forceConsistentCasingInFileNames true module ESNext moduleResolution Node resolveJsonModule true isolatedModules true noEmit true jsx react include src exclude node modules Create a new plugins folder in the config folder This file is specifically used to process the vite third party plug ins and then create a new index ts file in the config plugins folder and in Write the following code in the index ts file import Plugin from vite import reactRefresh from vitejs plugin react refresh export default function createVitePlugins const vitePlugins Plugin Plugin reactRefresh return vitePlugins Write the following code in the vite config ts fileimport defineConfig from vite import createVitePlugins from config plugins export default defineConfig configEnv gt return plugins createVitePlugins Store a favicon ico image file in the public folder Write the following code in the index html file lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset UTF gt lt link rel icon type image svg xml href favicon ico gt lt meta name viewport content width device width initial scale gt lt title gt vite react cil lt title gt lt head gt lt body gt lt div id root gt lt div gt lt script type module src src main tsx gt lt script gt lt body gt lt html gt Write the following configuration in the gitignore filenode modules DS Storedistcoveragedist ssr local Add the following code to the package json file scripts dev vite Run the projectWe can run the project with the following command npm run devThe above picture shows that the project started successfully So far a simple version of the scaffolding has been completed Extension css module less scssvite supports module by default just add a module to the file name such as xx module css it becomes a module more create react app For scss less support installation dependencies are as follows npm install less sass DThe module mode of css less is the same as css such as xx module scss xx module lessAdd the global less scss variable as follows Add the assets folder under the src folder add the scss folder add the varible scss file in the scss folder and add it in the src assets Write the following code in scss varible scss bg fff mixin flexContainer jc display flex flex direction row flex wrap wrap justify content jc mixin style size color bold normal font size size color color font weight bold Under the config folder add the style folder and add the index ts under the style folder write the following code in the config style index ts import CSSOptions from vite const cssOption CSSOptions preprocessorOptions less javascriptEnabled true scss additionalData import src assets scss varible scss export default cssOption Note If you quote the format of import in additionalData you must add at the end otherwise an error will be reported Find the vite config ts file and add the following code import defineConfig from vite import createVitePlugins from config plugins import cssOption from config style export default defineConfig configEnv gt return plugins createVitePlugins css cssOption Replace app css in src app css with app module scss such as app css gt app module scss Change the code in the src App tsx file import React FC useEffect from react import app css import styles from app module scss const App FC gt useEffect gt console log vite react cil return lt div className styles App gt lt h gt Welcome to vite react cil lt h gt lt div gt Environment variablesIn vue cil create react app set environment variables you can set custom environment variables through cross env env file and use process env get custom environment variables but there is a difference in vite Set environment variables in vite Add four files env env alpha env preprod env prod and change the directory at the same level of src Write the following code in the env file NODE ENV developmentVITE APP ANT devWrite the following code in the env alpha file NODE ENV productionVITE APP ANT alphaWrite the following code in the env preprod file NODE ENV productionVITE APP ANT preprodWrite the following code in the env prod file NODE ENV productionVITE APP ANT prodThey represent the four environment variables of development test pre release and production respectively If you want to expand other variables and so on Note Customized environment variables must be variables prefixed with VITE to be exposed to vite such as VITE APP SOME Find the package json file and add the following code scripts dev vite dev vite mode dev build alpha vite build mode alpha build preprod vite build mode preprod build prod vite build mode prod Hint The reason for adding mode to the command in package json is to override the default mode production development used by the command Declare custom environment variables in the typescript environment In the src folder create a new vite env d ts file and write the following code in the src vite env d ts file lt reference types vite client gt interface ImportMetaEnv VITE APP ANT dev alpha preprod prod Get environment variables in viteGet environment variables in vite through import meta env not process env if you want to get it in the code every time through import meta env write It is really cumbersome it is better to encapsulate a method In the src folder create a new utils folder and create a new index ts in the utils folder Write the following code in src utils index ts export const environmentVariable gt const env import meta env VITE APP ANT let parps null switch env case dev parps dev break case alpha parps alpha break case preprod parps preprod break case prod parps prod break default parps dev break return parps In this way no matter where we want to use environment variables we only need to call the environmentVariable method base server configuration Create a new index ts in the config folder and write the following code in config index ts description Development port export const VITE APP PORT description public base path export const VITE APP BASE description Whether to automatically open the application in the browser export const VITE APP OPEN true Note All files in config cannot be passed import meta env to get environment variables will report an error If you want to use environment variables in the config file you can only pass in via vite config ts Pass in to the config file through configEnv then the config file must be written in the form of a function Create a new setupProxy ts file in the config folder to use as a custom proxy Write the following code in config setupProxy ts import ProxyOptions from vite const proxy Record lt string string ProxyOptions gt String shorthand foo http localhost Option writing api target changeOrigin true rewrite path gt path replace api For more please see server proxy export default proxy Find the vite config ts file and add the following code import defineConfig from vite import createVitePlugins from config plugins import cssOption from config style import VITE APP BASE VITE APP PORT VITE APP OPEN from config import proxy from config setupProxy export default defineConfig configEnv gt return base VITE APP BASE plugins createVitePlugins css cssOption server host true port VITE APP PORT open VITE APP OPEN proxy Alias configurationFind the vite config ts file and add the following code Install path first npm install path D omitted import path from path export default defineConfig configEnv gt return omitted resolve alias path resolve dirname src build configuration Find the config index ts file and add the following code Omitted description Whether to open the packaged analysis visualization diagram in the packaging environment export const VITE APP VISUALIZER false description is in the packaging environment remove console log export const VITE APP CONSOLE true description delete debugger in packaging environment export const VITE APP DEBUGGER true description Whether to generate a source map file in the packaging environment export const VITE APP SOURCEMAP false In the config plugins folder create a new visualizer ts fileInstall rollup plugin visualizer npm install rollup plugin visualizer DIn the config plugins visualizer ts file write the following code import visualizer from rollup plugin visualizer export default function configVisualizerConfig return visualizer Write the packaged dependency analysis visualization page to node modules so that it does not occupy a position filename node modules cache visualizer stats html open true gzipSize true brotliSize true Find the config plugins index ts file and add the following code import Plugin from vite import reactRefresh from vitejs plugin react refresh import VITE APP VISUALIZER from index import configVisualizerConfig from visualizer export default function createVitePlugins const vitePlugins Plugin Plugin reactRefresh VITE APP VISUALIZER amp amp vitePlugins push configVisualizerConfig return vitePlugins In the config folder create a new build ts file and write the following code import BuildOptions from vite import VITE APP CONSOLE VITE APP DEBUGGER VITE APP SOURCEMAP from config const build BuildOptions terserOptions compress keep infinity true drop console VITE APP CONSOLE drop debugger VITE APP DEBUGGER outDir dist Specify the output path directory assetsDir assets Specify the storage path directory for packaging and generating static resources sourcemap VITE APP SOURCEMAP Whether to generate a source map file after construction export default build Find the vite config ts file and add the following code omitted import build from config build export default defineConfig configEnv gt return omitted build Advanced eslint Install the following dependencies first npm install typescript eslint eslint plugin eslint eslint plugin import eslint plugin jsx ay eslint plugin prettier typescript eslint parser eslint config prettier eslint plugin react eslint plugin react hooks eslint plugin simple import sort DHint As above these dependencies are installed according to their own circumstances I have installed them all here including typescript eslint eslint plugin eslint plugin react and eslint plugin react hooks Relative to the others each dependency is more important and it is recommended to install it Create a new eslintrc js eslintignore two files and change the src to the same level directory Write the following code in the eslintrc js file module exports root true parser typescript eslint parser parserOptions ecmaVersion sourceType module ecmaFeatures jsx true settings react version detect env browser true amd true node true extends eslint recommended plugin react recommended plugin react hooks recommended plugin jsx ay recommended plugin prettier recommended plugins simple import sort prettier rules prettier prettier error usePrettierrc true react react in jsx scope off jsx ay accessible emoji off react prop types off typescript eslint explicit function return type off simple import sort imports off simple import sort exports error jsx ay anchor is valid error components Link specialLink hrefLeft hrefRight aspects invalidHref preferButton no debugger eqeqeq default case no empty function no multi spaces spaced comment error always no multiple empty lines error max Hint The above eslint configuration you don t need to change like mine you can make the corresponding eslint configuration according to your own actual situation please refer to eslint official website Write the following code in the eslintignore file node modules DS Storedistcoveragesrc tests tests dist ssr localnode modules Find the package json file and add the following code omitted lint eslint src ext jsx js ts tsx lint fix eslint src ext jsx js ts tsx fix The npm run lint command can detect all irregular codes in the src file The npm run lint fix command can automatically fix all irregular codes in the src file now we can indeed check the code specifications but there is a problem these detected codes must require me to type commands and they are not auto detected in development mode This behavior is very unfriendly like us in webpack Can use eslint loader to automatically detect in development mode so does vite also have plug ins similar to eslint loader Of course there is Install the following dependencies npm install vite plugin checker D Find the config index ts file and add the following code description Whether to start eslint in development mode export const VITE APP ESLINT true Find the config plugins folder create a new eslint ts file and write the following code in the config plugins eslint ts file import checker from vite plugin checker export default function configEslint return checker typescript true eslint files src extensions ts tsx jsx Hint I do not recommend you to use the vite plugin eslint plug in This plug in will prevent hot updates when it detects errors Find the config plugins index ts file and add the following code import Plugin from vite import reactRefresh from vitejs plugin react refresh import VITE APP VISUALIZER VITE APP ESLINT from index import configVisualizerConfig from visualizer import configEslint from eslint export default function createVitePlugins const vitePlugins Plugin Plugin reactRefresh VITE APP VISUALIZER amp amp vitePlugins push configVisualizerConfig VITE APP ESLINT amp amp vitePlugins push configEslint return vitePlugins At this point we have configured a configuration for automatic detection in a development environment jest Install the following dependencies npm install testing library jest dom types jest jest ts jest identity obj proxy D Add the file jest config js the same level as src and write the following code module exports preset ts jest roots lt rootDir gt src moduleDirectories node modules src transform tsx ts jest ts ts jest testRegex tests test spec jsx tsx moduleFileExtensions ts tsx js jsx json node collectCoverage true collectCoverageFrom lt rootDir gt src ts tsx js jsx coverageDirectory lt rootDir gt coverage verbose true testTimeout testEnvironment jsdom coveragePathIgnorePatterns lt rootDir gt node modules d ts moduleNameMapper module css styl less sass scss png jpg ttf woff woff svg identity obj proxy Hint The configuration of jest is different for each company so it may not follow my configuration For the configuration of jest please refer to jest official website Under the src folder add the tests folder and add the App test tsx file in the tests folder and write the following code import React from react import render cleanup getByTestId from testing library react import testing library jest dom import App from App afterEach cleanup describe lt App gt gt it renders without errors gt const container render lt App gt The a tag contains data testid aNoDisabled check expect getByTestId container aNoDisabled not toBeDisabled Hint Everyone s test style is different You can test with your own test style You can write different test according to component module method etc I will introduce a simple one here of Find the package json file and add the following code omitted test jest colors passWithNoTests test watch jest watchAll Hint If you think your own configuration of jest is more complicated you can recommend you to use vite plugin test svg import by nameIf we want to import multiple svg files the usual approach is to import xx from xx svg write multiple import or import multiple require array lists in js And other methods are to obtain all the svg in the folder directly through operation and then traverse Most of these schemes are too cumbersome In webpack we can use the plug in svg sprite loader to reduce our operations Write the name of svg directly to import it directly which is very convenient It can also be done in vite through the vite plugin svg icons plug in the specific implementation is as follows Installation dependencies npm install vite plugin svg icons D Under the src folder create a new icons folder and in the icons folder add a logon svg file Under the plugins folder create a new svgIcons ts file and write the following code import viteSvgIcons from vite plugin svg icons import path from path export default function configSvgIcons return viteSvgIcons iconDirs path resolve process cwd src icons symbolId icon dir name In config plugins index ts add the following code import configSvgIcons from svgIcons import Plugin from vite import reactRefresh from vitejs plugin react refresh export default function createVitePlugins const vitePlugins Plugin Plugin reactRefresh configSvgIcons Omitted return vitePlugins Under the src folder create a new components folder create a new folder svgIcon folder in the components folder and finally create a new index tsx under thesrc components svgIconfolder and write the following code import React memo useMemo from react export type svgProps iconClass string fill string fontSize string className string style React CSSProperties onClick React MouseEventHandler lt SVGSVGElement gt const SvgIcon React FC lt svgProps gt memo function SvgIcon iconClass fill fontSize px className onClick style const iconName useMemo gt icon iconClass iconClass return lt svg fontSize fontSize style svgStyle fontSize style aria hidden true className className onClick onClick gt lt use xlinkHref iconName fill fill gt lt svg gt const svgStyle width em height em verticalAlign em overflow hidden fill currentColor fontSize em export default SvgIcon In the src main tsx file add the following code import virtual svg icons register omitted To use add the following code in the src App tsx file Omitted import SvgComponent from components svgIcon const App FC gt return lt div className styles App gt lt h gt Welcome to vite react cil lt h gt lt SvgComponent iconClass logon fontSize px gt lt div gt export default App Third party ui components imported on demandIn the project ui components such as antd and element may be used We generally introduce them on demand not all of them This will cause the package to be very large when packaging The specific operations of vite are as follows Installation dependencies npm install vite plugin style import D npm install antd S In the config plugins folder create a new styleImport ts file and write the following code import styleImport from vite plugin style import export default function configStyleImport return styleImport libs libraryName antd esModule true resolveStyle name gt return antd es name style index In config plugins index ts add the following code import configStyleImport from styleImport import Plugin from vite import reactRefresh from vitejs plugin react refresh export default function createVitePlugins const vitePlugins Plugin Plugin reactRefresh Omitted configStyleImport Omitted return vitePlugins prettierrc format codeInstall the following dependencies npm install prettier DThe vscode editor installs the Prettier Code formatter plug in for use together Add the two files prettierignore and prettierrc and change the directory at the same level as src prettierrc write the following code singleQuote true trailingComma all prettier tabWidth editor defaultFormatter esbenp prettier vscode typescript editor defaultFormatter esbenp prettier vscode javascript editor defaultFormatter esbenp prettier vscode css editor defaultFormatter esbenp prettier vscode scss editor defaultFormatter esbenp prettier vscode overrides files prettierrc options parser json Hint The configuration file of prettierrc can also be a js file For the specific configuration and usage of prettierrc please refer to Official Website prettierignore write the following code md svg ejs htmlpackage json Add the following code in package json scripts format prettier loglevel warn write js jsx ts tsx css md json Enter npm run format to format the code mockI use less mock here I basically write the serve interface by myself I recommend you to use the vite plugin mock plug in For configuration the plug in configuration I introduced earlier is similar Create a new configMock ts in config plugins and create a new mock folder to store the simulated asynchronous interface The mock folder is moreThe src directory is at the same level editorconfigThe team code style is configured uniformly It is recommended that you use editorconfig Install the plug in EditorConfig for VS Code for the vscode editor Of course other editors are also possible but the corresponding editorconfig plug in needs to be downloaded I will use vscode as the main one here Create a new editorconfig file the same level directory as src and write the following code js jsx ts tsx vue charset utf indent style spaceindent size end of line lftrim trailing whitespace trueinsert final newline truemax line length Hint The code style configuration of each team is inconsistent this needs to be configured according to the actual situation of their own team DeploymentThe deployment of each company is different Some use jenkins gh pages docker etc so for the deployment you can read other articles I will not elaborate here SummarizeAfter the previous step by step construction the overall structure of the final project is as follows ├ーconfig│├ーplugins│├ーstyle│├ーbuild ts│├ーindex ts│├ーsetupProxy ts├ーpublic├ーmock├ーsrc│├ー tests │├ーassets│├ーcomponents│├ーicons│├ーutils│├ーapp module scss│├ーApp tsx│├ーmain tsx│├ーvite env d ts├ー editorconfig├ー env├ー env alpha├ー env preprod├ー env prod├ー eslintignore├ー eslintrc js├ー gitignore├ー prettierignore├ー prettierrc├ーjest config js├ーindex html├ーtsconfig json├ーvite config ts└ーpackage json in conclusion Although vite is a newcomer its shortcomings are also obvious The ecology has not yet been fully popularized It is still the master of webpack and has advantages in construction vite is indeed better than webpack in terms of performance and because of vite many people now know rollup no matter what vite is worth learning and understanding We can t blindly follow the wind and see that other companies use vite and we also want to restructure the company s projects into vite which is more realistic Project Address Case Actual CombatProject addressvite react cil Case actual combat ant simple pro is a middle office solution that supports vue react angular big frameworks Version has all been refactored with vite JoL player is a powerful react player developed by typescript and bate version is refactored with vite 2021-10-09 07:12:44
ニュース BBC News - Home Gas prices: MPs pressure government on industry fuel costs https://www.bbc.co.uk/news/business-58852612?at_medium=RSS&at_campaign=KARANGA costs 2021-10-09 07:50:38
ニュース BBC News - Home Emma Raducanu: US Open champion beaten in first match since Grand Slam win https://www.bbc.co.uk/sport/tennis/58852217?at_medium=RSS&at_campaign=KARANGA triumph 2021-10-09 07:30:08
北海道 北海道新聞 ソフトバンク長谷川が引退会見 「悔いなくユニホームを脱ぐ」 https://www.hokkaido-np.co.jp/article/598270/ 今季限り 2021-10-09 16:02:00
IT 週刊アスキー 激辛入りの「遊べる」ピザがドミノから! ピザルーレットはいかが? https://weekly.ascii.jp/elem/000/004/071/4071394/ 期間限定 2021-10-09 16:30:00
海外TECH reddit 今日のお散歩 https://www.reddit.com/r/lowlevelaware/comments/q4gbop/今日のお散歩/ wlevelawarelinkcomments 2021-10-09 07:21:46

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)