From 2a0a41419287aeaf38ebe3ba903c6bf925626933 Mon Sep 17 00:00:00 2001 From: Jacob Dreesen Date: Mon, 12 Jun 2017 21:50:59 +0200 Subject: [PATCH 1/2] Fix some typos --- frontend/encore/simple-example.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/encore/simple-example.rst b/frontend/encore/simple-example.rst index 65ee0891107..90084d9ca13 100644 --- a/frontend/encore/simple-example.rst +++ b/frontend/encore/simple-example.rst @@ -99,7 +99,7 @@ In Symfony, use the ``asset()`` helper: Requiring JavaScript Modules ---------------------------- -Webpack is module bundler... which means that you can ``require`` other JavaScript +Webpack is a module bundler... which means that you can ``require`` other JavaScript files. First, create a file that exports a function: .. code-block:: javascript @@ -128,7 +128,7 @@ Great! Use ``require()`` to import ``jquery`` and ``greet.js``: // ./ (or ../) means to look for a local file var greet = require('./greet'); - $(document).ready(function()) { + $(document).ready(function() { $('h1').html(greet()); }); From 7c4c368b03eb62d275d7e24b616356c4d9359b33 Mon Sep 17 00:00:00 2001 From: Jacob Dreesen Date: Tue, 13 Jun 2017 00:51:12 +0200 Subject: [PATCH 2/2] Add missing argument to code example --- frontend/encore/simple-example.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/encore/simple-example.rst b/frontend/encore/simple-example.rst index 90084d9ca13..15a89284c94 100644 --- a/frontend/encore/simple-example.rst +++ b/frontend/encore/simple-example.rst @@ -129,7 +129,7 @@ Great! Use ``require()`` to import ``jquery`` and ``greet.js``: var greet = require('./greet'); $(document).ready(function() { - $('h1').html(greet()); + $('h1').html(greet('john')); }); That's it! When you build your assets, jQuery and ``greet.js`` will automatically