@widlarzgroup/docusaurus-ui 0.1.0 → 0.1.1
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/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -3
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +5 -3
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAmCtE;AAED,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -22,11 +22,13 @@ exports.default = themeDocusaurusUI;
|
|
|
22
22
|
const path_1 = __importDefault(require("path"));
|
|
23
23
|
function themeDocusaurusUI(context) {
|
|
24
24
|
const isDev = process.env.NODE_ENV === 'development';
|
|
25
|
+
// Only use source files in local monorepo development
|
|
26
|
+
// When installed from npm, always use compiled lib
|
|
27
|
+
const isLocalDev = isDev && !__dirname.split(path_1.default.sep).includes('node_modules');
|
|
25
28
|
return {
|
|
26
29
|
name: '@widlarzgroup/docusaurus-ui',
|
|
27
30
|
getThemePath() {
|
|
28
|
-
|
|
29
|
-
return isDev ? '../src/theme' : '../lib/theme';
|
|
31
|
+
return isLocalDev ? '../src/theme' : '../lib/theme';
|
|
30
32
|
},
|
|
31
33
|
getTypeScriptThemePath() {
|
|
32
34
|
return '../src/theme';
|
|
@@ -36,7 +38,7 @@ function themeDocusaurusUI(context) {
|
|
|
36
38
|
},
|
|
37
39
|
// Configure webpack to handle TypeScript and path aliases from source
|
|
38
40
|
configureWebpack(config, isServer, utils) {
|
|
39
|
-
if (!
|
|
41
|
+
if (!isLocalDev)
|
|
40
42
|
return {};
|
|
41
43
|
return {
|
|
42
44
|
resolve: {
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,oCAmCC;AAtCD,gDAAwB;AAGxB,SAAwB,iBAAiB,CAAC,OAAoB;IAC5D,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC;IACrD,sDAAsD;IACtD,mDAAmD;IACnD,MAAM,UAAU,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,cAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAEhF,OAAO;QACL,IAAI,EAAE,6BAA6B;QAEnC,YAAY;YACV,OAAO,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC;QACtD,CAAC;QAED,sBAAsB;YACpB,OAAO,cAAc,CAAC;QACxB,CAAC;QAED,gBAAgB;YACd,OAAO,CAAC,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAC;QACvD,CAAC;QAED,sEAAsE;QACtE,gBAAgB,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK;YACtC,IAAI,CAAC,UAAU;gBAAE,OAAO,EAAE,CAAC;YAE3B,OAAO;gBACL,OAAO,EAAE;oBACP,KAAK,EAAE;wBACL,yCAAyC;wBACzC,GAAG,EAAE,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC;qBACvC;iBACF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,kDAAgC;AAChC,+EAA8E;AAArE,4IAAA,4BAA4B,OAAA"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -3,13 +3,15 @@ import type { LoadContext, Plugin } from '@docusaurus/types';
|
|
|
3
3
|
|
|
4
4
|
export default function themeDocusaurusUI(context: LoadContext): Plugin {
|
|
5
5
|
const isDev = process.env.NODE_ENV === 'development';
|
|
6
|
+
// Only use source files in local monorepo development
|
|
7
|
+
// When installed from npm, always use compiled lib
|
|
8
|
+
const isLocalDev = isDev && !__dirname.split(path.sep).includes('node_modules');
|
|
6
9
|
|
|
7
10
|
return {
|
|
8
11
|
name: '@widlarzgroup/docusaurus-ui',
|
|
9
12
|
|
|
10
13
|
getThemePath() {
|
|
11
|
-
|
|
12
|
-
return isDev ? '../src/theme' : '../lib/theme';
|
|
14
|
+
return isLocalDev ? '../src/theme' : '../lib/theme';
|
|
13
15
|
},
|
|
14
16
|
|
|
15
17
|
getTypeScriptThemePath() {
|
|
@@ -22,7 +24,7 @@ export default function themeDocusaurusUI(context: LoadContext): Plugin {
|
|
|
22
24
|
|
|
23
25
|
// Configure webpack to handle TypeScript and path aliases from source
|
|
24
26
|
configureWebpack(config, isServer, utils) {
|
|
25
|
-
if (!
|
|
27
|
+
if (!isLocalDev) return {};
|
|
26
28
|
|
|
27
29
|
return {
|
|
28
30
|
resolve: {
|