並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 24 件 / 24件

新着順 人気順

requireの検索結果1 - 24 件 / 24件

タグ検索の該当結果が少ないため、タイトル検索結果を表示しています。

requireに関するエントリは24件あります。 Rubynode.jstechfeed などが関連タグです。 人気エントリには 『require(ESM)とECMAScript仕様』などがあります。
  • require(ESM)とECMAScript仕様

    Meguro.es #27 @ oRo

      require(ESM)とECMAScript仕様
    • Node.js コアモジュールの import/require には `node` schemeがつけられる - from scratch

      Node.js アドベントカレンダーの 3 日目の記事です。空きを埋める形で始めました。 qiita.com www.codegrid.net CodeGrid でも書かせていただきましたが、 Node.js で ES Module / CommonJS を使ってコアライブラリのロードをする際、 node から始まる scheme を付けることが可能になっています。 nodejs.org // ESM import fs from "node:fs/promises"; // CJS const http = require("node:http"); これにはいくつかのメリットがあります。基本的につけておくことが望ましいです。 今回はメリットをいくつか紹介します。まだこれがデファクト・スタンダードになっている訳ではありませんが、これから付けてもらうように推奨していきたいと思います。 メリ

        Node.js コアモジュールの import/require には `node` schemeがつけられる - from scratch
      • Node.js の --require/--import オプションについて - mizdra's blog

        Node.js には --require=module と --import=module というオプションがあります。このオプションを使うと、エントリポイントとなるプログラムよりも前に、任意のモジュールを実行できます。 例えば以下のようなコマンドを実行すると、Node.js ランタイムはまず最初に preload.cjs を実行し、それから main.mjs を実行できます。 node --require ./preload.cjs main.mjs エントリポイントよりも前に、何かしらの処理を実行したい時に使うことを想定しています。 --require と --import の違い --import も --require と同じように、モジュールをプリロードするためのオプションです。両者の違いはプリロードするモジュールの読み込み方です。 --require は require(...

          Node.js の --require/--import オプションについて - mizdra's blog
        • require(esm) in Node.js

          Recently I landed experimental support for require()-ing synchronous ES modules in Node.js, a feature that has been long overdue. In the pull request, I commented with my understanding about why it did not happen sooner before this pull request in 2024. This post expands on that comment a bit more. The opinions in this post are my own and reflect my perception of the ESM development in Node.js as

          • Zeitwerkとrequire_dependency - Money Forward Developers Blog

            こんにちは、ぽっけです。マネーフォワード クラウド会計Plusでエンジニアをしています。 Rails 6.0から、新しいAutoloaderとしてZeitwerkが導入されました。Rails 7.0からは旧来のAutoloader (Classicと呼びます)は使えなくなり、Zeitwerkが必須となりました。 Railsでソースコードを読み込むメソッドにrequire_dependencyがあります。require_dependencyは、Zeitwerkでは使う必要がなくなりました。 この記事では、require_dependencyがなぜZeitwerkで必要ないのかを深堀りしようと思います。 require_dependencyとは そもそもrequire_dependencyとは何でしょうか? このメソッドは、Rubyデフォルトのrequireやloadの代わりにRailsが提供

              Zeitwerkとrequire_dependency - Money Forward Developers Blog
            • ブラウザに広くサポートされていない CSS を検証する require-baseline ESLint ルール

              Baseline はブラウザで利用可能な JavaScript や CSS のサポート状況を明確化するプロジェクトです。ESLint/CSS の require-baseline ルールを使用することで、Baseline でサポートされていない CSS プロパティや値を検出することができます。 ブラウザによる CSS のサポート状況の差異は、Web 開発者にとって頭痛の種です。新しい CSS プロパティや値を使用する際には、それがどのブラウザでサポートされているかを確認する必要があります。Baseline はそのような問題を解決するためのプロジェクトです。ブラウザで利用可能な JavaScript や CSS のブラウザのサポート状況を明確化することで、Web 開発者が安心して新しい機能を使用できるようになります。 Baseline で「Newly Available」とされている機能は

                ブラウザに広くサポートされていない CSS を検証する require-baseline ESLint ルール
              • import、export、require | TypeScript入門『サバイバルTypeScript』

                実務でアプリケーションを作る場合、複数のJavaScriptファイルを組み合わせて、ひとつのアプリケーションを成すことが多いです。いわゆるモジュール指向の開発です。ここではJavaScriptとTypeScriptでのモジュールと、モジュール同士を組み合わせるためのimport、export、requireについて説明します。 スクリプトとモジュール​JavaScriptのファイルは大きく分けて、スクリプトとモジュールに分類されます。スクリプトは普通のJavaScriptファイルです。

                  import、export、require | TypeScript入門『サバイバルTypeScript』
                • Vite だと require() が使えないよ〜

                  皆様はすでにプロジェクトに Vite は導入されていらっしゃいますでしょうか?私はできていません。 Vite はフロントエンドのビルディングツールであり、従来の Webpack 等と比較して高速に動作するといった特徴があります。Vue.js を開発した Evan You 氏によって開発ツールではありますが Vue.js に限らず React や Svelte にも対応しています。 皆様はすでにプロジェクトに Vite は導入されていらっしゃいますでしょうか?私はできていません。 Vite はフロントエンドのビルディングツールであり、従来の Webpack などと比較して高速に動作するといった特徴があります。Vue.js を開発した Evan You 氏によって開発ツールではありますが Vue.js に限らず React や Svelte にも対応しています。 Vue.js は 3.x しか

                    Vite だと require() が使えないよ〜
                  • ruby.wasmでrequire_relativeを使えるようにしたい - Qiita

                    Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

                      ruby.wasmでrequire_relativeを使えるようにしたい - Qiita
                    • Steven Pemberton on Twitter: "CSS co-designer here. !important was added for one reason only: laws in the US that require certain text to be in… https://t.co/SolmYdXZJF"

                      CSS co-designer here. !important was added for one reason only: laws in the US that require certain text to be in… https://t.co/SolmYdXZJF

                        Steven Pemberton on Twitter: "CSS co-designer here. !important was added for one reason only: laws in the US that require certain text to be in… https://t.co/SolmYdXZJF"
                      • node.js の require と import について調べなおす - Qiita

                        Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

                          node.js の require と import について調べなおす - Qiita
                        • pp は require 無しで使える - Qiita

                          pp とは pen-pineapple のことではない。 Ruby のメソッドで,ややこしいオブジェクト1もいい感じに表示してくれるもの。 用途は p メソッドと同じだが,それよりもっと分かりやすくきれいに表示してくれることになっている。メソッド名は pretty print から。 p と pp でどう違うかはよく知らないけど,たとえば要素数が多いハッシュを表示させると,後者では改行を入れてくれるようだ(小さいハッシュだと変わらない)。 p "A".upto("K").with_index.to_h # => {"A"=>0, "B"=>1, "C"=>2, "D"=>3, "E"=>4, "F"=>5, "G"=>6, "H"=>7, "I"=>8, "J"=>9, "K"=>10} pp "A".upto("K").with_index.to_h # => {"A"=>0, # "B

                            pp は require 無しで使える - Qiita
                          • ts-nodeを使ってnode –requireする方法 | DevelopersIO

                            吉川@広島です。 アプリケーションの可変の設定値を環境変数で管理している場合、ローカル開発時に環境変数をセットする方法は 端末自体に環境変数をセットする アプリケーションをDockerコンテナ上で動かし、その中に環境変数をセットする direnvを利用する dotenvライブラリを利用する のような選択肢があります。個人的にはdotenvを利用するのが楽と感じており、こちらを採用することが多いです。 ただ、開発時にしか利用しないdotenvを本番ソースに含みたくないという場合があるかと思います。このような場合は、nodeコマンドの--requireオプションを利用することでスマートに実現できるようです。 プログラム内でdotenvを読み込むのをやめた話 | WEB EGG # dotenvロードを実行してからmain.jsを実行 node --require dotenv/config m

                              ts-nodeを使ってnode –requireする方法 | DevelopersIO
                            • India to require cybersecurity incident reporting within six hours

                              HomeNewsSecurityIndia to require cybersecurity incident reporting within six hours The Indian government has issued new directives requiring organizations to report cybersecurity incidents to CERT-IN within six hours, even if those incidents are port or vulnerability scans of computer systems. This requirement was promoted by India's Computer Emergency Response Team (CERT-In), who states it has id

                                India to require cybersecurity incident reporting within six hours
                              • 【PHP】include、requireの出力を変数に格納する方法 | キノコログ

                                PHPでファイルを読み込む、include(include_once含む)、require(require_once含む)は、記述時にその内容が出力されてしまいます。 しかし、includeやrequireの内容を即出力せず、変数として受け取りたい時がありますので、処理をまとめました。 include、requireの出力制御はob_start()を使う PHPで出力するタイミングを制御したい場合は、ob_start()という関数を使用します。 ob_start()は、表示させる内容を即出力せず、バッファという領域に保存し、任意のタイミングで変数として取得することが出来ます。 PHPでob_startの使い方。出力タイミングを制御しよう これはinclude先の「hello_text.php」の中身です。 Hello, <?php echo $name ?>! そして、このファイルの読み込

                                  【PHP】include、requireの出力を変数に格納する方法 | キノコログ
                                • Node.js が require() で検索するパスのまとめ | まくまくNode.jsノート

                                  require() によって Node.js がどのようにロードするモジュールを検索するかは、Node.js の Modules のドキュメント に詳しく説明されていますが、若干複雑なのでここでまとめておきます。 require の使い分け require でモジュールをロードするとき、多くは下記の 3 パターンのロード方法に分類できます。 // コアモジュール、あるいは node_modules にインストールしたパッケージのロード const crypto = require('crypto'); // ローカルモジュールのロード const myLocalModule = require('./path/to/myLocalModule'); // JSON ファイルのロード const jsonData = require('./path/to/data.json'); 簡単にまと

                                    Node.js が require() で検索するパスのまとめ | まくまくNode.jsノート
                                  • Require pull requests without requiring reviews - GitHub Changelog

                                    You can now require that all changes to a protected branch are made using a pull request, but without requiring reviews. This can be useful when you want to use pull requests for tracking purposes or to simplify your continuous integration (CI) configuration, but don't want to gate merging on review. Previously, you could create a branch protection rule that required pull requests with approving r

                                      Require pull requests without requiring reviews - GitHub Changelog
                                    • Top-500 npm package maintainers now require 2FA - GitHub Changelog

                                      Two-Factored Authentication (2FA) is now enforced for maintainers of the top-500 packages, by dependents, on the npm registry. To learn more about configuring 2FA, see Configuring two-factor authentication. To learn more about 2FA in general, see About two-factor authentication. For questions and comments, open a discussion in our feedback repository.

                                        Top-500 npm package maintainers now require 2FA - GitHub Changelog
                                      • Node.js 22の--experimental-require-moduleで、NestJSからESM Onlyライブラリを使ってみる

                                        はじめに JavaScriptにはCommonJS / ECMA Script Modules(以下ESM)の二つのモジュールシステムがあり、ライブラリには両方サポートするもの(Dual Package)もあれば、ESMのみをサポートするものもあります。(本記事では後者をESM Onlyライブラリと呼称します。) バックエンドフレームワークとして人気のあるNestJSはCommonJSの世界で動いており、ESM非対応です。具体的な問題としてNestJSではESM Onlyのライブラリを通常のimportで使おうとするとERR_REQUIRE_ESMが出ます。たとえば下記の記事が一例。 ESM Onlyのライブラリも増えてきている現状を反映し、NestJSのリポジトリにも数年に渡って複数のIssueが出ています。 NestJSの対応状況は、Pull Requestは出ているものの、現時点で保

                                          Node.js 22の--experimental-require-moduleで、NestJSからESM Onlyライブラリを使ってみる
                                        • GitHub - fiatjaf/awesome-loginless: an awesome list of internet services that don't require logins or registrations

                                          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                            GitHub - fiatjaf/awesome-loginless: an awesome list of internet services that don't require logins or registrations
                                          • Rails: Zeitwerk対応のためイニシャライザで大量のrequire_dependecyを削除(翻訳)|TechRacho by BPS株式会社

                                            概要 元サイトの許諾を得て翻訳・公開いたします。 英語記事: The mysterious litany of require_dependecy calls | Arkency Blog 原文公開日: 2024/02/05 原著者: Piotr Jurewicz 日本語タイトルは内容に即したものにしました。 参考: Classic から Zeitwerk への移行 - Railsガイド ある大規模なレガシーアプリに取り組んでいるときに、時代遅れのクラシックオートローダーから最新のZeitwerkオートローダーに乗り換えるという課題に直面しました。 ZeitwerkはRails 6ではオプションとなっていましたが、Rails 7からは必須になりました。 これまで使っていたRails 6では、新しいデフォルトのほとんどについてはどうにか対応しましたが、いよいよZeitwerkに切り替える時期

                                              Rails: Zeitwerk対応のためイニシャライザで大量のrequire_dependecyを削除(翻訳)|TechRacho by BPS株式会社
                                            • Google will require developer verification to install Android apps, including sideloading

                                              Apps & Updates Android Google will require developer verification to install Android apps, including sideloading To combat malware and financial scams, Google announced today that only apps from developers that have undergone verification can be installed on certified Android devices starting in 2026. This requirement applies to “certified Android devices” that have Play Protect and are preloaded

                                                Google will require developer verification to install Android apps, including sideloading 
                                              • Yes, Your Employer Can Require You to Be Vaccinated (Published 2021)

                                                As many Americans prepare to head back to the office, companies are hammering out policies on the extent to which they will require, or strongly encourage, employees to be vaccinated against the coronavirus. The bottom line is that companies are legally permitted to make employees get vaccinated, according to recent guidance from the federal agency that enforces workplace discrimination laws, the

                                                  Yes, Your Employer Can Require You to Be Vaccinated (Published 2021)
                                                • GitHub - coderaiser/simport: Import like with require but using await

                                                  You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                    GitHub - coderaiser/simport: Import like with require but using await
                                                  1

                                                  新着記事