Skip to content

Commit b5c8135

Browse files
committed
commit progress
1 parent ae8de8a commit b5c8135

File tree

1 file changed

+24
-26
lines changed

1 file changed

+24
-26
lines changed

content/docs/optimizing-performance.md

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,70 +24,68 @@ Si visitas un sitio con React en modo de desarrollo, el ícono tendrá un fondo
2424

2525
Se espera que uses el modo de desarrollo cuando estás trabajando en tu aplicación, y el modo de producción cuando despliegues tu aplicación a los usuarios.
2626

27-
You can find instructions for building your app for production below.
27+
Abajo puedes encontrar las instrucciones para construir tu aplicación de producción.
2828

2929
### Create React App
3030

31-
If your project is built with [Create React App](https://github.com/facebookincubator/create-react-app), run:
31+
Si tu proyecto fui construido con [Create React App](https://github.com/facebookincubator/create-react-app), ejecuta:
3232

3333
```
3434
npm run build
3535
```
3636

37-
This will create a production build of your app in the `build/` folder of your project.
37+
Esto creará una *build* de producción de tu aplicación el directorio `build/` de tu proyecto.
3838

39-
Remember that this is only necessary before deploying to production. For normal development, use `npm start`.
39+
Recuerda que esto es solo una necesidad antes de desplegar a producción. Para el desarrollo normal, usa `npm start`.
4040

4141
### Single-File Builds
4242

43-
We offer production-ready versions of React and React DOM as single files:
43+
Ofrecemos versiones listas para producción de React y React DOM como un archivo:
4444

4545
```html
4646
<script src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
4747
<script src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
4848
```
4949

50-
Remember that only React files ending with `.production.min.js` are suitable for production.
50+
Recuerda que solo los archivos de React que terminan con `production.min.js` son apropiados para producción.
5151

5252
### Brunch
5353

54-
For the most efficient Brunch production build, install the [`uglify-js-brunch`](https://github.com/brunch/uglify-js-brunch) plugin:
54+
Para la *build* de producción Brunch más eficiente, instala el plugin [`uglify-js-brunch`](https://github.com/brunch/uglify-js-brunch):
5555

5656
```
57-
# If you use npm
57+
# Si usas npm
5858
npm install --save-dev uglify-js-brunch
5959
60-
# If you use Yarn
60+
# Si usas Yarn
6161
yarn add --dev uglify-js-brunch
6262
```
6363

64-
Then, to create a production build, add the `-p` flag to the `build` command:
64+
Entonces, para crear una *build* de producción, agrega la bandera `-p` al comando `build`:
6565

6666
```
6767
brunch build -p
6868
```
69-
70-
Remember that you only need to do this for production builds. You shouldn't pass the `-p` flag or apply this plugin in development, because it will hide useful React warnings and make the builds much slower.
69+
Recuerda que solo necesitas hacer esto para las *build* de producción. Tú no deberías pasar la bandera `-p` o aplicar el plugin en desarrollo, por que ocultará las advertencias de React y hará las *builds* mucho mas lentas.
7170

7271
### Browserify
7372

74-
For the most efficient Browserify production build, install a few plugins:
73+
Para la *build* de producción con Browserify más eficiente, instala algunos plugins:
7574

7675
```
77-
# If you use npm
76+
# Si usas npm
7877
npm install --save-dev envify uglify-js uglifyify
7978
80-
# If you use Yarn
79+
# Si usas Yarn
8180
yarn add --dev envify uglify-js uglifyify
8281
```
82+
Para crear una *build* de producción, asegúrate de agregar estas transformaciones **(El orden es importante)**:
8383

84-
To create a production build, make sure that you add these transforms **(the order matters)**:
85-
86-
* The [`envify`](https://github.com/hughsk/envify) transform ensures the right build environment is set. Make it global (`-g`).
87-
* The [`uglifyify`](https://github.com/hughsk/uglifyify) transform removes development imports. Make it global too (`-g`).
88-
* Finally, the resulting bundle is piped to [`uglify-js`](https://github.com/mishoo/UglifyJS2) for mangling ([read why](https://github.com/hughsk/uglifyify#motivationusage)).
84+
* La transformación [`envify`](https://github.com/hughsk/envify) asegura que el ambiente de la *build* sea correcto. Hazlo lo global (`-g`).
85+
* La transformación [`uglifyify`](https://github.com/hughsk/uglifyify) remueve los import de desarollo. Hazlo global tambien (`-g`).
86+
* Finalmente, el *bundle* resultante es canalizado a [`uglify-js`](https://github.com/mishoo/UglifyJS2) para mutilar ([Lee porque](https://github.com/hughsk/uglifyify#motivationusage)).
8987

90-
For example:
88+
Por ejemplo:
9189

9290
```
9391
browserify ./index.js \
@@ -96,16 +94,16 @@ browserify ./index.js \
9694
| uglifyjs --compress --mangle > ./bundle.js
9795
```
9896

99-
>**Note:**
97+
>**Nota:**
10098
>
101-
>The package name is `uglify-js`, but the binary it provides is called `uglifyjs`.<br>
102-
>This is not a typo.
99+
>El nombre del paquete es `uglify-js`, pero el binario que proporciona se llama `uglifyjs`.<br>
100+
>Estoy no es un error de imprenta.
103101
104-
Remember that you only need to do this for production builds. You shouldn't apply these plugins in development because they will hide useful React warnings, and make the builds much slower.
102+
Recuerda que solo necesitas hacer esto para las *builds* de producción. No deberías aplicar estos plugins en desarrollo por que ocultaran las advertencias de React, y haran las *builds* mucho mas lentas.
105103

106104
### Rollup
107105

108-
For the most efficient Rollup production build, install a few plugins:
106+
Para el *Rollup* de la *build* de producción mas eficiente, instala algunos plugins:
109107

110108
```
111109
# If you use npm

0 commit comments

Comments
 (0)