@farris/cli 2.0.0 → 2.0.2-ba-beta1
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/bin/index.js +2 -2
 - package/lib/commands/build-components.js +40 -0
 - package/lib/commands/build-components.js.map +1 -0
 - package/lib/commands/build-css.js +39 -0
 - package/lib/commands/build-css.js.map +1 -0
 - package/lib/commands/build-lib.js +26 -0
 - package/lib/commands/build-lib.js.map +1 -0
 - package/lib/commands/build.js +16 -0
 - package/lib/commands/build.js.map +1 -0
 - package/lib/commands/create-app.js +55 -0
 - package/lib/commands/create-app.js.map +1 -0
 - package/lib/commands/dev-serve.js +19 -0
 - package/lib/commands/dev-serve.js.map +1 -0
 - package/lib/commands/extract-i18n.js +75 -0
 - package/lib/commands/extract-i18n.js.map +1 -0
 - package/lib/commands/preview-serve.js +17 -0
 - package/lib/commands/preview-serve.js.map +1 -0
 - package/lib/common/constant.js +23 -0
 - package/lib/common/constant.js.map +1 -0
 - package/lib/common/generate-app.js +45 -0
 - package/lib/common/generate-app.js.map +1 -0
 - package/lib/common/get-dependencies.js +10 -0
 - package/lib/common/get-dependencies.js.map +1 -0
 - package/lib/common/get-farris-config.js +12 -0
 - package/lib/common/get-farris-config.js.map +1 -0
 - package/lib/common/get-version.js +7 -0
 - package/lib/common/get-version.js.map +1 -0
 - package/lib/common/get-vite-config.js +51 -0
 - package/lib/common/get-vite-config.js.map +1 -0
 - package/lib/config/vite-app.js +14 -0
 - package/lib/config/vite-app.js.map +1 -0
 - package/lib/config/vite-common.js +21 -0
 - package/lib/config/vite-common.js.map +1 -0
 - package/lib/config/vite-component.js +31 -0
 - package/lib/config/vite-component.js.map +1 -0
 - package/lib/config/vite-lib.js +27 -0
 - package/lib/config/vite-lib.js.map +1 -0
 - package/lib/index.js +84 -0
 - package/lib/index.js.map +1 -0
 - package/lib/plugins/create-component-style.js +46 -0
 - package/lib/plugins/create-component-style.js.map +1 -0
 - package/lib/plugins/create-package-json.js +34 -0
 - package/lib/plugins/create-package-json.js.map +1 -0
 - package/lib/plugins/dts.js +9 -0
 - package/lib/plugins/dts.js.map +1 -0
 - package/lib/plugins/html-system.js +12 -0
 - package/lib/plugins/html-system.js.map +1 -0
 - package/lib/plugins/replace.js +18 -0
 - package/lib/plugins/replace.js.map +1 -0
 - package/lib/plugins/systemjs-bundle.js +16 -0
 - package/lib/plugins/systemjs-bundle.js.map +1 -0
 - package/package.json +42 -40
 - package/templates/mobile/.eslintrc.cjs +15 -15
 - package/templates/mobile/.prettierrc.json +7 -7
 - package/templates/mobile/farris.config.mjs +24 -24
 - package/templates/mobile/index.html +12 -12
 - package/templates/mobile/package.json +28 -28
 - package/templates/mobile/src/App.vue +80 -80
 - package/templates/mobile/src/components/TheButton.vue +3 -3
 - package/templates/mobile/src/main.ts +12 -12
 - package/templates/mobile/src/router/index.ts +23 -23
 - package/templates/mobile/src/views/AboutView.vue +15 -15
 - package/templates/mobile/src/views/HomeView.vue +9 -9
 - package/templates/mobile/tsconfig.json +17 -17
 - package/templates/web/.eslintrc.cjs +15 -15
 - package/templates/web/.prettierrc.json +7 -7
 - package/templates/web/farris.config.mjs +24 -24
 - package/templates/web/index.html +12 -12
 - package/templates/web/package.json +28 -28
 - package/templates/web/src/App.vue +80 -80
 - package/templates/web/src/components/TheButton.vue +3 -3
 - package/templates/web/src/main.ts +10 -10
 - package/templates/web/src/router/index.ts +23 -23
 - package/templates/web/src/views/AboutView.vue +15 -15
 - package/templates/web/src/views/HomeView.vue +9 -9
 - package/templates/web/tsconfig.json +17 -17
 
