Skip to content

Commit b982107

Browse files
mandaputtramazipan
authored andcommitted
Halaman Instalasi (vuejs#126)
* core:halaman installation * some words improvements * yang atas ada yang belum
1 parent 611ca52 commit b982107

File tree

1 file changed

+35
-32
lines changed

1 file changed

+35
-32
lines changed

src/v2/guide/installation.md

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ Kami merekomendasikan untuk versi spesifik yang dapat Anda mutakhirkan secara ma
4040
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
4141
```
4242

43-
For production, we recommend linking to a specific version number and build to avoid unexpected breakage from newer versions:
43+
Untuk masa produksi, kami menyarankan untuk menggunakan angka versi dan bundel untuk menghindari perubahan signifikan pada versi terbaru:
4444

4545
``` html
4646
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.0/dist/vue.js"></script>
4747
```
4848

49-
If you are using native ES Modules, there is also an ES Modules compatible build:
49+
Jika kamu menggunakan ES Module asli, disediakan juga bundel kompatibel dengan ES Modules:
5050

5151
``` html
5252
<script type="module">
@@ -96,37 +96,39 @@ Di dalam [direktori `dist/` dari paket NPM](https://cdn.jsdelivr.net/npm/vue/dis
9696

9797
- **Runtime**: kode yang bertanggung jawab untuk membuat instan Vue, _rendering_, dan _patching_ DOM virtual, dll. Pada dasarnya semua kecuali _compiler_.
9898

99-
- **[UMD](https://github.com/umdjs/umd)**: UMD builds can be used directly in the browser via a `<script>` tag. The default file from jsDelivr CDN at [https://cdn.jsdelivr.net/npm/vue](https://cdn.jsdelivr.net/npm/vue) is the Runtime + Compiler UMD build (`vue.js`).
99+
- **[UMD](https://github.com/umdjs/umd)**: Bundel UMD dapat digunakan langsung pada browser dengan *tag* `<script>`. file standart dari jsDelivr CDN [https://cdn.jsdelivr.net/npm/vue](https://cdn.jsdelivr.net/npm/vue) merupakan *Runtime* + *Compiler* bundel UMD (`vue.js`).
100100

101-
- **[CommonJS](http://wiki.commonjs.org/wiki/Modules/1.1)**: CommonJS builds are intended for use with older bundlers like [browserify](http://browserify.org/) or [webpack 1](https://webpack.github.io). The default file for these bundlers (`pkg.main`) is the Runtime only CommonJS build (`vue.runtime.common.js`).
101+
- **[CommonJS](http://wiki.commonjs.org/wiki/Modules/1.1)**: Bundel CommonJS ditargetkan untuk digunakan oleh *bundler* lama seperti [browserify](http://browserify.org/) atau [webpack 1](https://webpack.github.io). Standar pada *bundler* ini (`pkg.main`) merupakan *Runtime only CommonJS* bundel (`vue.runtime.common.js`).
102102

103-
- **[ES Module](http://exploringjs.com/es6/ch_modules.html)**: starting in 2.6 Vue provides two ES Modules (ESM) builds:
103+
- **[ES Module](http://exploringjs.com/es6/ch_modules.html)**: mulai pada 2.6 Vue menyediakan dua bundel ES Modules (ESM):
104104

105-
- ESM for bundlers: intended for use with modern bundlers like [webpack 2](https://webpack.js.org) or [Rollup](https://rollupjs.org/). ESM format is designed to be statically analyzable so the bundlers can take advantage of that to perform "tree-shaking" and eliminate unused code from your final bundle. The default file for these bundlers (`pkg.module`) is the Runtime only ES Module build (`vue.runtime.esm.js`).
105+
- ESM untuk *bundlers*: dimaksudkan untuk digunakan dengan *bundler* modern seperti [webpack 2](https://webpack.js.org) atau [Rollup](https://rollupjs.org/). Format ESM didesain secara statis dan dapat di analisis, sehingga *bundler* dapat mengambil keuntungan dari hal tersebut untuk melakukan [*tree-shaking*](https://www.keycdn.com/blog/tree-shaking) dan meng-eliminasi kode yang tidak digunakan dari bundel finalmu. File standar untuk bundel ini (`pkg.module`) adalah *Runtime only ES Module* bundel (`vue.runtime.esm.js`).
106106

107-
- ESM for browsers (2.6+ only): intended for direct imports in modern browsers via `<script type="module">`.
107+
- ESM untuk browser (2.6+ only): dimaksudkan untuk impor modul langsung di browser modern `<script type="module">`.
108108

109109
### Runtime + Compiler vs. Runtime-only
110110

111111
If you need to compile templates on the client (e.g. passing a string to the `template` option, or mounting to an element using its in-DOM HTML as the template), you will need the compiler and thus the full build:
112112

113+
Jika kamu membutuhkan untuk menyusun (*compile*) templat pada sisi klien (contoh: menggunakan *string* pada opsi `template`, atau memasang pada element menggukana *in-DOM HTML* sebagai templat), kamu membutuhkan penyusun (*compiler*) dan dengan demikian juga bundel penuh (*full-build*).
114+
113115
``` js
114-
// this requires the compiler
116+
// Ini membutuhkan kompiler
115117
new Vue({
116118
template: '<div>{{ hi }}</div>'
117119
})
118120

119-
// this does not
121+
// ini tidak
120122
new Vue({
121123
render (h) {
122124
return h('div', this.hi)
123125
}
124126
})
125127
```
126128

127-
When using `vue-loader` or `vueify`, templates inside `*.vue` files are pre-compiled into JavaScript at build time. You don't really need the compiler in the final bundle, and can therefore use the runtime-only build.
129+
Saat kamu menggunakan `vue-loader` atau `vueify`, templat di dalam `*.vue` file sudah dikompilasi ke bentuk JavaScript pada saat built time. Kamu tidak terlalu membutuhkan kompiler dalam bundel akhir, dan hanya menggunakan *runtime-only* bundel.
128130

129-
Since the runtime-only builds are roughly 30% lighter-weight than their full-build counterparts, you should use it whenever you can. If you still wish to use the full build instead, you need to configure an alias in your bundler:
131+
Dikarenakan bundel *runtime-only* 30% lebih ringan daripada cara lain `full-build`, kamu harus menggunakannya disaat kamu bisa. Tapi jika kamu ingin menggunakan `full-build`, dapat dilakukan dengan menambahkan alias pada bundler.
130132

131133
#### Webpack
132134

@@ -135,7 +137,7 @@ module.exports = {
135137
// ...
136138
resolve: {
137139
alias: {
138-
'vue$': 'vue/dist/vue.esm.js' // 'vue/dist/vue.common.js' for webpack 1
140+
'vue$': 'vue/dist/vue.esm.js' // 'vue/dist/vue.common.js' untuk webpack versi 1
139141
}
140142
}
141143
}
@@ -158,7 +160,7 @@ rollup({
158160

159161
#### Browserify
160162

161-
Add to your project's `package.json`:
163+
Tambahkan pada `package.json` anda:
162164

163165
``` js
164166
{
@@ -171,7 +173,7 @@ Add to your project's `package.json`:
171173

172174
#### Parcel
173175

174-
Add to your project's `package.json`:
176+
Tambahkan pada `package.json` anda:
175177

176178
``` js
177179
{
@@ -182,25 +184,24 @@ Add to your project's `package.json`:
182184
}
183185
```
184186

185-
### Development vs. Production Mode
187+
### Masa Pengembangan vs. Masa Produksi (*Development vs. Production Mode*)
186188

187-
Development/production modes are hard-coded for the UMD builds: the un-minified files are for development, and the minified files are for production.
189+
Masa pengembangan/produksi merupakan hasil `hard-coded` bundel UMD: bundel yang tidak di minifikasi merupakan bundel masa pengembangan dan yang tidak di minifikasi merupakan bundel masa produksi.
188190

189-
CommonJS and ES Module builds are intended for bundlers, therefore we don't provide minified versions for them. You will be responsible for minifying the final bundle yourself.
191+
Bundel CommonJS dan ES Module dimaksudkan kepada pembuat bundel (*bundlers*), karena itu kita tidak menyediakan versi minifikasi untuk bundel tersebut (CommonJs dan ES Module). Kamu bertanggunag jawab atas bundel akhir untuk strategi minifikasi tersebut.
190192

191-
CommonJS and ES Module builds also preserve raw checks for `process.env.NODE_ENV` to determine the mode they should run in. You should use appropriate bundler configurations to replace these environment variables in order to control which mode Vue will run in. Replacing `process.env.NODE_ENV` with string literals also allows minifiers like UglifyJS to completely drop the development-only code blocks, reducing final file size.
193+
Bundel CommonJS dan ES Module juga mempertahankan untuk memeriksa mentah `process.env.NODE_ENV` untuk menentukan mode mana yang digunakan saat apliaksi berjalan. Kamu harus menggunakan konfigurasi pembuat bundel (*bundler*) yang benar untuk menggantikan variabel ekosistem tersebut dikarekan untuk mengontrol di mode manakah Vue harus berjalan (Masa pengembangan/produksi). Mengganti `process.env.NODE_ENV` menggunakan *string literal* juga memungkinkan alat minifikasi (*minifiers*) seperti UglifyJS untuk membuang blok code pada masa pengembangan.
192194

193195
#### Webpack
194196

195-
In Webpack 4+, you can use the `mode` option:
197+
Di dalam Webpack 4+, kamu dapat menggunakan opsi `mode`:
196198

197199
``` js
198200
module.exports = {
199201
mode: 'production'
200202
}
201203
```
202-
203-
But in Webpack 3 and earlier, you'll need to use [DefinePlugin](https://webpack.js.org/plugins/define-plugin/):
204+
Untuk Webpack 3 dan sebelumnya, kamu harus menggunakan [*DefinePlugin*](https://webpack.js.org/plugins/define-plugin/):
204205

205206
``` js
206207
var webpack = require('webpack')
@@ -220,7 +221,7 @@ module.exports = {
220221

221222
#### Rollup
222223

223-
Use [rollup-plugin-replace](https://github.com/rollup/rollup-plugin-replace):
224+
Gunakan [*rollup-plugin-replace*](https://github.com/rollup/rollup-plugin-replace):
224225

225226
``` js
226227
const replace = require('rollup-plugin-replace')
@@ -237,23 +238,25 @@ rollup({
237238

238239
#### Browserify
239240

240-
Apply a global [envify](https://github.com/hughsk/envify) transform to your bundle.
241+
Gunakan mode global [*envify*](https://github.com/hughsk/envify) untuk merubah bundel.
241242

242243
``` bash
243244
NODE_ENV=production browserify -g envify -e main.js | uglifyjs -c -m > build.js
244245
```
245246

246-
Also see [Production Deployment Tips](deployment.html).
247+
Lihat juga [tips masa produksi dan pengembangan](deployment.html).
248+
249+
### Ekosistem CSP
247250

248-
### CSP environments
251+
Beberapa lingkungan, seperti Google Chrome Apps, mengharuskan Content Security Policy (CSP), dimana melarang penggunakan `new Function()` untuk mengevaluasi ekspresi (dalam hal ini *function expression*). Bundel akhir tergantung pada fitur ini untuk menyusun templat, jadi *bundler* tidak berguna sama sekali dalam ekosistem ini.
249252

250-
Some environments, such as Google Chrome Apps, enforce Content Security Policy (CSP), which prohibits the use of `new Function()` for evaluating expressions. The full build depends on this feature to compile templates, so is unusable in these environments.
253+
Di sisi lain, *runtime-only* bundel merupakan bundel yang sesui untuk ekositem CSP. Saat menggunakan bundel *runtime-only* dengan [Webpack + Vueloader](https://github.com/vuejs-templates/webpack-simple) atau [Browserify + vueify](https://github.com/vuejs-templates/browserify-simple) tempatmu akan disusun kedalam fungsi `render` yang dimana hal ini cocok untuk ekosistem CSP
251254

252-
On the other hand, the runtime-only build is fully CSP-compliant. When using the runtime-only build with [Webpack + vue-loader](https://github.com/vuejs-templates/webpack-simple) or [Browserify + vueify](https://github.com/vuejs-templates/browserify-simple), your templates will be precompiled into `render` functions which work perfectly in CSP environments.
255+
## Bundel Pengembangan (*Dev Build*)
253256

254-
## Dev Build
257+
**Penting**: the built files in GitHub's `/dist` folder are only checked-in during releases. To use Vue from the latest source code on GitHub, you will have to build it yourself!
255258

256-
**Important**: the built files in GitHub's `/dist` folder are only checked-in during releases. To use Vue from the latest source code on GitHub, you will have to build it yourself!
259+
File bundel pada Github `/dist` folder hanya disusun (*compile*) saat rilis. Untuk menggunakan Vue dari kode sumber terakhir di Github, kamu harus menyusun-nya sendiri.
257260

258261
``` bash
259262
git clone https://github.com/vuejs/vue.git node_modules/vue
@@ -264,13 +267,13 @@ npm run build
264267

265268
## Bower
266269

267-
Only UMD builds are available from Bower.
270+
Hanya bundel UMD saja yang disediakan dari Bower
268271

269272
``` bash
270-
# latest stable
273+
# versi stabil terakhir
271274
$ bower install vue
272275
```
273276

274277
## AMD Module Loaders
275278

276-
All UMD builds can be used directly as an AMD module.
279+
Semua bundel UMD bisa digunakan langsung sebagai modul AMD

0 commit comments

Comments
 (0)