投稿時間:2022-12-16 10:22:14 RSSフィード2022-12-16 10:00 分まとめ(28件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
ROBOT ロボスタ ローカル5G等で遠隔型自動運転バスを複数台運用実証 NTT東日本、ティアフォー 、KDDIが成田国際空港で https://robotstart.info/2022/12/16/self-driving-bus-local-5g.html 2022-12-16 00:00:53
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 熊本県「街の幸福度ランキング」 2位は前年6位の「熊本市東区」、1位は? https://www.itmedia.co.jp/business/articles/2212/16/news050.html 熊本市東区 2022-12-16 09:30:00
IT ITmedia 総合記事一覧 [ITmedia News] Amazon Games、「トゥームレイダー」新作をグローバル公開へ https://www.itmedia.co.jp/news/articles/2212/16/news087.html crystaldynamics 2022-12-16 09:12:00
TECH Techable(テッカブル) タッチパネルとダイヤルでマニアックなPCショートカットも簡単に!Stream Deckの新作でPC作業を効率化 https://techable.jp/archives/187404 streamdeck 2022-12-16 00:00:24
IT 情報システムリーダーのためのIT情報専門サイト IT Leaders ゼロトラストの中核としてCASB運用監視サービス市場が急成長、2021年度は51.2%増─ITR | IT Leaders https://it.impress.co.jp/articles/-/24203 ゼロトラストの中核としてCASB運用監視サービス市場が急成長、年度は増ーITRITLeadersアイ・ティ・アールITRは年月日、国内のCASBCloudAccessSecurityBroker運用監視サービス市場における規模の推移と予測を発表した。 2022-12-16 09:30:00
デザイン コリス HTMLとCSSを真剣に学びたい人におすすめ! 実務レベルの知識やテクニック、考え方がよく分かる解説書 -HTML/CSSブロックコーディング https://coliss.com/articles/book-review/isbn-9784798169040.html 続きを読む 2022-12-16 00:36:28
js JavaScriptタグが付けられた新着投稿 - Qiita TwilioのLookup APIを利用して、Stripe Elementsの決済画面に電話番号の誤入力を予防する仕組みを追加する https://qiita.com/hideokamoto/items/fca0c30e0993dac74498 電話番号 2022-12-16 09:14:08
技術ブログ Developers.IO Zendesk Supporにおけるライトエージェントについてまとめてみた https://dev.classmethod.jp/articles/subaru-zendesk221216/ zendesksuppor 2022-12-16 00:17:22
海外TECH DEV Community Automated Frontend Workflow https://dev.to/helmuthdu/automated-frontend-workflow-4665 Automated Frontend WorkflowIn a world where robots have not yet taken our place we still have to deal with repetitive tasks We are constantly trying to find the easiest and laziest way to accomplish something some people call it efficiency By letting the machine do the tedious part it could give us more time to work or spend on interesting stuff An automated frontend workflow is a set of processes and tools that are used to manage and streamline the development of a website or application This typically involves tasks such as code linting e g Prettier ESLint building testing e g Jest and deployment and is designed to make it easier for developers to work on the front end without having to worry about these details Automated frontend workflows can be created using a variety of tools such as build tools e g Webpack Vite and continuous integration platforms e g Jenkins GitHub Actions In short automation for software development means reducing complexity to something that anyone could use and understand In this article you will learn how to create add and automate common frontend tools within your workflow If you are interested in learning about some of these tools you can check my other article about Testing in JavaScript Table of ContentsProjectSetupPrettierSassTypeScriptViteVitestVitePressStorybookESLintStyleLintGitGit setupGit hooksLefthookGitHub ActionsCode AnalysisLintersTestingBranch ProtectionDocsConclusion ProjectThe goal is to build a modern monorepo project using the following stack Vue An approachable performant and versatile framework for building web user interfaces Sass CSS with superpowers TypeScript A strongly typed programming language that builds on JavaScript Vite Fast bundler to create web projectsVitest A Vite native fast unit test framework VitePress Modern SSG framework built on top of Vite Storybook Storybook is a frontend workshop for building UI components and pages in isolation Prettier An opinionated code formatter ESLint Statically analyzes your code to quickly find problems Stylelint A modern linter that helps you avoid errors and enforce conventions in your styles Most steps can be manually adjusted to your preferred JS library or framework like React Svelte or Angular You can check the final result at the following link SetupTo start let s create a new project Open the terminal create a new folder and initialize the project mkdir automated frontend workflowcd automated frontend workflownpm initAfter completion Open the newly created package json file and add the workspaces config to set it as a monorepo workspaces packages A monorepo is a single repository that contains multiple projects The main reason for it is to streamline work within a dev team that maintains multiple apps using shared pieces of code for example a User Interface library Next you have to install and configure the common tools which will be used during the development PrettierInstall Prettier npm i D prettierCreate a prettierrc file arrowParens avoid bracketSameLine true bracketSpacing true htmlWhitespaceSensitivity ignore printWidth semi true singleQuote true tabWidth trailingComma none useTabs false vueIndentScriptAndStyle false You can find more information about these options in the official documentation SassInstall Sass npm i D sass TypeScriptInstall TypeScript npm i D typescriptCreate a tsconfig json file compilerOptions target ESNext useDefineForClassFields true module ESNext moduleResolution Node strict true jsx preserve resolveJsonModule true isolatedModules true esModuleInterop true lib ESNext DOM skipLibCheck true noEmit true types vitest globals ts node compilerOptions module ESNext ViteInstall Vite npm i D vite vitejs plugin vue vue vue tscCreate a vite config ts file import defineConfig from vite import vue from vitejs plugin vue export default defineConfig plugins vue VitestInstall Vitest npm i D vitest jsdom vue test utilsCreate a vitest config ts file lt reference types vitest gt import defineConfig from vite import Vue from vitejs plugin vue export default defineConfig plugins Vue test globals true environment jsdom Update the scripts in the package json file by adding a new command scripts test vitest VitePressInstall VitePress npm i D vitepressCreate a docs vitepress config ts file export default title Automated Frontend Workflow description Frontend Tooling made Easy base The base property should reflect your git project Create a docs index md file Hello VitePress Go to Storybook Update the scripts in the package json file by adding these new commands scripts docs dev vitepress dev docs docs build vitepress build docs docs preview vitepress preview docs StorybookInstall Storybook npx sb init builder storybook builder viteOpen the storybook main js file and configure it as follows module exports stories packages stories mdx packages stories js jsx ts tsx addons storybook addon links storybook addon essentials storybook addon interactions framework storybook vue core builder storybook builder vite features storyStoreV true async viteFinal config options config base return config env config gt config STORYBOOK BASE URL process env NODE ENV production The STORYBOOK BASE URL property should reflect your git project Create a storybook manager head html file lt storybook manager head html gt lt base href STORYBOOK BASE URL target blank gt lt meta name description content Components for my awesome project key desc gt Update the package json file to output the build result to the docs public storybook folder this will be important to deploy our docs and the storybook on the same GitHub page scripts storybook start storybook p storybook build build storybook o docs public storybook ESLintInstall ESLint with Prettier TypeScript and Vue support and add a package to output the result as sarif format which will be used later for the GitHub integration npm i D eslint typescript eslint eslint plugin typescript eslint parser microsoft eslint formatter sarif eslint config prettier eslint plugin prettier eslint plugin vue vue eslint parser vue eslint config typescriptCreate a eslintrc cjs file module exports root true env browser true es true node true parser typescript eslint parser parserOptions parser typescript eslint parser ecmaVersion plugins typescript eslint prettier extends eslint recommended plugin typescript eslint recommended plugin prettier recommended plugin storybook recommended rules no console process env NODE ENV production warn off no debugger process env NODE ENV production warn off typescript eslint no unused vars off argsIgnorePattern prettier prettier error overrides files ts tsx rules The core no unused vars rules in the eslint recommeded ruleset does not work with type definitions no unused vars off files tests j t s x packages src spec j t s x env jest true files packages src vue parser vue eslint parser parserOptions extraFileExtensions vue ecmaFeatures jsx true ecmaVersion extends plugin vue vue recommended vue typescript recommended plugin prettier recommended Update the scripts in the package json file by adding these new commands scripts lint npm run lint ws lint report eslint ext jsx js ts tsx vue fix format microsoft eslint formatter sarif output file eslint results sarif packages src StylelintInstall Stylelint along with the standard configs Prettier Sass and Vue support npm i D postcss postcss html stylelint stylelint config prettier stylelint config recommended vue stylelint config standard scssCreate a stylelintrc file extending these configs It is included an optional rule to check if the CSS selector follows the BEM Name Convention extends stylelint config standard scss stylelint config recommended vue scss stylelint config prettier rules selector class pattern a z a z a z resolveNestedSelectors true GitGit is a distributed version control system for tracking changes in files and can be used for collaboratively developing source code during software development Git setupCreate a new repository in GitHub open the terminal inside the project initialize git add a commit and a remote then push the changes git initgit add README mdgit commit m feat project setup git branch M maingit remote add origin GITHUB USER REPO NAME gitgit push u origin mainReplace the GITHUB USER and the REPO NAME variables with your GitHub user and repository name Git hooksGit has a way to fire off custom scripts when certain actions occur such as commit and push There is a variety of hooks available but you can start with these commit msg Check the commit message format or spelling errors pre commit Check for errors and enforce project coding standards pre push Run tests to ensure working softwareYou can create them manually or use Lefthook to simplify the process LefthookLefthook is a fast and powerful Git hooks manager for Node js and any other type of project written in Go To install open the terminal in your project npm install D lefthookAfter installation it will generate a lefthook yml file which can be customized to perform a static code analysis before committing the code For example it can ensure that the git commit follows the git conventional commits and use Prettier ESLint and Stylelint to check format and fix any file which will be committed and run any test related with Vitest depending on the filetype and run each in parallel For html json and yml files reformat with PrettierFor css and scss files check the styles with Stylelint and Prettier after For js and ts files excluding tests run ESLint and check related tests with Vitest after For spec js and spec ts tests files run ESLint and the tests with Vitest after To start initialize the git conventional commits by running the npx git conventional commits init command and then update the lefthook yml as follows commit msg commands validate run gt npx git conventional commits commit msg hook pre commit parallel true commands lint misc glob html json yml run npx prettier write staged files lint css glob css scss run gt npx stylelint fix staged files amp amp npx prettier write staged files lint js glob spec test tj s tj sx run gt npx eslint fix staged files amp amp npx vitest related staged files passWithNoTests run environment jsdom test unit glob spec test tj s tj sx run gt npx eslint fix staged files amp amp npx vitest staged files run environment jsdomThat s it now every time you commit your code these commands will run automatically GitHub ActionsGitHub Actions is a continuous integration and continuous delivery CI CD platform that allows you to automate your build test and deployment pipeline You can create workflows that build and test every pull request to your repository or deploy merged pull requests to production The GitHub Actions workflows are located in the github workflows folder and are composed of Workflow A workflow is a configurable automated process that will run one or more jobs Events An event is a specific activity in a repository that triggers a workflow run Jobs A job is a set of steps in a workflow that executes on the same runner Each step is either a shell script that will be executed or an action that will be run Runners A runner is a server that runs your workflows when they re triggered Each runner can run a single job at a time Actions An action is a custom application for the GitHub Actions platform that performs a complex but frequently repeated task Do not worry you will understand better those processes with the examples below showing common cases Code AnalysisTo ensure code quality the code should be checked tested and reported Start by creating a new file in your GitHub repository called github workflows code analysis yml This file will define the workflow that your GitHub Action will follow In the github workflows code analysis yml file you can use the on keyword to specify when the workflow should be triggered For example you might want to trigger the workflow when a new code is pushed to the repository with the option to trigger it manually You can do this by adding the following lines to the file on push branches main set this property to enable manual trigger option in GitHub workflow dispatch You can set the concurrency property to run only one instance so if it is running while a new commit is pushed it will be canceled and restarted You can use the contexts to define a proper key github workflow context to determine the current workflow name github ref context to determine the current branch name concurrency group github workflow github ref cancel in progress trueFurthermore it is required to set some permissions to read and write content You can check all available permissions by clicking here permissions required for all workflows security events write only required for workflows in private repositories actions read contents readActions can be cached to accelerate the process For example in the Node js setup action it is possible to cache the NPM packages so it won t have to fetch everything every time the job is running name Setup Node js uses actions setup node v with node version cache npm To complete in the job section specify the steps that the GitHub Action should perform For example you might want to first check out the code from the repository generate a code analysis report and upload it to GitHub code scanning yml name Code scanning on push branches main workflow dispatch concurrency group github workflow github ref cancel in progress true jobs eslint name Eslint runs on ubuntu latest permissions required for all workflows security events write only required for workflows in private repositories actions read contents read steps name Checkout Repository uses actions checkout v name Setup Node js uses actions setup node v with node version cache npm name Install dependencies run npm ci name Run linter run npm run lint report continue on error true name Upload analysis results to GitHub uses github codeql action upload sarif v with sarif file eslint results sarif wait for processing trueAfter creating the workflow you can go to your GitHub repo and run it manually to check the results You can trigger this action by clicking in the Actions Tab gt Code scanning Workflow gt Run workflow Dropdown gt Run workflow Button To see the result go to the Security gt Code scanning section The missing part is that these checks should also run on any code which will be submitted through a PR in the project and block any change which does not follow the required rules LintersLinters in short are tools to help you improve your code It can be configured to run on every Pull Request PR to guarantee that any new code has the same standards defined Similar to the previous workflow start by creating a new file in your GitHub repository called github workflows linter yml In the on keyword set it to run on pull request on pull request Configure the concurrency to have only one workflow running at a time github workflow context to determine the current workflow name github ref context to determine the current branch name concurrency github workflow github ref Define the Runner Usually the ubuntu latest runner is a safe choice jobs eslint runs on ubuntu latestAdditionally add all steps to perform a checkout action to fetch the code do another action to setup node with the node version with the cache enabled for all npm packages install all dependencies with npm ci command and finally run the linters with npm run linter command linter ymlname Linteron pull request github workflow context to determine the current workflow name github ref context to determine the current branch nameconcurrency github workflow github ref jobs eslint name Eslint runs on ubuntu latest steps name Checkout Repository uses actions checkout v name Setup Node js uses actions setup node v with node version cache npm name Install dependencies run npm ci name Run linter run npm run lint TestingIt should run similarly to the Linters workflow but executing the npm run test command instead testing ymlname Testingon pull request github workflow context to determine the current workflow name github ref context to determine the current branch nameconcurrency github workflow github ref jobs vitest name Vitest runs on ubuntu latest steps name Checkout Repository uses actions checkout v name Setup Node js uses actions setup node v with node version cache npm name Install dependencies run npm ci name Run tests run npm run test Branch ProtectionAdding the workflows is just one step you also need to configure the branch rules Open your repository in GitHub and go to Settings gt Branches Click in the Add rule button insert the repo name your want this rule to be associated with at the beginning and make sure the workflows are set as required in the Require branches to be up to date before merging option To complete click on the Create button at the bottom of the page DocsFor the documentation we have a scenario where there is VitePress and Storybook need to publish together Before creating the workflow enable the pages in the repo settings Similar to the previous workflow start by creating a new file in your GitHub repository called github workflows docs yml In the on keyword set it to run on push to the main branch also add the option to trigger it manually with workflow dispatch on Runs on pushes targeting the default branch push branches main Allows you to run this workflow manually from the Actions tab workflow dispatch Define the Runner to the ubuntu latest jobs eslint runs on ubuntu latestAdd all actions to perform a checkout to fetch the code do another action to setup node install all dependencies with the npm ci command build storybook with the target to the public folder inside the docs so when VitePress runs the build command it will copy the storybook files together and after everything is built trigger an action to setup GitHub Pages and update generated page artifact To complete add another job grant the permissions to write and call the deployment action docs ymlname Docson Runs on pushes targeting the default branch push branches main Allows you to run this workflow manually from the Actions tab workflow dispatch jobs build name Build Specify runner deployment step runs on ubuntu latest steps name Checkout Repository uses actions checkout v name Setup Node js uses actions setup node v with node version cache npm name Install dependencies run npm ci name Build Storybook run npm run storybook build name Build VitePress run npm run docs build name Setup pages uses actions configure pages v name Upload artifact uses actions upload pages artifact v with path docs vitepress dist deploy name Deploy Add a dependency to the build job needs build Specify runner deployment step runs on ubuntu latest Grant GITHUB TOKEN the permissions required to make a Pages deployment permissions pages write to deploy to Pages id token write to verify the deployment originates from an appropriate source Deploy to the github pages environment environment name github pages url steps deployment outputs page url steps name Deploy to GitHub Pages id deployment uses actions deploy pages v ConclusionThe tooling used as part of the frontend development process ensures everything is working or is done as expected and automation is designed to make it easier for developers to work without having to worry about these details This is just the tip of the iceberg to learn more check the GitHub Actions documentation and take a look at some starter workflows 2022-12-16 00:09:34
海外科学 BBC News - Science & Environment Biodiversity: Row over funding threatens to stall talks https://www.bbc.co.uk/news/science-environment-63990487?at_medium=RSS&at_campaign=KARANGA funds 2022-12-16 00:50:31
ニュース BBC News - Home Harry and Meghan: Seven takeaways from their Netflix series https://www.bbc.co.uk/news/entertainment-arts-63989977?at_medium=RSS&at_campaign=KARANGA netflix 2022-12-16 00:04:34
ニュース BBC News - Home After the FTX chaos, is crypto down and out after a torrid 2022? https://www.bbc.co.uk/news/technology-63990215?at_medium=RSS&at_campaign=KARANGA bitcoin 2022-12-16 00:41:30
ニュース BBC News - Home When are the train strikes and what is the dispute about? https://www.bbc.co.uk/news/business-61634959?at_medium=RSS&at_campaign=KARANGA january 2022-12-16 00:02:54
ビジネス ダイヤモンド・オンライン - 新着記事 インフレ悲観論のパウエル氏、市場との溝深く - WSJ発 https://diamond.jp/articles/-/314760 悲観 2022-12-16 09:02:00
北海道 北海道新聞 ロシア、来春に大規模攻撃準備か 動員兵投入とウクライナ https://www.hokkaido-np.co.jp/article/775866/ 準備 2022-12-16 09:53:00
北海道 北海道新聞 3位決定戦へ「集中している」 クロアチア選手が会見 https://www.hokkaido-np.co.jp/article/775865/ 日本時間 2022-12-16 09:53:00
北海道 北海道新聞 決勝へ、アルゼンチンが練習再開 サッカーW杯 https://www.hokkaido-np.co.jp/article/775864/ 日本時間 2022-12-16 09:53:00
北海道 北海道新聞 知床遊覧船社長、23年春にも立件 業過致死容疑で1管本部 沈没事故 https://www.hokkaido-np.co.jp/article/775797/ 沈没事故 2022-12-16 09:46:36
北海道 北海道新聞 東証、367円安 午前9時15分現在 https://www.hokkaido-np.co.jp/article/775862/ 日経平均株価 2022-12-16 09:45:00
北海道 北海道新聞 道議会のハワイ派遣、引退議員が半数 2会派と議長は辞退 https://www.hokkaido-np.co.jp/article/775739/ 道議会 2022-12-16 09:41:39
北海道 北海道新聞 <混迷 ゼロコロナ>中 封じ込め 脆弱な医療、募る不安 https://www.hokkaido-np.co.jp/article/775857/ 中国政府 2022-12-16 09:30:00
北海道 北海道新聞 <聞く語る>南直哉さん 宗教の意味を問い続ける禅僧 https://www.hokkaido-np.co.jp/article/775855/ 超越 2022-12-16 09:30:00
北海道 北海道新聞 吉田正「一員となり光栄」 レッドソックスが獲得発表 https://www.hokkaido-np.co.jp/article/775813/ 大リーグ 2022-12-16 09:10:52
北海道 北海道新聞 ウクライナ兵の訓練拡大 米国防総省 https://www.hokkaido-np.co.jp/article/775854/ 記者会見 2022-12-16 09:25:00
北海道 北海道新聞 生態系保全に「野心的な目標を」 COP15、西村環境相が演説 https://www.hokkaido-np.co.jp/article/775848/ 開催 2022-12-16 09:03:00
ビジネス 東洋経済オンライン 大人の学び「三日坊主の人、続く人」決定的な4大差 「テーマの選択」「情報収集」…あなたは大丈夫? | リーダーシップ・教養・資格・スキル | 東洋経済オンライン https://toyokeizai.net/articles/-/637942?utm_source=rss&utm_medium=http&utm_campaign=link_back 三日坊主 2022-12-16 10:00:00
マーケティング MarkeZine インターブランド「ブランド価値評価」の仕組み――強いブランドが有する10の要素とは? http://markezine.jp/article/detail/40585 誌面非掲載の本記事では、インターブランドの独自手法である「ブランド価値評価」の仕組みを簡易的に解説する。 2022-12-16 09:30:00
マーケティング MarkeZine ノバセルが「ノバセルアナリティクス for Apps」を開始 アプリ事業者のテレビCM効果を可視化 http://markezine.jp/article/detail/40844 forapps 2022-12-16 09:30:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

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

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