| 
         @@ -1,3 +1,3 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            <template>
         
     | 
| 
       2 
     | 
    
         
            -
              <f-button>按钮</f-button>
         
     | 
| 
       3 
     | 
    
         
            -
            </template>
         
     | 
| 
      
 1 
     | 
    
         
            +
            <template>
         
     | 
| 
      
 2 
     | 
    
         
            +
              <f-button>按钮</f-button>
         
     | 
| 
      
 3 
     | 
    
         
            +
            </template>
         
     | 
| 
         @@ -1,10 +1,10 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            import { createApp } from 'vue'
         
     | 
| 
       2 
     | 
    
         
            -
            import FarrisVue from '@farris/ui-vue'
         
     | 
| 
       3 
     | 
    
         
            -
            import App from './App.vue'
         
     | 
| 
       4 
     | 
    
         
            -
            import router from './router'
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            const app = createApp(App)
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
            app.use(router).use(FarrisVue)
         
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
            app.mount('#app')
         
     | 
| 
      
 1 
     | 
    
         
            +
            import { createApp } from 'vue';
         
     | 
| 
      
 2 
     | 
    
         
            +
            import FarrisVue from '@farris/ui-vue';
         
     | 
| 
      
 3 
     | 
    
         
            +
            import App from './App.vue';
         
     | 
| 
      
 4 
     | 
    
         
            +
            import router from './router';
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            const app = createApp(App);
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            app.use(router).use(FarrisVue);
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            app.mount('#app');
         
     | 
| 
         @@ -1,23 +1,23 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            import { createRouter, createWebHistory } from 'vue-router'
         
     | 
| 
       2 
     | 
    
         
            -
            import HomeView from '../views/HomeView.vue'
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            const router = createRouter({
         
     | 
| 
       5 
     | 
    
         
            -
              history: createWebHistory(import.meta.env.BASE_URL),
         
     | 
| 
       6 
     | 
    
         
            -
              routes: [
         
     | 
| 
       7 
     | 
    
         
            -
                {
         
     | 
| 
       8 
     | 
    
         
            -
                  path: '/',
         
     | 
| 
       9 
     | 
    
         
            -
                  name: 'home',
         
     | 
| 
       10 
     | 
    
         
            -
                  component: HomeView
         
     | 
| 
       11 
     | 
    
         
            -
                },
         
     | 
| 
       12 
     | 
    
         
            -
                {
         
     | 
| 
       13 
     | 
    
         
            -
                  path: '/about',
         
     | 
| 
       14 
     | 
    
         
            -
                  name: 'about',
         
     | 
| 
       15 
     | 
    
         
            -
                  // route level code-splitting
         
     | 
| 
       16 
     | 
    
         
            -
                  // this generates a separate chunk (About.[hash].js) for this route
         
     | 
| 
       17 
     | 
    
         
            -
                  // which is lazy-loaded when the route is visited.
         
     | 
| 
       18 
     | 
    
         
            -
                  component: () => import('../views/AboutView.vue')
         
     | 
| 
       19 
     | 
    
         
            -
                }
         
     | 
| 
       20 
     | 
    
         
            -
              ]
         
     | 
| 
       21 
     | 
    
         
            -
            })
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
            export default router
         
     | 
| 
      
 1 
     | 
    
         
            +
            import { createRouter, createWebHistory } from 'vue-router';
         
     | 
