mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-17 08:07:51 +00:00
Merge pull request #460 from embark-framework/fix_overridecompiler
Allow plugins to override core compilers
This commit is contained in:
commit
dae9e4ae7f
@ -104,6 +104,17 @@ Plugins.prototype.getPluginsProperty = function(pluginType, property, sub_proper
|
|||||||
return plugin.has(pluginType);
|
return plugin.has(pluginType);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Sort internal plugins first
|
||||||
|
matchingPlugins.sort((a, b) => {
|
||||||
|
if (a.isInternal) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (b.isInternal) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
|
||||||
let matchingProperties = matchingPlugins.map((plugin) => {
|
let matchingProperties = matchingPlugins.map((plugin) => {
|
||||||
if (sub_property) {
|
if (sub_property) {
|
||||||
return plugin[property][sub_property];
|
return plugin[property][sub_property];
|
||||||
@ -111,6 +122,7 @@ Plugins.prototype.getPluginsProperty = function(pluginType, property, sub_proper
|
|||||||
return plugin[property];
|
return plugin[property];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Remove empty properties
|
||||||
matchingProperties = matchingProperties.filter((property) => property);
|
matchingProperties = matchingProperties.filter((property) => property);
|
||||||
|
|
||||||
//return flattened list
|
//return flattened list
|
||||||
|
@ -5,4 +5,3 @@ Test App for integration testing purposes.
|
|||||||
```../../bin/embark test``` to see tests are working as expected
|
```../../bin/embark test``` to see tests are working as expected
|
||||||
|
|
||||||
```dist/index.html``` and ```dist/test.html``` to check different functionality
|
```dist/index.html``` and ```dist/test.html``` to check different functionality
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user