Skip to content

Instantly share code, notes, and snippets.

@astorm
Last active January 26, 2016 16:41
Show Gist options
  • Select an option

  • Save astorm/4668d2cc296b77911341 to your computer and use it in GitHub Desktop.

Select an option

Save astorm/4668d2cc296b77911341 to your computer and use it in GitHub Desktop.

Revisions

  1. astorm revised this gist Jan 26, 2016. 2 changed files with 11 additions and 6 deletions.
    11 changes: 11 additions & 0 deletions Example.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    We kick off a program with this

    requirejs(['Pulsestorm_RequireExample1/example'],function(example){
    alert(example.message);
    });

    This program uses the javascript module named `Pulsestorm_RequireExample1/example`.

    **Something** in Magento 2 converts `Pulsestorm_RequireExample1/example` into

    http://magento-2-with-keys.dev/static/frontend/Magento/ultimo/en_US/Pulsestorm_RequireExample1/example.js
    6 changes: 0 additions & 6 deletions init.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +0,0 @@
    <h1>Require Module in Source</h1>
    <script type="text/javascript">
    requirejs(['Pulsestorm_RequireExample1/example'],function(example){
    alert(example.message);
    });
    </script>
  2. astorm created this gist Jan 26, 2016.
    6 changes: 6 additions & 0 deletions init.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    <h1>Require Module in Source</h1>
    <script type="text/javascript">
    requirejs(['Pulsestorm_RequireExample1/example'],function(example){
    alert(example.message);
    });
    </script>