| 
      
 2 
     | 
    
         
            +
            import HomeView from '../views/HomeView.vue';
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            const router = createRouter({
         
     | 
| 
      
 5 
     | 
    
         
            +
              history: createWebHistory(import.meta.env.BASE_URL),
         
     | 
| 
      
 6 
     | 
    
         
            +
              routes: [
         
     | 
| 
      
 7 
     | 
    
         
            +
                {
         
     | 
| 
      
 8 
     | 
    
         
            +
                  path: '/',
         
     | 
| 
      
 9 
     | 
    
         
            +
                  name: 'home',
         
     | 
| 
      
 10 
     | 
    
         
            +
                  component: HomeView
         
     | 
| 
      
 11 
     | 
    
         
            +
                },
         
     | 
| 
      
 12 
     | 
    
         
            +
                {
         
     | 
| 
      
 13 
     | 
    
         
            +
                  path: '/about',
         
     | 
| 
      
 14 
     | 
    
         
            +
                  name: 'about',
         
     | 
| 
      
 15 
     | 
    
         
            +
                  // route level code-splitting
         
     | 
| 
      
 16 
     | 
    
         
            +
                  // this generates a separate chunk (About.[hash].js) for this route
         
     | 
| 
      
 17 
     | 
    
         
            +
                  // which is lazy-loaded when the route is visited.
         
     | 
| 
      
 18 
     | 
    
         
            +
                  component: () => import('../views/AboutView.vue')
         
     | 
| 
      
 19 
     | 
    
         
            +
                }
         
     | 
| 
      
 20 
     | 
    
         
            +
              ]
         
     | 
| 
      
 21 
     | 
    
         
            +
            });
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            export default router;
         
     | 
| 
         @@ -1,15 +1,15 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            <template>
         
     | 
| 
       2 
     | 
    
         
            -
              <div class="about">
         
     | 
| 
       3 
     | 
    
         
            -
                <h1>This is an about page</h1>
         
     | 
| 
       4 
     | 
    
         
            -
              </div>
         
     | 
| 
       5 
     | 
    
         
            -
            </template>
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            <style>
         
     | 
| 
       8 
     | 
    
         
            -
            @media (min-width: 1024px) {
         
     | 
| 
       9 
     | 
    
         
            -
              .about {
         
     | 
| 
       10 
     | 
    
         
            -
                min-height: 100vh;
         
     | 
| 
       11 
     | 
    
         
            -
                display: flex;
         
     | 
| 
       12 
     | 
    
         
            -
                align-items: center;
         
     | 
| 
       13 
     | 
    
         
            -
              }
         
     | 
| 
       14 
     | 
    
         
            -
            }
         
     | 
| 
       15 
     | 
    
         
            -
            </style>
         
     | 
| 
      
 1 
     | 
    
         
            +
            <template>
         
     | 
| 
      
 2 
     | 
    
         
            +
              <div class="about">
         
     | 
| 
      
 3 
     | 
    
         
            +
                <h1>This is an about page</h1>
         
     | 
| 
      
 4 
     | 
    
         
            +
              </div>
         
     | 
| 
      
 5 
     | 
    
         
            +
            </template>
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            <style>
         
     | 
| 
      
 8 
     | 
    
         
            +
            @media (min-width: 1024px) {
         
     | 
| 
      
 9 
     | 
    
         
            +
              .about {
         
     | 
| 
      
 10 
     | 
    
         
            +
                min-height: 100vh;
         
     | 
| 
      
 11 
     | 
    
         
            +
                display: flex;
         
     | 
| 
      
 12 
     | 
    
         
            +
                align-items: center;
         
     | 
| 
      
 13 
     | 
    
         
            +
              }
         
     | 
| 
      
 14 
     | 
    
         
            +
            }
         
     | 
| 
      
 15 
     | 
    
         
            +
            </style>
         
     | 
| 
         @@ -1,9 +1,9 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            <script setup lang="ts">
         
     | 
| 
       2 
     | 
    
         
            -
            import TheButton from '../components/TheButton.vue'
         
     | 
