Vertaling van "wp-scripts" in Engels
We konden deze vermelding niet vinden. Er worden benaderende resultaten weergegeven. Controleer je spelling of stel voor deze term aan het woordenboek toe te voegen.
Un paso bastante importante en esta línea es el paquete @wordpress/scripts, también conocido como wp-scripts.
A very important step in this line is the package @wordpress/scripts, also known as wp-scripts.
Tunea tu propio archivo webpack.config.js extendiendo el que viene por defecto con wp-scripts y olvídate de todo lo demás.
Tune your own webpack.config.js file extending the one that comes by default with wp-scripts and forget about everything else.
Desde aquí te animo a que te pases por la documentación de wp-scripts para ver todo lo que puedes hacer con esta utilidad.
From here I encourage you to go through the documentation of wp-scripts to see everything you can do with this utility.
Si tienes alguna duda o utilizas wp-scripts de otra manera, no te queda otra: ¡déjanos un comentario!
If you have any questions or use wp-scripts in another way, you have no choice: leave us a comment!
Por su parte, el comando wp-scripts start lo utilizaremos durante el desarrollo de nuestro código JavaScript ya que escucha los cambios que vamos haciendo en el archivo src/index.js y regenera el archivo build/index.js para cada uno de ellos de forma incremental (más rápido).
On the other hand, the wp-scripts start command is used during the development of our JavaScript code since it listens to the changes we are making in the src/index.js file and regenerates the build/index.js file incrementally after every change.
De esta manera, cualquier archivo SVG lo cargamos como un componente más que podemos utilizar en nuestro código JSX y así renderizar imágenes SVG extendiendo wp-scripts con nuestros cambios.
This way, any SVG file we load behaves as a component that we can use in our JSX code to render SVG images extending wp-scripts with our changes.
Por tanto, si tienes un fragmento de código JavaScript tan simple como el que ves a continuación donde renderizamos un componente que pinta un archivo de imagen SVG, al pasarlo por wp-scripts para transpilarlo, obtendremos un error.
Therefore, if you have a piece of JavaScript code as simple as the one you see below, where we render a component that draws an SVG image file, when using wp-scripts to transpile the code you will get an error.
Si querías hacer pruebas y empezar a desarrollar código para Gutenberg pero empezar te era demasiado complejo, con wp-scripts puedes crear tus archivos JavaScript de forma rápida y sin preocuparte de configuraciones adicionales.
If you wanted to do tests and start developing code for Gutenberg but everything was too complex, now with wp-scripts you can create your JavaScript files quickly and without worrying about additional configurations.
El primer comando llama a wp-scripts build, que se encarga de crear el código JavaScript de producción.
The first command calls wp-scripts build, which is responsible for creating the production JavaScript code.
Un ejemplo sencillo que te servirá para entender porqué vas a tener que utilizar tu propia configuración de Webpack es que por defecto wp-scripts (o mejor dicho, la configuración de Webpack que incluye) no te permite trabajar con archivos SVG en tu código JavaScript.
A simple example that will help you understand why you will have to use your own Webpack configuration is that by default wp-scripts (the configuration of Webpack that it includes) does not allow you to work with SVG files in your JavaScript code.
Leer más sobre «Transpilando JavaScript fácilmente con wp-scripts».
Read more about "Transpiling JavaScript easily with wp-scripts".
Pero si tus necesidades son más avanzadas y wp-scripts se te queda corto, su versatilidad te permite ampliar las posibilidades por defecto usando tu propio archivo de configuración de Webpack.
But if your needs are more advanced and wp-scripts falls short, don't worry because its versatility allows you to expand its default possibilities using your own Webpack configuration file.