binhend 2.1.5 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/web/index.js +6 -1
package/package.json
CHANGED
package/src/web/index.js
CHANGED
|
@@ -14,7 +14,7 @@ function WebBuilder(source, { output, external } = {}) {
|
|
|
14
14
|
source = path.resolve(source);
|
|
15
15
|
output = isString(output) ? output : 'build';
|
|
16
16
|
|
|
17
|
-
if (source === path.resolve(output)) throw new Error(`[BINHEND][WEB] Location of build output & source code should
|
|
17
|
+
if (source === path.resolve(output)) throw new Error(`[BINHEND][WEB] Location of build output & source code should NOT be the same: ${source}`);
|
|
18
18
|
|
|
19
19
|
var module = path.resolve(output, 'module');
|
|
20
20
|
var web = path.resolve(output, 'web');
|
|
@@ -28,6 +28,11 @@ function WebBuilder(source, { output, external } = {}) {
|
|
|
28
28
|
ComponentFormat.generate(source, module, () => ComponentBuild.lazyload({ source, web, module, external }));
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
this.modulify = (outputModulePath) => {
|
|
32
|
+
outputModulePath = isString(outputModulePath) ? path.resolve(outputModulePath) : module;
|
|
33
|
+
ComponentFormat.generate(source, outputModulePath);
|
|
34
|
+
};
|
|
35
|
+
|
|
31
36
|
this.path = () => {
|
|
32
37
|
return web;
|
|
33
38
|
};
|