| 
       3 
     | 
    
         
            -
            </script>
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            <template>
         
     | 
| 
       6 
     | 
    
         
            -
              <main>
         
     | 
| 
       7 
     | 
    
         
            -
                <TheButton />
         
     | 
| 
       8 
     | 
    
         
            -
              </main>
         
     | 
| 
       9 
     | 
    
         
            -
            </template>
         
     | 
| 
      
 1 
     | 
    
         
            +
            <script setup lang="ts">
         
     | 
| 
      
 2 
     | 
    
         
            +
            import TheButton from '../components/TheButton.vue';
         
     | 
| 
      
 3 
     | 
    
         
            +
            </script>
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            <template>
         
     | 
| 
      
 6 
     | 
    
         
            +
              <main>
         
     | 
| 
      
 7 
     | 
    
         
            +
                <TheButton />
         
     | 
| 
      
 8 
     | 
    
         
            +
              </main>
         
     | 
| 
      
 9 
     | 
    
         
            +
            </template>
         
     | 
| 
         @@ -1,18 +1,18 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {
         
     | 
| 
       2 
     | 
    
         
            -
              "extends": "@vue/tsconfig/tsconfig.dom.json",
         
     | 
| 
       3 
     | 
    
         
            -
              "include": [
         
     | 
| 
       4 
     | 
    
         
            -
                "env.d.ts",
         
     | 
| 
       5 
     | 
    
         
            -
                "src/**/*",
         
     | 
| 
       6 
     | 
    
         
            -
                "src/**/*.vue"
         
     | 
| 
       7 
     | 
    
         
            -
              ],
         
     | 
| 
       8 
     | 
    
         
            -
              "compilerOptions": {
         
     | 
| 
       9 
     | 
    
         
            -
                "composite": true,
         
     | 
| 
       10 
     | 
    
         
            -
                "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
         
     | 
| 
       11 
     | 
    
         
            -
                "baseUrl": ".",
         
     | 
| 
       12 
     | 
    
         
            -
                "paths": {
         
     | 
| 
       13 
     | 
    
         
            -
                  "@/*": [
         
     | 
| 
       14 
     | 
    
         
            -
                    "./src/*"
         
     | 
| 
       15 
     | 
    
         
            -
                  ]
         
     | 
| 
       16 
     | 
    
         
            -
                }
         
     | 
| 
       17 
     | 
    
         
            -
              }
         
     | 
| 
      
 1 
     | 
    
         
            +
            {
         
     | 
| 
      
 2 
     | 
    
         
            +
              "extends": "@vue/tsconfig/tsconfig.dom.json",
         
     | 
| 
      
 3 
     | 
    
         
            +
              "include": [
         
     | 
| 
      
 4 
     | 
    
         
            +
                "env.d.ts",
         
     | 
| 
      
 5 
     | 
    
         
            +
                "src/**/*",
         
     | 
| 
      
 6 
     | 
    
         
            +
                "src/**/*.vue"
         
     | 
| 
      
 7 
     | 
    
         
            +
              ],
         
     | 
| 
      
 8 
     | 
    
         
            +
              "compilerOptions": {
         
     | 
| 
      
 9 
     | 
    
         
            +
                "composite": true,
         
     | 
| 
      
 10 
     | 
    
         
            +
                "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
         
     | 
| 
      
 11 
     | 
    
         
            +
                "baseUrl": ".",
         
     | 
| 
      
 12 
     | 
    
         
            +
                "paths": {
         
     | 
| 
      
 13 
     | 
    
         
            +
                  "@/*": [
         
     | 
| 
      
 14 
     | 
    
         
            +
                    "./src/*"
         
     | 
| 
      
 15 
     | 
    
         
            +
                  ]
         
     | 
| 
      
 16 
     | 
    
         
            +
                }
         
     | 
| 
      
 17 
     | 
    
         
            +
              }
         
     | 
| 
       18 
18 
     | 
    
         
             
            }
         
     |