babel-plugin-namespace-amd-define
Advanced tools
Comparing version 1.7.0-alpha.1158492a to 1.7.0-alpha.1b73ffed
@@ -7,2 +7,6 @@ 'use strict'; | ||
var _babelIpc = require('liferay-npm-build-tools-common/lib/babel-ipc'); | ||
var babelIpc = _interopRequireWildcard(_babelIpc); | ||
var _pluginLogger = require('liferay-npm-build-tools-common/lib/plugin-logger'); | ||
@@ -23,3 +27,5 @@ | ||
beforeEach(function () { | ||
_pluginLogger2.default.set(__filename, logger = new _pluginLogger2.default()); | ||
babelIpc.set(__filename, { | ||
log: logger = new _pluginLogger2.default() | ||
}); | ||
}); | ||
@@ -26,0 +32,0 @@ |
@@ -55,3 +55,10 @@ 'use strict'; | ||
if (namespaceCount > 0) { | ||
_pluginLogger2.default.get(state).info('namespace-amd-define', 'Namespaced', namespaceCount, 'AMD defines'); | ||
var _babelIpc$get = babelIpc.get(state, function () { | ||
return { | ||
log: new _pluginLogger2.default() | ||
}; | ||
}), | ||
log = _babelIpc$get.log; | ||
log.info('namespace-amd-define', 'Namespaced', namespaceCount, 'AMD defines'); | ||
} | ||
@@ -64,2 +71,6 @@ } | ||
var _babelIpc = require('liferay-npm-build-tools-common/lib/babel-ipc'); | ||
var babelIpc = _interopRequireWildcard(_babelIpc); | ||
var _pluginLogger = require('liferay-npm-build-tools-common/lib/plugin-logger'); | ||
@@ -70,2 +81,4 @@ | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "babel-plugin-namespace-amd-define", | ||
"version": "1.7.0-alpha.1158492a", | ||
"version": "1.7.0-alpha.1b73ffed", | ||
"description": "A Babel plugin to namespace (prefix) AMD define() calls.", | ||
@@ -15,4 +15,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"liferay-npm-build-tools-common": "1.7.0-alpha.1158492a" | ||
"liferay-npm-build-tools-common": "1.7.0-alpha.1b73ffed" | ||
} | ||
} |
import * as babel from 'babel-core'; | ||
import * as babelIpc from 'liferay-npm-build-tools-common/lib/babel-ipc'; | ||
import PluginLogger from 'liferay-npm-build-tools-common/lib/plugin-logger'; | ||
@@ -8,3 +9,5 @@ import plugin from '../index'; | ||
beforeEach(() => { | ||
PluginLogger.set(__filename, (logger = new PluginLogger())); | ||
babelIpc.set(__filename, { | ||
log: (logger = new PluginLogger()), | ||
}); | ||
}); | ||
@@ -11,0 +14,0 @@ |
@@ -0,1 +1,2 @@ | ||
import * as babelIpc from 'liferay-npm-build-tools-common/lib/babel-ipc'; | ||
import PluginLogger from 'liferay-npm-build-tools-common/lib/plugin-logger'; | ||
@@ -65,3 +66,7 @@ | ||
if (namespaceCount > 0) { | ||
PluginLogger.get(state).info( | ||
const {log} = babelIpc.get(state, () => ({ | ||
log: new PluginLogger(), | ||
})); | ||
log.info( | ||
'namespace-amd-define', | ||
@@ -68,0 +73,0 @@ 'Namespaced', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
23391
330
+ Addedliferay-npm-build-tools-common@1.7.0-alpha.1b73ffed(transitive)
- Removedliferay-npm-build-tools-common@1.7.0-alpha.1158492a(transitive)