vueless 0.0.44 → 0.0.46
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/README.md +16 -4
- package/index.js +16 -0
- package/package.json +1 -1
- package/web-types.json +1 -1
package/README.md
CHANGED
|
@@ -14,16 +14,28 @@
|
|
|
14
14
|
npm install vueless @vueless/plugin-vite
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
2. Create `vueless.config.js` at the root of the project.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
2. In the file where you create the Vue application, add the following code:
|
|
19
|
+
```javascript
|
|
20
|
+
import { createApp } from 'vue';
|
|
21
|
+
import { createVueless } from "vueless";
|
|
22
|
+
import App from './App.vue';
|
|
23
|
+
|
|
24
|
+
const vueless = createVueless();
|
|
25
|
+
|
|
26
|
+
createApp(App).use(vueless).mount('#app');
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
3. Create `vueless.config.js` at the root of the project.
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
20
32
|
export default {
|
|
21
33
|
color: {},
|
|
22
34
|
component: {},
|
|
23
35
|
};
|
|
24
36
|
```
|
|
25
37
|
|
|
26
|
-
|
|
38
|
+
4. Add TailwindCSS preset.
|
|
27
39
|
|
|
28
40
|
```javascript
|
|
29
41
|
import { vuelessPreset } from "vueless/preset.tailwind";
|
|
@@ -34,7 +46,7 @@ export default {
|
|
|
34
46
|
};
|
|
35
47
|
```
|
|
36
48
|
|
|
37
|
-
|
|
49
|
+
5. Add Vite plugins.
|
|
38
50
|
|
|
39
51
|
```javascript
|
|
40
52
|
import { Vueless, VuelessUnpluginComponents } from "@vueless/plugin-vite";
|
package/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createLocale, LocaleSymbol } from "./composable.locale";
|
|
2
|
+
|
|
3
|
+
export { default as createVueI18nAdapter } from "./adatper.locale/vue-i18n";
|
|
4
|
+
export { default as defaultEnLocale } from "./adatper.locale/locales/en";
|
|
5
|
+
|
|
6
|
+
export function createVueless(options = {}) {
|
|
7
|
+
const locale = createLocale(options.locale);
|
|
8
|
+
|
|
9
|
+
const install = (app) => {
|
|
10
|
+
app.provide(LocaleSymbol, locale);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
return {
|
|
14
|
+
install,
|
|
15
|
+
};
|
|
16
|
+
}
|
package/package.json
CHANGED