/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/create-block/lib/init-wp-env.js
28 строк
630 B
Marco Ciampini
ESLint: Remove legacy import suppressions (#81338)
07 авг 2026, 15:52
Не верифицирован
07 авг 2026, 15:52
8181ec4
Код
Авторство
О чём код?
const { join } = require( 'path' ); const { writeFile } = require( 'fs' ).promises; const { command } = require( 'execa' ); const { info } = require( './log' ); module.exports = async ( { rootDirectory } ) => { info( '' ); info( 'Installing `@wordpress/env` package. It might take a couple of minutes...' ); await command( 'npm install @wordpress/env --save-dev', { cwd: rootDirectory, } ); info( '' ); info( 'Configuring `@wordpress/env`...' ); await writeFile( join( rootDirectory, '.wp-env.json' ), JSON.stringify( { core: 'WordPress/WordPress', plugins: [ '.' ], }, null, '\t' ) ); };