anubis-ui 1.2.3 → 1.2.4
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/index.d.ts +10 -4
- package/index.js +10 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { IEnvConfig } from './dist/interfaces/config.interface';
|
|
2
|
-
|
|
3
1
|
declare module 'anubis-ui' {
|
|
4
2
|
import type { Plugin } from 'vite';
|
|
3
|
+
import type { IEnvConfig } from './dist/interfaces/config.interface';
|
|
4
|
+
|
|
5
|
+
const plugin: Plugin;
|
|
6
|
+
const config: IEnvConfig;
|
|
7
|
+
|
|
8
|
+
const anubis: {
|
|
9
|
+
plugin: typeof plugin;
|
|
10
|
+
config: typeof config;
|
|
11
|
+
};
|
|
5
12
|
|
|
6
|
-
export
|
|
7
|
-
export const config: IEnvConfig;
|
|
13
|
+
export default anubis;
|
|
8
14
|
}
|
package/index.js
CHANGED
|
@@ -40,11 +40,19 @@ function AnubisUI() {
|
|
|
40
40
|
name: 'anubis-ui',
|
|
41
41
|
configureServer(server) {
|
|
42
42
|
server.watcher.on('change', async (file) => {
|
|
43
|
-
|
|
43
|
+
if (typeof process !== 'undefined' && process.versions && process.versions.node) {
|
|
44
|
+
await refresh(file)
|
|
45
|
+
} else {
|
|
46
|
+
log('Trying to build in a not Node environment, aborting')
|
|
47
|
+
}
|
|
44
48
|
});
|
|
45
49
|
},
|
|
46
50
|
async buildStart() {
|
|
47
|
-
|
|
51
|
+
if (typeof process !== 'undefined' && process.versions && process.versions.node) {
|
|
52
|
+
await init();
|
|
53
|
+
} else {
|
|
54
|
+
log('Trying to build in a not Node environment, aborting')
|
|
55
|
+
}
|
|
48
56
|
}
|
|
49
57
|
};
|
|
50
58
|
}
|