I'm looking for a way to completely disable generator functions transform with babel. With babel 5 there was a blacklist option, but it seems that with babel 6 there is no way to do that (at least I did not find any documentation on the official website).
Several months have passed since support for generator functions and the yield keyword arrived in Node.js v0.11.2. This news was greeted with great excitement, because generator syntax provides a much cleaner alternative to using callbacks when writing asynchronous server-side code.
One of the biggest benefits of using JavaScript on the server is that you can (in theory at least) run the very same code in a web browser. However, if you choose to use generator functions in Node.js, you end up with a bunch of code that can't be executed client-side. So there's the rub: native support for generators is only so exciting because it enables you to write really clean, powerful, unportable code.
Some of us on the JavaScript Infrastructure team at Facebook got restless waiting for the future to get here, so we developed a tool called regenerator to replace generator functions with efficient JavaScript-of-today (ECMAScript 5 or ES5 for short) that behaves the same way. Since the tool itself is implemented in ES5, you can try it right now, in this web browser, without leaving this web page.
Regenerator relies heavily on the Esprima JavaScript parser and two libraries that we maintain for manipulating abstract syntax trees, ast-types and recast. It is similar in spirit to Google's Traceur Compiler, which supports generators and many other ES6 features through source transformation, but we would argue it compares favorably to Traceur in several ways.
URLs matter for both customers and search engines: the first ones want to see trustful and understandable links, while the second ones expect URLs to be SEO-optimized. When you have a Magento store, you can use the default options to adjust the links. But still, if you migrate products from M1 or, for instance, just want to create another website and transfer products from the main one - URLs will remain default (and unfriendly).
Regenerate URL rewrites for Magento 2 categories and products in one click. Apply all SEO parameters configured in your Magento instance to the new URLs without SSH and a command line to make links appropriate much faster. Segment links by product and category ID ranges, choose the required website and a store view and apply deferred reindexation to setup the regeneration process.
Frequently, before getting to a product page, customers (as well as search engines) come to a category page first. By default, after migration, your categories will get the URLs like /website.com/category/view/id. To make categories understandable for shoppers and well-optimized for engines, you can make either all or specific category URLs SEO- and user-friendly right from the admin panel. As the extension uses previously configured Magento SEO settings, just set category ranges or particular IDs and run automatic regeneration.
Magento offers some SEO settings to make your URLs look better: configurable category/product URL suffixes, paths, separators, canonical links, etc. All these settings will be used during the regeneration for new products to keep the URL base unified. Find more about out-of-the-box SEO options here.
To make sure everything is correct, you can see how the regeneration is going in a pop-up window. If any issue appears, the extension shows a notification and provides a detailed log so that you could resolve it. Thus, the process becomes vivid and safe for your store.
By default, every time a new rewrite occurs, Magento starts reindexation and cache flushing. To reduce the load on your server and speed up regeneration, you can turn both processes off and reindex all as the final step. The same can be done with the cache flushing and cleaning.
Even though you can do everything without the SSH, still it is possible to generate Magento URLs using the CLI commands. The feature is helpful in cases of the auto-deploy or automatic updates, during which some rewrites may be required.
The URL Rewrites Regenerator module is now included into Unique Product URL extension for Magento 2. The regenerator takes into account all the customization of links and breadcrumbs provided by the extension.
In Magento to generate the URL, you need to do the following. Install the extension. Go to Stores > Configuration > Amasty Extensions > URL Rewrites Regenerator. Set all options to Yes. Make necessary settings about what products and categories you want to rewrite. Click the Start Regeneration button to run generation.
Motors become generators when forced to turn while no or reduced power is applied. This phenomenon brings interesting benefits in terms of energy efficiency but it also introduces challenges in system design. Understanding the physics and implications of regeneration is critical in many applications.
Electrical motors are reversible machines; they can function as motors or as generators. A motor receives electrical power from a battery and transforms it in torque developing a Counter Electromotive Force CEMF (also known as Back EMF or BEMF), which opposes the battery. A generator receives mechanical power from a mechanical actuator and transforms it in electrical power developing a Counter Torque, which opposes the actuator.
A motor behaves as motor and as generator at the same time. In fact while a motor is 'motoring', that is doing mechanical work, it generates CEMF acting as generator, although the CEMF is lower than the battery voltage so the motor acts as a load and absorbs current.
In certain situations the CEMF may overcome the battery, in which case the generator component becomes dominant; the motor acts as a generator inverting the direction of its current and forcing it into the battery.
The typical situation is the one of a heavy vehicle rolling on a sharp downhill slope and forcing the motor to turn fast enough that the CEMF becomes larger than the battery voltage. As soon as the motor overcomes the battery it inverts the current direction and starts feeding current into the battery, while developing a counter torque that acts as a brake. This phase is called regeneration (recharging of the battery).
As an example, a common car battery (generator) sources a positive current (exiting the positive pole) when starting the car and sinks a negative current (entering the positive pole) while being recharged.
Similarly current can be made to exit from the positive pole of a resistor (user) inverting the voltage across it. By representing positive and negative voltage / current in a plane as VI axis, we distinguish four quadrants.
As an example let's look at a car battery (figure 2); Q1 and Q 3 are the quadrants where the battery acts as a generator, since the current exits the positive pole. In Q1 the generator maintains a positive power rail while in Q3 the battery maintains a negative power rail.
Q2 and Q4 are the user quadrants, where the battery acts as a load to a battery charger that pushes current into the battery recharging it. In Q2 the battery charger output maintains a positive power rail, where in Q4 the charger maintains a negative power rail.
Most electrical motors operated by a battery use permanent magnet PM motors, since in this case no battery current needs to be spent to generate the magnetic field. Reversing the armature current reverses the direction of rotation.
The only exception is for very large vehicles, where high power motors are needed, beyond the capability of permanent magnets, In this case a 'separately excited' motor is used, mostly the shunt version which, as long as the field winding is feed at constant voltage, behaves like a PM motor (constant flux).
In practice, since the shunt motor may malfunction should the field current accidentally become zero, what is used is a variation of the shunt motor called 'compound'. A small series field winding is added, to guarantee a minimum amount of field as long as there is armature current. An advantage of the shunt motor is that direction is reversed by reversing the field current, rather than the much larger armature current.
Predictable behavior.
Ability to develop maximum torque at startup, when speed is zero \
Absence of run away condition, this being the situation where the motor indefinitely increases its speed, until it destroys itself (something that can happen with separately excited motors).
Ideal in battery operation, since they do nt need to consume current to create the field flux.
The motor can be assigned a positive pole, which will correspond to one of the two senses of rotation.
Let's assume this is the clock-wise CW direction. Inverting the armature current inverts the direction, which becomes counter-clock-wise CW.
Q1 and Q3 are the quadrants where the motor is motoring, that is absorbing electrical energy and making mechanical work. Q2 and Q4 are the quadrants where the motor is generating, that are it is mechanically pulled, like for example by an electrical golf cart going downhill, and it acts as a DC generator.
It is useful to understand the equivalent circuit of a permanent motor. It is composed of a voltage generator equivalent to the Counter Electromotive Force CEMF, a series resistor equivalent to the resistance of the copper of the armature winding, a series inductance.
b37509886e