2017 © Pedro Peláez
 

symfony-bundle frontend-mapper-bundle

This bundle provides integration of gulp into Symfony2

image

werkint/frontend-mapper-bundle

This bundle provides integration of gulp into Symfony2

  • Monday, January 18, 2016
  • by nick4fake
  • Repository
  • 4 Watchers
  • 1 Stars
  • 1,064 Installations
  • JavaScript
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 1 % Grown

The README.md

requirejs.config({
    "config":      {
        "translatorLoader": {
            "domains": [{
                name:    'messages',
                locales: ['en', document.documentElement.lang],
            }]
        }
    },
});

copy file to project: package.json, (*1)

cd path/to/project
cp vendor/werkint/frontend-mapper-bundle/package.json ./

and run npm install may help: also npm install --save glob vendor/werkint/frontend-mapper-bundle/src/DependencyInjection/Compiler/JsmodelProviderPass.php, (*2)

gulpfile.js, (*3)

(function () {
    'use strict';

    process.env.NODE_MAX_LISTENER = 500;
    require('./vendor/werkint/frontend-mapper-bundle/src/Resources/gulp/index.js')();
})();

bower.json, (*4)

touch app/config/bower.json

```json { "name": "brander-app", "version": "0.0.1", "authors": [ "Someone someone@gmail.com" ], "ignore": [ "**/." ], "resolutions": { "underscore": "~1.8.3", "backbone": "~1.1.2", "backbone.relational": "2f66cc5022" }, "overrides": { "renames": {}, "social": { "normalize": { "js/social": ".js" } }, "requirejs-domready": { "main": [ "domReady.js" ] }, "tabslet": { "main": [ "jquery.tabslet.js" ] } } }, (*5)



### Usual configuration ### 0. do lines above (create gulpfile.js, npm install ...) 1. create bundle dependencies src/AppBundle/bower.json ```json { "name": "sdelka-app", "main": [ "bower.json" ], "dependencies": { "requirejs": "*", "jquery": "*", "lodash": "*", "backbone": "*", "backbone.relational": "*", "backbone.marionette": "*", "backbone.modelbinder": "*", "twig.js": "*", "backbone.radio": "*", "backbone.paginator": "*" } } ``` 2. create config src/AppBundle/Resources/public/config.js ```javascript (function () { 'use strict'; var config = window.require ? window.require : {}; config = { 'paths': config.paths, 'waitSeconds': 30, 'urlArgs': 'bust=' + window.$assets_version, "baseUrl": "/assets/js", "map": { /* "*": { "twig": "config/twig", }, "config/twig": { "twig": "twig", }, "config/iwin-twitter": { "social/module.twitter": "social/module.twitter", },*/ }, "shim": { "jquery.elastic": { deps: ["jquery"] }, }, "config": { /*"social/api.google-loader": window.$socials.google,*/ }, }; require.config(config) }()); ``` 4. edit app/Resources/views/base.html.twig ```twig <head> <meta charset="UTF-8" /> <title>{% block title %}Welcome!{% endblock %}</title> {% block stylesheets %}{% endblock %} <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" /> <!-- require --> <script src="{{ asset('assets/js/require.js') }}"></script> <!-- require config --> <script src="{{ asset('bundles/app/config.js') }}"></script> </head> ``` 5. run ```app/console as:in``` and ```gulp``` 6. test ```javascript requirejs(['jquery'], function ($) { alert($); })

The Versions

18/01 2016

dev-master

9999999-dev

This bundle provides integration of gulp into Symfony2

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

06/01 2016

v0.0.1

0.0.1.0

This bundle provides integration of gulp into Symfony2

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov