├── .circleci └── config.yml ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .github ├── COMMIT_CONVENTION.md ├── CONTRIBUTING.md ├── FUNDING.yml ├── ISSUE_TEMPLATE │ └── config.yml └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .tidelift.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── __mocks__ ├── fs.js └── inquirer.js ├── appveyor.yml ├── docs ├── .vitepress │ ├── config.js │ ├── self-destroying-service-worker.js │ └── theme │ │ ├── AlgoliaSearchBox.vue │ │ ├── custom.css │ │ ├── index.js │ │ └── search.svg ├── assets │ ├── en-vue-cli-ui-schema.ai │ └── ru-vue-cli-ui-schema.ai ├── config │ └── index.md ├── core-plugins │ ├── babel.md │ ├── e2e-cypress.md │ ├── e2e-nightwatch.md │ ├── e2e-webdriverio.md │ ├── eslint.md │ ├── index.md │ ├── pwa.md │ ├── router.md │ ├── typescript.md │ ├── unit-jest.md │ ├── unit-mocha.md │ └── vuex.md ├── dev-guide │ ├── generator-api.md │ ├── plugin-api.md │ ├── plugin-dev.md │ ├── ui-api.md │ ├── ui-info.md │ └── ui-localization.md ├── guide │ ├── browser-compatibility.md │ ├── build-targets.md │ ├── cli-service.md │ ├── creating-a-project.md │ ├── css.md │ ├── deployment.md │ ├── html-and-static-assets.md │ ├── index.md │ ├── installation.md │ ├── mode-and-env.md │ ├── plugins-and-presets.md │ ├── prototyping.md │ ├── troubleshooting.md │ └── webpack.md ├── index.md ├── migrations │ ├── migrate-from-v3.md │ └── migrate-from-v4.md ├── public │ ├── bit-wide.png │ ├── cli-new-project.png │ ├── cli-select-features.png │ ├── config-ui.png │ ├── custom-view.png │ ├── favicon.png │ ├── generator-template.png │ ├── icons │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-180x180.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── apple-touch-icon.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── msapplication-icon-144x144.png │ │ ├── mstile-150x150.png │ │ └── safari-pinned-tab.svg │ ├── manifest.json │ ├── plugin-search-item.png │ ├── plugins.png │ ├── prompts-example.png │ ├── ru │ │ └── vue-cli-ui-schema.png │ ├── screenshot.png │ ├── suggestion.png │ ├── task-view.png │ ├── tasks-ui.png │ ├── ui-analyzer.png │ ├── ui-browse-local-plugin.png │ ├── ui-config-start.png │ ├── ui-configuration-default.png │ ├── ui-configuration.png │ ├── ui-greet-task.png │ ├── ui-new-project.png │ ├── ui-plugin-refresh.png │ ├── ui-project-manager.png │ ├── ui-prompts.png │ ├── ui-select-plugin.png │ └── vue-cli-ui-schema.png ├── ru │ ├── config │ │ └── index.md │ ├── core-plugins │ │ ├── babel.md │ │ ├── e2e-cypress.md │ │ ├── e2e-nightwatch.md │ │ ├── e2e-webdriverio.md │ │ ├── eslint.md │ │ ├── index.md │ │ ├── pwa.md │ │ ├── router.md │ │ ├── typescript.md │ │ ├── unit-jest.md │ │ ├── unit-mocha.md │ │ └── vuex.md │ ├── dev-guide │ │ ├── generator-api.md │ │ ├── plugin-api.md │ │ ├── plugin-dev.md │ │ ├── ui-api.md │ │ ├── ui-info.md │ │ └── ui-localization.md │ ├── guide │ │ ├── browser-compatibility.md │ │ ├── build-targets.md │ │ ├── cli-service.md │ │ ├── creating-a-project.md │ │ ├── css.md │ │ ├── deployment.md │ │ ├── html-and-static-assets.md │ │ ├── index.md │ │ ├── installation.md │ │ ├── mode-and-env.md │ │ ├── plugins-and-presets.md │ │ ├── prototyping.md │ │ ├── troubleshooting.md │ │ └── webpack.md │ ├── index.md │ └── migrating-from-v3 │ │ └── index.md └── zh │ ├── config │ └── index.md │ ├── dev-guide │ ├── plugin-dev.md │ ├── ui-api.md │ ├── ui-info.md │ └── ui-localization.md │ ├── guide │ ├── browser-compatibility.md │ ├── build-targets.md │ ├── cli-service.md │ ├── creating-a-project.md │ ├── css.md │ ├── deployment.md │ ├── html-and-static-assets.md │ ├── index.md │ ├── installation.md │ ├── mode-and-env.md │ ├── plugins-and-presets.md │ ├── prototyping.md │ └── webpack.md │ └── index.md ├── jest.config.js ├── lerna.json ├── package.json ├── packages ├── @vue │ ├── babel-preset-app │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ └── babel-preset.spec.js │ │ ├── index.js │ │ ├── package.json │ │ └── polyfillsPlugin.js │ ├── cli-init │ │ ├── .npmignore │ │ ├── README.md │ │ ├── index.js │ │ └── package.json │ ├── cli-overlay │ │ ├── .npmignore │ │ ├── README.md │ │ ├── package.json │ │ └── src │ │ │ └── index.js │ ├── cli-plugin-babel │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ ├── babelMigrator.spec.js │ │ │ ├── babelRuntime.spec.js │ │ │ └── transpileDependencies.spec.js │ │ ├── codemods │ │ │ ├── __testfixtures__ │ │ │ │ ├── customConfig.input.js │ │ │ │ ├── customConfig.output.js │ │ │ │ ├── default.input.js │ │ │ │ ├── default.output.js │ │ │ │ ├── doubleQuote.input.js │ │ │ │ ├── doubleQuote.output.js │ │ │ │ ├── require.input.js │ │ │ │ ├── require.output.js │ │ │ │ ├── templateLiteral.input.js │ │ │ │ └── templateLiteral.output.js │ │ │ ├── __tests__ │ │ │ │ └── usePluginPreset.spec.js │ │ │ └── usePluginPreset.js │ │ ├── generator.js │ │ ├── index.js │ │ ├── logo.png │ │ ├── migrator │ │ │ └── index.js │ │ ├── package.json │ │ └── preset.js │ ├── cli-plugin-e2e-cypress │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ └── cypressPlugin.spec.js │ │ ├── generator │ │ │ ├── index.js │ │ │ └── template │ │ │ │ ├── cypress.json │ │ │ │ └── tests │ │ │ │ └── e2e │ │ │ │ ├── _eslintrc.js │ │ │ │ ├── plugins │ │ │ │ └── index.js │ │ │ │ ├── specs │ │ │ │ └── test.js │ │ │ │ └── support │ │ │ │ ├── commands.js │ │ │ │ └── index.js │ │ ├── index.js │ │ ├── logo.png │ │ ├── migrator │ │ │ └── index.js │ │ ├── package.json │ │ └── ui.js │ ├── cli-plugin-e2e-nightwatch │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ ├── lib │ │ │ │ ├── globals-gecko.js │ │ │ │ ├── globals-generated.js │ │ │ │ └── nightwatch.conf.js │ │ │ └── nightwatchPlugin.spec.js │ │ ├── generator │ │ │ ├── index.js │ │ │ └── template │ │ │ │ └── tests │ │ │ │ └── e2e │ │ │ │ ├── _eslintrc.js │ │ │ │ ├── custom-assertions │ │ │ │ └── elementCount.js │ │ │ │ ├── custom-commands │ │ │ │ ├── customExecute.js │ │ │ │ ├── openHomepage.js │ │ │ │ └── openHomepageClass.js │ │ │ │ ├── globals.js │ │ │ │ ├── page-objects │ │ │ │ └── homepage.js │ │ │ │ └── specs │ │ │ │ ├── test-with-pageobjects.js │ │ │ │ └── test.js │ │ ├── index.js │ │ ├── logo.png │ │ ├── nightwatch.conf.js │ │ ├── package.json │ │ ├── prompts.js │ │ └── ui.js │ ├── cli-plugin-e2e-webdriverio │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ ├── wdioGenerator.spec.js │ │ │ └── wdioPlugin.spec.js │ │ ├── generator │ │ │ ├── index.js │ │ │ └── template │ │ │ │ ├── tests │ │ │ │ └── e2e │ │ │ │ │ ├── _eslintrc.js │ │ │ │ │ ├── logs │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── pageobjects │ │ │ │ │ └── app.page.js │ │ │ │ │ └── specs │ │ │ │ │ └── app.spec.js │ │ │ │ ├── wdio.local.conf.js │ │ │ │ ├── wdio.sauce.conf.js │ │ │ │ └── wdio.shared.conf.js │ │ ├── index.js │ │ ├── migrator │ │ │ └── index.js │ │ ├── package.json │ │ ├── prompts.js │ │ └── ui.js │ ├── cli-plugin-eslint │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ ├── eslint8.spec.js │ │ │ ├── eslintGenerator.spec.js │ │ │ ├── eslintMigrator.spec.js │ │ │ ├── eslintPlugin.spec.js │ │ │ ├── eslintVue3.spec.js │ │ │ └── ui.spec.js │ │ ├── eslintDeps.js │ │ ├── eslintOptions.js │ │ ├── generator │ │ │ ├── index.js │ │ │ └── template │ │ │ │ ├── airbnb │ │ │ │ └── _editorconfig │ │ │ │ └── standard │ │ │ │ └── _editorconfig │ │ ├── index.js │ │ ├── lint.js │ │ ├── logo.png │ │ ├── migrator │ │ │ └── index.js │ │ ├── package.json │ │ ├── prompts.js │ │ └── ui │ │ │ ├── configDescriptor.js │ │ │ ├── index.js │ │ │ └── taskDescriptor.js │ ├── cli-plugin-pwa │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ ├── pwaGenerator.spec.js │ │ │ └── pwaPlugin.spec.js │ │ ├── generator │ │ │ ├── index.js │ │ │ └── template │ │ │ │ ├── public │ │ │ │ ├── img │ │ │ │ │ └── icons │ │ │ │ │ │ ├── android-chrome-192x192.png │ │ │ │ │ │ ├── android-chrome-512x512.png │ │ │ │ │ │ ├── android-chrome-maskable-192x192.png │ │ │ │ │ │ ├── android-chrome-maskable-512x512.png │ │ │ │ │ │ ├── apple-touch-icon-120x120.png │ │ │ │ │ │ ├── apple-touch-icon-152x152.png │ │ │ │ │ │ ├── apple-touch-icon-180x180.png │ │ │ │ │ │ ├── apple-touch-icon-60x60.png │ │ │ │ │ │ ├── apple-touch-icon-76x76.png │ │ │ │ │ │ ├── apple-touch-icon.png │ │ │ │ │ │ ├── favicon-16x16.png │ │ │ │ │ │ ├── favicon-32x32.png │ │ │ │ │ │ ├── msapplication-icon-144x144.png │ │ │ │ │ │ ├── mstile-150x150.png │ │ │ │ │ │ └── safari-pinned-tab.svg │ │ │ │ └── robots.txt │ │ │ │ └── src │ │ │ │ └── registerServiceWorker.js │ │ ├── index.js │ │ ├── lib │ │ │ ├── HtmlPwaPlugin.js │ │ │ ├── noopServiceWorker.js │ │ │ └── noopServiceWorkerMiddleware.js │ │ ├── logo.png │ │ ├── logo.svg │ │ ├── package.json │ │ └── ui.js │ ├── cli-plugin-router │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ └── routerGenerator.spec.js │ │ ├── generator │ │ │ ├── index.js │ │ │ ├── injectUseRouter.js │ │ │ ├── template-vue3 │ │ │ │ └── src │ │ │ │ │ ├── App.vue │ │ │ │ │ └── router │ │ │ │ │ └── index.js │ │ │ └── template │ │ │ │ └── src │ │ │ │ ├── App.vue │ │ │ │ ├── router │ │ │ │ └── index.js │ │ │ │ └── views │ │ │ │ ├── AboutView.vue │ │ │ │ └── HomeView.vue │ │ ├── index.js │ │ ├── package.json │ │ └── prompts.js │ ├── cli-plugin-typescript │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ ├── tsGenerator.spec.js │ │ │ ├── tsMochaPlugin.spec.js │ │ │ ├── tsPlugin.helper.js │ │ │ ├── tsPluginBabel.spec.js │ │ │ ├── tsPluginClassComponent.spec.js │ │ │ ├── tsPluginDefault.spec.js │ │ │ ├── tsPluginE2e.spec.js │ │ │ ├── tsPluginESLint.spec.js │ │ │ ├── tsPluginUnit.spec.js │ │ │ └── tsPluginVue3.spec.js │ │ ├── codemods │ │ │ ├── __testfixtures__ │ │ │ │ ├── shims-vue.input.ts │ │ │ │ └── shims-vue.output.ts │ │ │ ├── __tests__ │ │ │ │ └── migrateComponentType.spec.js │ │ │ └── migrateComponentType.js │ │ ├── generator │ │ │ ├── convert.js │ │ │ ├── index.js │ │ │ ├── template-vue3 │ │ │ │ └── src │ │ │ │ │ ├── App.vue │ │ │ │ │ ├── components │ │ │ │ │ └── HelloWorld.vue │ │ │ │ │ ├── shims-vue.d.ts │ │ │ │ │ └── views │ │ │ │ │ └── HomeView.vue │ │ │ └── template │ │ │ │ ├── src │ │ │ │ ├── App.vue │ │ │ │ ├── components │ │ │ │ │ └── HelloWorld.vue │ │ │ │ ├── shims-tsx.d.ts │ │ │ │ ├── shims-vue.d.ts │ │ │ │ └── views │ │ │ │ │ └── HomeView.vue │ │ │ │ └── tsconfig.json │ │ ├── index.js │ │ ├── logo.png │ │ ├── migrator │ │ │ └── index.js │ │ ├── package.json │ │ └── prompts.js │ ├── cli-plugin-unit-jest │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ ├── jestGenerator.spec.js │ │ │ ├── jestPlugin.spec.js │ │ │ └── jestPluginVue3.spec.js │ │ ├── generator │ │ │ ├── index.js │ │ │ └── template │ │ │ │ └── tests │ │ │ │ └── unit │ │ │ │ ├── example.spec.js │ │ │ │ └── example.spec.ts │ │ ├── index.js │ │ ├── jest-preset.js │ │ ├── logo.png │ │ ├── migrator │ │ │ └── index.js │ │ ├── package.json │ │ ├── presets │ │ │ ├── default │ │ │ │ └── jest-preset.js │ │ │ ├── no-babel │ │ │ │ ├── esmoduleTransformer.js │ │ │ │ └── jest-preset.js │ │ │ ├── typescript-and-babel │ │ │ │ └── jest-preset.js │ │ │ └── typescript │ │ │ │ └── jest-preset.js │ │ └── ui.js │ ├── cli-plugin-unit-mocha │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ ├── mochaGenerator.spec.js │ │ │ ├── mochaPlugin.spec.js │ │ │ └── mochaPluginVue3.spec.js │ │ ├── generator │ │ │ ├── index.js │ │ │ └── template │ │ │ │ └── tests │ │ │ │ └── unit │ │ │ │ ├── example.spec.js │ │ │ │ └── example.spec.ts │ │ ├── index.js │ │ ├── logo.png │ │ ├── package.json │ │ ├── setup.js │ │ └── ui.js │ ├── cli-plugin-vuex │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ └── vuexGenerator.spec.js │ │ ├── generator │ │ │ ├── index.js │ │ │ ├── injectUseStore.js │ │ │ ├── template-vue3 │ │ │ │ └── src │ │ │ │ │ └── store │ │ │ │ │ └── index.js │ │ │ └── template │ │ │ │ └── src │ │ │ │ └── store │ │ │ │ └── index.js │ │ ├── index.js │ │ └── package.json │ ├── cli-service │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ ├── Service.spec.js │ │ │ ├── ServiceESM.spec.js │ │ │ ├── build.spec.js │ │ │ ├── buildLib.spec.js │ │ │ ├── buildLibFormats.spec.js │ │ │ ├── buildWc.spec.js │ │ │ ├── buildWcAsync.spec.js │ │ │ ├── cors.spec.js │ │ │ ├── css.spec.js │ │ │ ├── cssPreprocessors.spec.js │ │ │ ├── generator.spec.js │ │ │ ├── modernMode.spec.js │ │ │ ├── multiPage.spec.js │ │ │ ├── proxy.spec.js │ │ │ ├── serve.spec.js │ │ │ └── serveVue3.spec.js │ │ ├── bin │ │ │ └── vue-cli-service.js │ │ ├── generator │ │ │ ├── index.js │ │ │ ├── router.js │ │ │ ├── template │ │ │ │ ├── _gitignore │ │ │ │ ├── jsconfig.json │ │ │ │ ├── public │ │ │ │ │ ├── favicon.ico │ │ │ │ │ └── index.html │ │ │ │ └── src │ │ │ │ │ ├── App.vue │ │ │ │ │ ├── assets │ │ │ │ │ └── logo.png │ │ │ │ │ ├── components │ │ │ │ │ └── HelloWorld.vue │ │ │ │ │ └── main.js │ │ │ └── vuex.js │ │ ├── lib │ │ │ ├── PluginAPI.js │ │ │ ├── Service.js │ │ │ ├── commands │ │ │ │ ├── build │ │ │ │ │ ├── demo-lib-js.html │ │ │ │ │ ├── demo-lib.html │ │ │ │ │ ├── demo-wc.html │ │ │ │ │ ├── entry-lib-no-default.js │ │ │ │ │ ├── entry-lib.js │ │ │ │ │ ├── entry-wc.js │ │ │ │ │ ├── formatStats.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── resolveAppConfig.js │ │ │ │ │ ├── resolveLibConfig.js │ │ │ │ │ ├── resolveWcConfig.js │ │ │ │ │ ├── resolveWcEntry.js │ │ │ │ │ └── setPublicPath.js │ │ │ │ ├── help.js │ │ │ │ ├── inspect.js │ │ │ │ └── serve.js │ │ │ ├── config │ │ │ │ ├── app.js │ │ │ │ ├── assets.js │ │ │ │ ├── base.js │ │ │ │ ├── css.js │ │ │ │ ├── index-default.html │ │ │ │ ├── prod.js │ │ │ │ ├── terserOptions.js │ │ │ │ └── vue-loader-v15-resolve-compat │ │ │ │ │ └── vue-loader.js │ │ │ ├── options.js │ │ │ ├── util │ │ │ │ ├── getAssetPath.js │ │ │ │ ├── getBaseUrl.js │ │ │ │ ├── getPadLength.js │ │ │ │ ├── getVueMajor.js │ │ │ │ ├── isAbsoluteUrl.js │ │ │ │ ├── loadFileConfig.js │ │ │ │ ├── prepareProxy.js │ │ │ │ ├── prepareURLs.js │ │ │ │ ├── resolveClientEnv.js │ │ │ │ ├── resolveLoaderError.js │ │ │ │ ├── resolveLocal.js │ │ │ │ ├── resolveUserConfig.js │ │ │ │ ├── targets.js │ │ │ │ └── validateWebpackConfig.js │ │ │ └── webpack │ │ │ │ ├── CorsPlugin.js │ │ │ │ ├── DashboardPlugin.js │ │ │ │ ├── ModernModePlugin.js │ │ │ │ ├── MovePlugin.js │ │ │ │ ├── SafariNomoduleFixPlugin.js │ │ │ │ └── analyzeBundle.js │ │ ├── logo.png │ │ ├── migrator │ │ │ └── index.js │ │ ├── package.json │ │ ├── types │ │ │ ├── ProjectOptions.d.ts │ │ │ ├── cli-service-test.ts │ │ │ ├── index.d.ts │ │ │ └── tsconfig.json │ │ └── webpack.config.js │ ├── cli-shared-utils │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ │ ├── pluginOrder.spec.js │ │ │ └── pluginResolution.spec.js │ │ ├── index.js │ │ ├── lib │ │ │ ├── _silence.js │ │ │ ├── env.js │ │ │ ├── exit.js │ │ │ ├── ipc.js │ │ │ ├── launch.js │ │ │ ├── logger.js │ │ │ ├── module.js │ │ │ ├── object.js │ │ │ ├── openBrowser.js │ │ │ ├── openChrome.applescript │ │ │ ├── pkg.js │ │ │ ├── pluginOrder.js │ │ │ ├── pluginResolution.js │ │ │ ├── request.js │ │ │ ├── spinner.js │ │ │ └── validate.js │ │ └── package.json │ ├── cli-test-utils │ │ ├── .npmignore │ │ ├── README.md │ │ ├── assertPromptModule.d.ts │ │ ├── assertPromptModule.js │ │ ├── createJSONServer.d.ts │ │ ├── createJSONServer.js │ │ ├── createServer.d.ts │ │ ├── createServer.js │ │ ├── createTestProject.d.ts │ │ ├── createTestProject.js │ │ ├── createUpgradableProject.js │ │ ├── generateWithPlugin.d.ts │ │ ├── generateWithPlugin.js │ │ ├── launchPuppeteer.d.ts │ │ ├── launchPuppeteer.js │ │ ├── package.json │ │ ├── serveWithPuppeteer.d.ts │ │ ├── serveWithPuppeteer.js │ │ └── types │ │ │ ├── cli-test-utils-test.ts │ │ │ └── tsconfig.json │ ├── cli-ui-addon-webpack │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── package.json │ │ ├── public │ │ │ └── .gitkeep │ │ ├── src │ │ │ ├── assets │ │ │ │ ├── speeds.json │ │ │ │ └── webpack.svg │ │ │ ├── components │ │ │ │ ├── AssetList.vue │ │ │ │ ├── AssetListItem.vue │ │ │ │ ├── BuildProgress.vue │ │ │ │ ├── BuildStatus.vue │ │ │ │ ├── DonutModule.vue │ │ │ │ ├── ModuleList.vue │ │ │ │ ├── ModuleListItem.vue │ │ │ │ ├── SpeedStats.vue │ │ │ │ ├── SpeedStatsItem.vue │ │ │ │ ├── TestView.vue │ │ │ │ ├── WebpackAnalyzer.vue │ │ │ │ └── WebpackDashboard.vue │ │ │ ├── filters.js │ │ │ ├── locales │ │ │ │ └── en.json │ │ │ ├── main.js │ │ │ ├── mixins │ │ │ │ └── Dashboard.js │ │ │ ├── store │ │ │ │ └── index.js │ │ │ └── util │ │ │ │ ├── assets.js │ │ │ │ └── colors.js │ │ └── vue.config.js │ ├── cli-ui-addon-widgets │ │ ├── .browserslistrc │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── package.json │ │ ├── public │ │ │ ├── favicon.ico │ │ │ └── index.html │ │ ├── src │ │ │ ├── components │ │ │ │ ├── DependencyUpdates.vue │ │ │ │ ├── KillPort.vue │ │ │ │ ├── News.vue │ │ │ │ ├── NewsItem.vue │ │ │ │ ├── NewsItemDetails.vue │ │ │ │ ├── PluginUpdates.vue │ │ │ │ ├── RunTask.vue │ │ │ │ ├── StatusWidget.vue │ │ │ │ ├── Vulnerability.vue │ │ │ │ ├── VulnerabilityDetails.vue │ │ │ │ ├── VulnerabilityItem.vue │ │ │ │ └── Welcome.vue │ │ │ ├── main.js │ │ │ └── util │ │ │ │ └── consts.js │ │ └── vue.config.js │ ├── cli-ui │ │ ├── .env.development │ │ ├── .env.production │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── README.md │ │ ├── apollo-server │ │ │ ├── api │ │ │ │ ├── PluginApi.js │ │ │ │ ├── client-addon.js │ │ │ │ ├── configuration.js │ │ │ │ ├── notify.js │ │ │ │ ├── progress.js │ │ │ │ ├── suggestion.js │ │ │ │ ├── task.js │ │ │ │ ├── view.js │ │ │ │ └── widget.js │ │ │ ├── channels.js │ │ │ ├── connectors │ │ │ │ ├── app.js │ │ │ │ ├── client-addons.js │ │ │ │ ├── configurations.js │ │ │ │ ├── cwd.js │ │ │ │ ├── dependencies.js │ │ │ │ ├── files.js │ │ │ │ ├── folders.js │ │ │ │ ├── git.js │ │ │ │ ├── locales.js │ │ │ │ ├── logs.js │ │ │ │ ├── plugins.js │ │ │ │ ├── progress.js │ │ │ │ ├── projects.js │ │ │ │ ├── prompts.js │ │ │ │ ├── shared-data.js │ │ │ │ ├── suggestions.js │ │ │ │ ├── tasks.js │ │ │ │ ├── views.js │ │ │ │ └── widgets.js │ │ │ ├── context.js │ │ │ ├── directives.js │ │ │ ├── mocks.js │ │ │ ├── pubsub.js │ │ │ ├── resolvers.js │ │ │ ├── schema │ │ │ │ ├── configuration.js │ │ │ │ ├── console.js │ │ │ │ ├── dependency.js │ │ │ │ ├── folder.js │ │ │ │ ├── git.js │ │ │ │ ├── plugin.js │ │ │ │ ├── project.js │ │ │ │ ├── prompt.js │ │ │ │ ├── suggestion.js │ │ │ │ ├── task.js │ │ │ │ ├── view.js │ │ │ │ └── widget.js │ │ │ ├── server.js │ │ │ ├── type-defs.js │ │ │ └── util │ │ │ │ ├── command.js │ │ │ │ ├── db.js │ │ │ │ ├── highlight.js │ │ │ │ ├── ipc.js │ │ │ │ ├── logger.js │ │ │ │ ├── notification.js │ │ │ │ ├── parse-args.js │ │ │ │ ├── parse-diff.js │ │ │ │ ├── rcFolder.js │ │ │ │ ├── resolve-path.js │ │ │ │ ├── stats.js │ │ │ │ ├── strings.js │ │ │ │ ├── terminate.js │ │ │ │ └── terminate.sh │ │ ├── babel.config.js │ │ ├── cypress.json │ │ ├── graphql-server.js │ │ ├── index.js │ │ ├── locales │ │ │ └── en.json │ │ ├── package.json │ │ ├── public │ │ │ ├── favicon.ico │ │ │ └── index.html │ │ ├── server.js │ │ ├── src │ │ │ ├── App.vue │ │ │ ├── assets │ │ │ │ ├── done.png │ │ │ │ ├── error.png │ │ │ │ ├── logo.png │ │ │ │ └── search-by-algolia.svg │ │ │ ├── components │ │ │ │ ├── app │ │ │ │ │ ├── About.vue │ │ │ │ │ ├── AppLoading.vue │ │ │ │ │ ├── ConnectionStatus.vue │ │ │ │ │ ├── LocaleLoader.vue │ │ │ │ │ ├── NotFound.vue │ │ │ │ │ ├── ProgressScreen.vue │ │ │ │ │ ├── ProjectHome.vue │ │ │ │ │ ├── ProjectQuickDropdown.vue │ │ │ │ │ ├── StatusBar.vue │ │ │ │ │ └── TopBar.vue │ │ │ │ ├── client-addon │ │ │ │ │ ├── ClientAddonComponent.vue │ │ │ │ │ └── ClientAddonLoader.vue │ │ │ │ ├── configuration │ │ │ │ │ ├── ConfigurationItem.vue │ │ │ │ │ ├── ConfigurationTab.vue │ │ │ │ │ ├── ProjectConfigurationDetails.vue │ │ │ │ │ └── ProjectConfigurations.vue │ │ │ │ ├── content │ │ │ │ │ ├── ContentView.vue │ │ │ │ │ ├── ItemLogo.vue │ │ │ │ │ ├── ListFilter.vue │ │ │ │ │ ├── ListItemInfo.vue │ │ │ │ │ ├── ListSort.vue │ │ │ │ │ ├── NavContent.vue │ │ │ │ │ ├── NavList.vue │ │ │ │ │ ├── StepWizard.vue │ │ │ │ │ └── TerminalView.vue │ │ │ │ ├── dashboard │ │ │ │ │ ├── ProjectDashboard.vue │ │ │ │ │ ├── Widget.vue │ │ │ │ │ ├── WidgetAddItem.vue │ │ │ │ │ ├── WidgetAddPane.vue │ │ │ │ │ └── WidgetDetailsView.vue │ │ │ │ ├── dependency │ │ │ │ │ ├── NpmPackageSearch.vue │ │ │ │ │ ├── PackageSearchItem.vue │ │ │ │ │ ├── ProjectDependencies.vue │ │ │ │ │ └── ProjectDependencyItem.vue │ │ │ │ ├── file-diff │ │ │ │ │ ├── FileDiff.vue │ │ │ │ │ ├── FileDiffChange.vue │ │ │ │ │ ├── FileDiffChunk.vue │ │ │ │ │ └── FileDiffView.vue │ │ │ │ ├── folder │ │ │ │ │ ├── FolderExplorer.vue │ │ │ │ │ └── FolderExplorerItem.vue │ │ │ │ ├── logger │ │ │ │ │ ├── LoggerMessage.vue │ │ │ │ │ └── LoggerView.vue │ │ │ │ ├── plugin │ │ │ │ │ ├── ProjectPluginAddLocal.vue │ │ │ │ │ ├── ProjectPluginItem.vue │ │ │ │ │ ├── ProjectPlugins.vue │ │ │ │ │ └── ProjectPluginsAdd.vue │ │ │ │ ├── project-create │ │ │ │ │ ├── ProjectCreate.vue │ │ │ │ │ ├── ProjectFeatureItem.vue │ │ │ │ │ └── ProjectPresetItem.vue │ │ │ │ ├── project-manager │ │ │ │ │ ├── ProjectRename.vue │ │ │ │ │ ├── ProjectSelect.vue │ │ │ │ │ ├── ProjectSelectList.vue │ │ │ │ │ ├── ProjectSelectListItem.vue │ │ │ │ │ └── ProjectTasksDropdown.vue │ │ │ │ ├── prompt │ │ │ │ │ ├── Prompt.vue │ │ │ │ │ ├── PromptCheckbox.vue │ │ │ │ │ ├── PromptColor.vue │ │ │ │ │ ├── PromptConfirm.vue │ │ │ │ │ ├── PromptEditor.vue │ │ │ │ │ ├── PromptError.vue │ │ │ │ │ ├── PromptInput.vue │ │ │ │ │ ├── PromptList.vue │ │ │ │ │ └── PromptsList.vue │ │ │ │ ├── search │ │ │ │ │ ├── InstantSearchInput.vue │ │ │ │ │ └── InstantSearchPagination.vue │ │ │ │ ├── suggestion │ │ │ │ │ ├── SuggestionBar.vue │ │ │ │ │ ├── SuggestionBarItem.vue │ │ │ │ │ └── SuggestionBarList.vue │ │ │ │ ├── task │ │ │ │ │ ├── ProjectTaskDetails.vue │ │ │ │ │ ├── ProjectTasks.vue │ │ │ │ │ └── TaskItem.vue │ │ │ │ └── view │ │ │ │ │ ├── ViewBadge.vue │ │ │ │ │ ├── ViewNav.vue │ │ │ │ │ ├── ViewNavButton.vue │ │ │ │ │ └── ViewNavMore.vue │ │ │ ├── filters.js │ │ │ ├── graphql │ │ │ │ ├── app │ │ │ │ │ └── routeRequested.gql │ │ │ │ ├── client-addon │ │ │ │ │ ├── clientAddonAdded.gql │ │ │ │ │ ├── clientAddonFragment.gql │ │ │ │ │ └── clientAddons.gql │ │ │ │ ├── configuration │ │ │ │ │ ├── configuration.gql │ │ │ │ │ ├── configurationCancel.gql │ │ │ │ │ ├── configurationFragment.gql │ │ │ │ │ ├── configurationSave.gql │ │ │ │ │ └── configurations.gql │ │ │ │ ├── connected │ │ │ │ │ ├── connected.gql │ │ │ │ │ └── connectedSet.gql │ │ │ │ ├── console-log │ │ │ │ │ ├── consoleLogAdded.gql │ │ │ │ │ ├── consoleLogFragment.gql │ │ │ │ │ ├── consoleLogLast.gql │ │ │ │ │ ├── consoleLogs.gql │ │ │ │ │ └── consoleLogsClear.gql │ │ │ │ ├── cwd │ │ │ │ │ ├── cwd.gql │ │ │ │ │ └── cwdChanged.gql │ │ │ │ ├── dark-mode │ │ │ │ │ ├── darkMode.gql │ │ │ │ │ └── darkModeSet.gql │ │ │ │ ├── dependency │ │ │ │ │ ├── dependencies.gql │ │ │ │ │ ├── dependenciesUpdate.gql │ │ │ │ │ ├── dependencyDetails.gql │ │ │ │ │ ├── dependencyFragment.gql │ │ │ │ │ ├── dependencyInstall.gql │ │ │ │ │ ├── dependencyUninstall.gql │ │ │ │ │ └── dependencyUpdate.gql │ │ │ │ ├── feature │ │ │ │ │ ├── featureFragment.gql │ │ │ │ │ └── featureSetEnabled.gql │ │ │ │ ├── file │ │ │ │ │ └── fileOpenInEditor.gql │ │ │ │ ├── folder │ │ │ │ │ ├── folderCreate.gql │ │ │ │ │ ├── folderCurrent.gql │ │ │ │ │ ├── folderCurrentFragment.gql │ │ │ │ │ ├── folderExists.gql │ │ │ │ │ ├── folderOpen.gql │ │ │ │ │ ├── folderOpenParent.gql │ │ │ │ │ ├── folderSetFavorite.gql │ │ │ │ │ └── foldersFavorite.gql │ │ │ │ ├── git │ │ │ │ │ ├── fileDiffs.gql │ │ │ │ │ └── gitCommit.gql │ │ │ │ ├── loading │ │ │ │ │ ├── loading.gql │ │ │ │ │ └── loadingChange.gql │ │ │ │ ├── locale │ │ │ │ │ ├── localeAdded.gql │ │ │ │ │ ├── localeFragment.gql │ │ │ │ │ └── locales.gql │ │ │ │ ├── plugin │ │ │ │ │ ├── pluginActionCall.gql │ │ │ │ │ ├── pluginActionCallFragment.gql │ │ │ │ │ ├── pluginActionCalled.gql │ │ │ │ │ ├── pluginActionResolved.gql │ │ │ │ │ ├── pluginActionResultFragment.gql │ │ │ │ │ ├── pluginDetails.gql │ │ │ │ │ ├── pluginFinishInstall.gql │ │ │ │ │ ├── pluginFragment.gql │ │ │ │ │ ├── pluginInstall.gql │ │ │ │ │ ├── pluginInstallLocal.gql │ │ │ │ │ ├── pluginInstallation.gql │ │ │ │ │ ├── pluginInstallationFragment.gql │ │ │ │ │ ├── pluginInvoke.gql │ │ │ │ │ ├── pluginLogo.gql │ │ │ │ │ ├── pluginResetApi.gql │ │ │ │ │ ├── pluginUninstall.gql │ │ │ │ │ ├── pluginUpdate.gql │ │ │ │ │ ├── plugins.gql │ │ │ │ │ └── pluginsUpdate.gql │ │ │ │ ├── preset │ │ │ │ │ ├── presetApply.gql │ │ │ │ │ └── presetFragment.gql │ │ │ │ ├── progress │ │ │ │ │ ├── progress.gql │ │ │ │ │ ├── progressChanged.gql │ │ │ │ │ ├── progressFragment.gql │ │ │ │ │ └── progressRemoved.gql │ │ │ │ ├── project │ │ │ │ │ ├── currentProjectId.gql │ │ │ │ │ ├── currentProjectIdSet.gql │ │ │ │ │ ├── projectCancelCreation.gql │ │ │ │ │ ├── projectCreate.gql │ │ │ │ │ ├── projectCreation.gql │ │ │ │ │ ├── projectCreationFragment.gql │ │ │ │ │ ├── projectCurrent.gql │ │ │ │ │ ├── projectCwdReset.gql │ │ │ │ │ ├── projectFragment.gql │ │ │ │ │ ├── projectImport.gql │ │ │ │ │ ├── projectInitCreation.gql │ │ │ │ │ ├── projectOpen.gql │ │ │ │ │ ├── projectRemove.gql │ │ │ │ │ ├── projectSetFavorite.gql │ │ │ │ │ └── projects.gql │ │ │ │ ├── prompt │ │ │ │ │ ├── promptAnswer.gql │ │ │ │ │ ├── promptChoiceFragment.gql │ │ │ │ │ ├── promptErrorFragment.gql │ │ │ │ │ └── promptFragment.gql │ │ │ │ ├── shared-data │ │ │ │ │ ├── sharedData.gql │ │ │ │ │ ├── sharedDataFragment.gql │ │ │ │ │ ├── sharedDataUpdate.gql │ │ │ │ │ └── sharedDataUpdated.gql │ │ │ │ ├── suggestion │ │ │ │ │ ├── suggestionActivate.gql │ │ │ │ │ ├── suggestionAdded.gql │ │ │ │ │ ├── suggestionFragment.gql │ │ │ │ │ ├── suggestionRemoved.gql │ │ │ │ │ ├── suggestionUpdated.gql │ │ │ │ │ └── suggestions.gql │ │ │ │ ├── task │ │ │ │ │ ├── task.gql │ │ │ │ │ ├── taskChanged.gql │ │ │ │ │ ├── taskFragment.gql │ │ │ │ │ ├── taskLogAdded.gql │ │ │ │ │ ├── taskLogFragment.gql │ │ │ │ │ ├── taskLogs.gql │ │ │ │ │ ├── taskLogsClear.gql │ │ │ │ │ ├── taskOpen.gql │ │ │ │ │ ├── taskRestoreParameters.gql │ │ │ │ │ ├── taskRun.gql │ │ │ │ │ ├── taskSaveParameters.gql │ │ │ │ │ ├── taskStop.gql │ │ │ │ │ └── tasks.gql │ │ │ │ ├── version │ │ │ │ │ └── versionFragment.gql │ │ │ │ ├── view │ │ │ │ │ ├── viewAdded.gql │ │ │ │ │ ├── viewChanged.gql │ │ │ │ │ ├── viewFragment.gql │ │ │ │ │ ├── viewOpen.gql │ │ │ │ │ ├── viewRemoved.gql │ │ │ │ │ └── views.gql │ │ │ │ └── widget │ │ │ │ │ ├── widgetAdd.gql │ │ │ │ │ ├── widgetConfigOpen.gql │ │ │ │ │ ├── widgetConfigSave.gql │ │ │ │ │ ├── widgetDefinitionFragment.gql │ │ │ │ │ ├── widgetDefinitions.gql │ │ │ │ │ ├── widgetFragment.gql │ │ │ │ │ ├── widgetMove.gql │ │ │ │ │ ├── widgetRemove.gql │ │ │ │ │ └── widgets.gql │ │ │ ├── i18n.js │ │ │ ├── main.js │ │ │ ├── mixins │ │ │ │ ├── ClientState.js │ │ │ │ ├── Defer.js │ │ │ │ ├── Movable.js │ │ │ │ ├── OnGrid.js │ │ │ │ ├── OnWindowResize.js │ │ │ │ ├── PageVisibility.js │ │ │ │ ├── Progress.js │ │ │ │ ├── Prompts.js │ │ │ │ ├── Resizable.js │ │ │ │ └── RestoreRoute.js │ │ │ ├── plugins.js │ │ │ ├── register-components.js │ │ │ ├── router.js │ │ │ ├── state │ │ │ │ ├── defaults.js │ │ │ │ ├── resolvers.js │ │ │ │ └── typeDefs.js │ │ │ ├── style │ │ │ │ ├── colors.styl │ │ │ │ ├── imports.styl │ │ │ │ ├── main.styl │ │ │ │ ├── mixins.styl │ │ │ │ ├── transitions.styl │ │ │ │ └── vars.styl │ │ │ ├── util │ │ │ │ ├── ClientAddonApi.js │ │ │ │ ├── ansi-colors.js │ │ │ │ ├── bus.js │ │ │ │ ├── focus.js │ │ │ │ ├── folders.js │ │ │ │ ├── image.js │ │ │ │ ├── plugin-action.js │ │ │ │ ├── responsive.js │ │ │ │ ├── route.js │ │ │ │ ├── search.js │ │ │ │ ├── set-size.js │ │ │ │ ├── shared-data.js │ │ │ │ └── theme.js │ │ │ └── vue-apollo.js │ │ ├── tests │ │ │ └── e2e │ │ │ │ ├── .eslintrc │ │ │ │ ├── .gitignore │ │ │ │ ├── plugins │ │ │ │ └── index.js │ │ │ │ ├── specs │ │ │ │ ├── g1-projects.js │ │ │ │ ├── g2-plugins.js │ │ │ │ ├── g3-configurations.js │ │ │ │ └── g4-tasks.js │ │ │ │ └── support │ │ │ │ ├── commands.js │ │ │ │ └── index.js │ │ ├── ui-defaults │ │ │ ├── config.js │ │ │ ├── index.js │ │ │ ├── suggestions.js │ │ │ ├── tasks.js │ │ │ ├── utils │ │ │ │ ├── audit.js │ │ │ │ ├── modules.js │ │ │ │ └── stats.js │ │ │ └── widgets.js │ │ ├── ui-dev.js │ │ ├── ui-public │ │ │ ├── vue-cli.png │ │ │ ├── vue-logo.png │ │ │ ├── webpack-inspect-logo.png │ │ │ └── webpack-logo.png │ │ └── vue.config.js │ └── cli │ │ ├── .npmignore │ │ ├── README.md │ │ ├── __tests__ │ │ ├── Creator.spec.js │ │ ├── Generator.spec.js │ │ ├── Upgrader.spec.js │ │ ├── args.spec.js │ │ ├── invoke.spec.js │ │ ├── mock-preset-with-async-generator │ │ │ ├── generator │ │ │ │ ├── index.js │ │ │ │ └── template │ │ │ │ │ └── test.js │ │ │ ├── preset.json │ │ │ └── prompts.js │ │ ├── mock-preset-with-readme │ │ │ ├── generator.js │ │ │ └── preset.json │ │ ├── mock-preset-with-template │ │ │ ├── generator │ │ │ │ ├── index.js │ │ │ │ └── template │ │ │ │ │ └── test.js │ │ │ ├── preset.json │ │ │ └── prompts.js │ │ ├── mock-preset │ │ │ ├── generator.js │ │ │ ├── preset.json │ │ │ └── prompts.js │ │ ├── options.spec.js │ │ └── preset.spec.js │ │ ├── bin │ │ └── vue.js │ │ ├── lib │ │ ├── ConfigTransform.js │ │ ├── Creator.js │ │ ├── Generator.js │ │ ├── GeneratorAPI.js │ │ ├── Migrator.js │ │ ├── MigratorAPI.js │ │ ├── PromptModuleAPI.js │ │ ├── Upgrader.js │ │ ├── add.js │ │ ├── config.js │ │ ├── create.js │ │ ├── inspect.js │ │ ├── invoke.js │ │ ├── migrate.js │ │ ├── options.js │ │ ├── outdated.js │ │ ├── promptModules │ │ │ ├── __tests__ │ │ │ │ ├── babel.spec.js │ │ │ │ ├── cssPreprocessors.spec.js │ │ │ │ ├── e2e.spec.js │ │ │ │ ├── linter.spec.js │ │ │ │ ├── pwa.spec.js │ │ │ │ ├── router.spec.js │ │ │ │ ├── typescript.spec.js │ │ │ │ ├── unit.spec.js │ │ │ │ └── vuex.spec.js │ │ │ ├── babel.js │ │ │ ├── cssPreprocessors.js │ │ │ ├── e2e.js │ │ │ ├── linter.js │ │ │ ├── pwa.js │ │ │ ├── router.js │ │ │ ├── typescript.js │ │ │ ├── unit.js │ │ │ ├── vueVersion.js │ │ │ └── vuex.js │ │ ├── ui.js │ │ ├── upgrade.js │ │ └── util │ │ │ ├── .npmignore │ │ │ ├── ProjectPackageManager.js │ │ │ ├── __tests__ │ │ │ └── extendJSConfig.spec.js │ │ │ ├── clearConsole.js │ │ │ ├── codemods │ │ │ ├── injectImports.js │ │ │ └── injectOptions.js │ │ │ ├── configTransforms.js │ │ │ ├── confirmIfGitDirty.js │ │ │ ├── createTools.js │ │ │ ├── enhanceErrorMessages.js │ │ │ ├── executeCommand.js │ │ │ ├── extendJSConfig.js │ │ │ ├── features.js │ │ │ ├── generateReadme.js │ │ │ ├── getChangedFiles.js │ │ │ ├── getGlobalInstallCommand.js │ │ │ ├── getPkg.js │ │ │ ├── getVersions.js │ │ │ ├── inferRootOptions.js │ │ │ ├── linkBin.js │ │ │ ├── loadCommand.js │ │ │ ├── loadLocalPreset.js │ │ │ ├── loadPresetFromDir.js │ │ │ ├── loadRemotePreset.js │ │ │ ├── mergeDeps.js │ │ │ ├── normalizeFilePaths.js │ │ │ ├── rcPath.js │ │ │ ├── readFiles.js │ │ │ ├── registries.js │ │ │ ├── runNpmScript.js │ │ │ ├── setupDevProject.js │ │ │ ├── shouldUseTaobao.js │ │ │ ├── sortObject.js │ │ │ ├── stringifyJS.js │ │ │ ├── tryGetNewerRange.js │ │ │ └── writeFileTree.js │ │ ├── package.json │ │ └── types │ │ ├── cli-test.ts │ │ ├── index.d.ts │ │ └── tsconfig.json ├── test │ └── .gitkeep └── vue-cli-version-marker │ ├── README.md │ └── package.json ├── scripts ├── bootstrap.js ├── buildEditorConfig.js ├── checkLinks.js ├── e2e-test │ ├── cleanup.sh │ ├── git.sh │ ├── local-registry.sh │ ├── run-e2e-test.sh │ └── verdaccio-config.yml ├── genChangelog.js ├── genDocs.js ├── patchChromedriver.js ├── release.js ├── syncDeps.js ├── test.js ├── testSetup.js └── verifyCommitMsg.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | template 3 | template-vue3 4 | packages/test 5 | temp 6 | dist 7 | __testfixtures__ 8 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | '@vue/standard' 4 | ], 5 | globals: { 6 | name: 'off' 7 | }, 8 | rules: { 9 | indent: ['error', 2, { 10 | MemberExpression: 'off' 11 | }], 12 | quotes: [2, 'single', { avoidEscape: true, allowTemplateLiterals: true }], 13 | 'quote-props': 'off', 14 | 'no-shadow': ['error'], 15 | 'node/no-extraneous-require': ['error', { 16 | allowModules: [ 17 | '@vue/cli-service', 18 | '@vue/cli-test-utils' 19 | ] 20 | }] 21 | }, 22 | overrides: [ 23 | { 24 | files: ['**/__tests__/**/*.js', '**/cli-test-utils/**/*.js'], 25 | env: { 26 | jest: true 27 | }, 28 | rules: { 29 | 'node/no-extraneous-require': 'off' 30 | } 31 | } 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [yyx990803, sodatea] 2 | patreon: evanyou 3 | open_collective: vuejs 4 | tidelift: npm/vue 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Create new issue 4 | url: https://new-issue.vuejs.org/?repo=vuejs/vue-cli 5 | about: Please use the following link to create a new issue. 6 | - name: Patreon 7 | url: https://www.patreon.com/evanyou 8 | about: Love Vue.js? Please consider supporting us via Patreon. 9 | - name: Open Collective 10 | url: https://opencollective.com/vuejs/donate 11 | about: Love Vue.js? Please consider supporting us via Open Collective. 12 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | **What kind of change does this PR introduce?** (check at least one) 7 | 8 | - [ ] Bugfix 9 | - [ ] Feature 10 | - [ ] Code style update 11 | - [ ] Refactor 12 | - [ ] Docs 13 | - [ ] Underlying tools 14 | - [ ] Other, please describe: 15 | 16 | 21 | 22 | **Does this PR introduce a breaking change?** (check one) 23 | 24 | - [ ] Yes 25 | - [ ] No 26 | 27 | **Other information:** 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | design 4 | *.log 5 | packages/test 6 | dist 7 | temp 8 | .vuerc 9 | .version 10 | .versions 11 | .changelog 12 | package-lock.json 13 | .vscode 14 | -------------------------------------------------------------------------------- /.tidelift.yml: -------------------------------------------------------------------------------- 1 | tests: 2 | unlicensed: warn 3 | -------------------------------------------------------------------------------- /__mocks__/fs.js: -------------------------------------------------------------------------------- 1 | const { fs } = require('memfs') 2 | 3 | // overwrite config path and context when fs is mocked 4 | process.env.VUE_CLI_CONTEXT = '/' 5 | process.env.VUE_CLI_CONFIG_PATH = '/.vuerc' 6 | 7 | module.exports = fs 8 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | environment: 2 | nodejs_version: "14" 3 | 4 | install: 5 | - ps: Install-Product node $env:nodejs_version 6 | - yarn patch-chromedriver 7 | - yarn --network-timeout 600000 8 | 9 | test_script: 10 | - git --version 11 | - node --version 12 | - yarn --version 13 | - yarn test --testPathIgnorePatterns globalService 14 | # ui tests temporarily disabled due to Cypress 3.0 issue on windows 15 | # - cd "packages/@vue/cli-ui" && yarn test 16 | 17 | cache: 18 | - node_modules -> appveyor.yml, **\package.json, yarn.lock 19 | - '%LOCALAPPDATA%\Yarn -> appveyor.yml, **\package.json, yarn.lock' 20 | 21 | build: off 22 | 23 | branches: 24 | except: 25 | - docs 26 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/custom.css: -------------------------------------------------------------------------------- 1 | .home .home-hero img { 2 | max-height: 180px; 3 | } 4 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/assets/en-vue-cli-ui-schema.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/assets/en-vue-cli-ui-schema.ai -------------------------------------------------------------------------------- /docs/assets/ru-vue-cli-ui-schema.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/assets/ru-vue-cli-ui-schema.ai -------------------------------------------------------------------------------- /docs/core-plugins/index.md: -------------------------------------------------------------------------------- 1 | # Plugins 2 | 3 | Vue CLI uses a plugin-based architecture. If you inspect a newly created project's `package.json`, you will find dependencies that start with `@vue/cli-plugin-`. Plugins can modify the internal webpack configuration and inject commands to `vue-cli-service`. Most of the features listed during the project creation process are implemented as plugins. 4 | 5 | This section contains documentation for core Vue CLI plugins: 6 | 7 | - [Babel](babel.md) 8 | - [TypeScript](typescript.md) 9 | - [ESLint](eslint.md) 10 | - [PWA](pwa.md) 11 | - [Jest](unit-jest.md) 12 | - [Mocha](unit-mocha.md) 13 | - [Cypress](e2e-cypress.md) 14 | - [Nightwatch](e2e-nightwatch.md) 15 | - [WebdriverIO](e2e-webdriverio.md) 16 | -------------------------------------------------------------------------------- /docs/core-plugins/router.md: -------------------------------------------------------------------------------- 1 | # @vue/cli-plugin-router 2 | 3 | > router plugin for vue-cli 4 | 5 | ## Installing in an Already Created Project 6 | 7 | ```bash 8 | vue add router 9 | ``` 10 | -------------------------------------------------------------------------------- /docs/core-plugins/vuex.md: -------------------------------------------------------------------------------- 1 | # @vue/cli-plugin-vuex 2 | 3 | > vuex plugin for vue-cli 4 | 5 | ## Installing in an Already Created Project 6 | 7 | ```bash 8 | vue add vuex 9 | ``` 10 | -------------------------------------------------------------------------------- /docs/guide/prototyping.md: -------------------------------------------------------------------------------- 1 | # Instant Prototyping 2 | 3 | Removed in v5. We recommend you to use [vite](https://github.com/vitejs/vite/#readme) for Vue component prototyping. 4 | 5 | If you are using `@vue/cli` v4, please visit for the documentation. 6 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | home: true 3 | heroImage: /favicon.png 4 | actionText: Get Started → 5 | actionLink: /guide/ 6 | footer: MIT Licensed | Copyright © 2018-present Evan You 7 | --- 8 | 9 | :::warning Vue CLI is in Maintenance Mode! 10 | For new projects, please use [create-vue](https://github.com/vuejs/create-vue) to scaffold [Vite](https://vitejs.dev/)-based projects. Also refer to the [Vue 3 Tooling Guide](https://vuejs.org/guide/scaling-up/tooling.html) for the latest recommendations. 11 | ::: 12 | 13 | ## Getting Started 14 | 15 | Install: 16 | 17 | ```bash 18 | npm install -g @vue/cli 19 | # OR 20 | yarn global add @vue/cli 21 | ``` 22 | 23 | Create a project: 24 | 25 | ```bash 26 | vue create my-project 27 | # OR 28 | vue ui 29 | ``` 30 | -------------------------------------------------------------------------------- /docs/public/bit-wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/bit-wide.png -------------------------------------------------------------------------------- /docs/public/cli-new-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/cli-new-project.png -------------------------------------------------------------------------------- /docs/public/cli-select-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/cli-select-features.png -------------------------------------------------------------------------------- /docs/public/config-ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/config-ui.png -------------------------------------------------------------------------------- /docs/public/custom-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/custom-view.png -------------------------------------------------------------------------------- /docs/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/favicon.png -------------------------------------------------------------------------------- /docs/public/generator-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/generator-template.png -------------------------------------------------------------------------------- /docs/public/icons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/icons/android-chrome-192x192.png -------------------------------------------------------------------------------- /docs/public/icons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/icons/android-chrome-512x512.png -------------------------------------------------------------------------------- /docs/public/icons/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/icons/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /docs/public/icons/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/icons/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /docs/public/icons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/icons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /docs/public/icons/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/icons/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /docs/public/icons/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/icons/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /docs/public/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/public/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/icons/favicon-16x16.png -------------------------------------------------------------------------------- /docs/public/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/icons/favicon-32x32.png -------------------------------------------------------------------------------- /docs/public/icons/msapplication-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/icons/msapplication-icon-144x144.png -------------------------------------------------------------------------------- /docs/public/icons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/icons/mstile-150x150.png -------------------------------------------------------------------------------- /docs/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vue CLI", 3 | "short_name": "Vue CLI", 4 | "icons": [ 5 | { 6 | "src": "/icons/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/icons/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "start_url": "/index.html", 17 | "display": "standalone", 18 | "background_color": "#fff", 19 | "theme_color": "#3eaf7c" 20 | } 21 | -------------------------------------------------------------------------------- /docs/public/plugin-search-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/plugin-search-item.png -------------------------------------------------------------------------------- /docs/public/plugins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/plugins.png -------------------------------------------------------------------------------- /docs/public/prompts-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/prompts-example.png -------------------------------------------------------------------------------- /docs/public/ru/vue-cli-ui-schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/ru/vue-cli-ui-schema.png -------------------------------------------------------------------------------- /docs/public/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/screenshot.png -------------------------------------------------------------------------------- /docs/public/suggestion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/suggestion.png -------------------------------------------------------------------------------- /docs/public/task-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/task-view.png -------------------------------------------------------------------------------- /docs/public/tasks-ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/tasks-ui.png -------------------------------------------------------------------------------- /docs/public/ui-analyzer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/ui-analyzer.png -------------------------------------------------------------------------------- /docs/public/ui-browse-local-plugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/ui-browse-local-plugin.png -------------------------------------------------------------------------------- /docs/public/ui-config-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/ui-config-start.png -------------------------------------------------------------------------------- /docs/public/ui-configuration-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/ui-configuration-default.png -------------------------------------------------------------------------------- /docs/public/ui-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/ui-configuration.png -------------------------------------------------------------------------------- /docs/public/ui-greet-task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/ui-greet-task.png -------------------------------------------------------------------------------- /docs/public/ui-new-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/ui-new-project.png -------------------------------------------------------------------------------- /docs/public/ui-plugin-refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/ui-plugin-refresh.png -------------------------------------------------------------------------------- /docs/public/ui-project-manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/ui-project-manager.png -------------------------------------------------------------------------------- /docs/public/ui-prompts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/ui-prompts.png -------------------------------------------------------------------------------- /docs/public/ui-select-plugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/ui-select-plugin.png -------------------------------------------------------------------------------- /docs/public/vue-cli-ui-schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/docs/public/vue-cli-ui-schema.png -------------------------------------------------------------------------------- /docs/ru/core-plugins/index.md: -------------------------------------------------------------------------------- 1 | # Плагины 2 | 3 | Vue CLI использует архитектуру на основе плагинов. Если изучить `package.json` в только что созданном проекте, можно обнаружить зависимости, которые начинаются с `@vue/cli-plugin-`. Плагины могут модифицировать внутреннюю конфигурацию webpack и внедрять команды в `vue-cli-service`. Большинство возможностей, перечисленных в процессе создания проекта, реализованы в виде плагинов. 4 | 5 | Этот раздел содержит документацию для основных плагинов Vue CLI: 6 | 7 | - [Babel](babel.md) 8 | - [TypeScript](typescript.md) 9 | - [ESLint](eslint.md) 10 | - [PWA](pwa.md) 11 | - [Jest](unit-jest.md) 12 | - [Mocha](unit-mocha.md) 13 | - [Cypress](e2e-cypress.md) 14 | - [Nightwatch](e2e-nightwatch.md) 15 | - [WebdriverIO](e2e-webdriverio.md) 16 | -------------------------------------------------------------------------------- /docs/ru/core-plugins/router.md: -------------------------------------------------------------------------------- 1 | # @vue/cli-plugin-router 2 | 3 | > Плагин маршрутизации для vue-cli 4 | 5 | ## Установка в уже созданный проект 6 | 7 | ```bash 8 | vue add router 9 | ``` 10 | -------------------------------------------------------------------------------- /docs/ru/core-plugins/vuex.md: -------------------------------------------------------------------------------- 1 | # @vue/cli-plugin-vuex 2 | 3 | > Плагин vuex для vue-cli 4 | 5 | ## Установка в уже созданный проект 6 | 7 | ```bash 8 | vue add vuex 9 | ``` 10 | -------------------------------------------------------------------------------- /docs/zh/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | home: true 3 | heroImage: /favicon.png 4 | actionText: 起步 → 5 | actionLink: /zh/guide/ 6 | footer: MIT Licensed | Copyright © 2018-present Evan You 7 | --- 8 | 9 | :::warning Vue CLI 现已处于维护模式! 10 | 现在官方推荐使用 [create-vue](https://github.com/vuejs/create-vue) 来创建基于 [Vite](https://vitejs.dev/) 的新项目。另外请参考 [Vue 3 工具链指南](https://cn.vuejs.org/guide/scaling-up/tooling.html) 以了解最新的工具推荐。 11 | ::: 12 | 13 | ## 起步 14 | 15 | 安装: 16 | 17 | ```bash 18 | npm install -g @vue/cli 19 | # OR 20 | yarn global add @vue/cli 21 | ``` 22 | 23 | 创建一个项目: 24 | 25 | ```bash 26 | vue create my-project 27 | # OR 28 | vue ui 29 | ``` 30 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'testEnvironment': 'node', 3 | 'setupFiles': [ 4 | '/scripts/testSetup.js' 5 | ], 6 | 'testMatch': [ 7 | '**/__tests__/**/*.spec.js' 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "npmClient": "yarn", 3 | "useWorkspaces": true, 4 | "version": "5.0.8", 5 | "packages": [ 6 | "packages/@vue/babel-preset-app", 7 | "packages/@vue/cli*", 8 | "packages/vue-cli-version-marker" 9 | ], 10 | "changelog": { 11 | "repo": "vuejs/vue-cli", 12 | "labels": { 13 | "PR: New Feature": ":rocket: New Features", 14 | "PR: Breaking Change": ":boom: Breaking Changes", 15 | "PR: Bug Fix": ":bug: Bug Fix", 16 | "PR: Documentation": ":memo: Documentation", 17 | "PR: Internal": ":house: Internal", 18 | "PR: Underlying Tools": ":hammer: Underlying Tools" 19 | }, 20 | "cacheDir": ".changelog" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/@vue/babel-preset-app/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-init/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-init/README.md: -------------------------------------------------------------------------------- 1 | # @vue/cli-init 2 | 3 | > `vue init` command addon for `@vue/cli` 4 | 5 | This is simply an alias to the old `vue-cli@2.x`. 6 | -------------------------------------------------------------------------------- /packages/@vue/cli-init/index.js: -------------------------------------------------------------------------------- 1 | const execa = require('execa') 2 | const binPath = require.resolve('vue-cli/bin/vue-init') 3 | 4 | execa( 5 | binPath, 6 | process.argv.slice(process.argv.indexOf('init') + 1), 7 | { stdio: 'inherit' } 8 | ) 9 | -------------------------------------------------------------------------------- /packages/@vue/cli-init/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vue/cli-init", 3 | "version": "5.0.8", 4 | "description": "init addon for vue-cli", 5 | "main": "index.js", 6 | "publishConfig": { 7 | "access": "public" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/vuejs/vue-cli.git", 12 | "directory": "packages/@vue/cli-init" 13 | }, 14 | "keywords": [ 15 | "vue", 16 | "cli" 17 | ], 18 | "author": "Evan You", 19 | "license": "MIT", 20 | "bugs": { 21 | "url": "https://github.com/vuejs/vue-cli/issues" 22 | }, 23 | "homepage": "https://github.com/vuejs/vue-cli/tree/dev/packages/@vue/cli-init#readme", 24 | "dependencies": { 25 | "execa": "^1.0.0", 26 | "vue-cli": "^2.9.2" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/@vue/cli-overlay/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-overlay/README.md: -------------------------------------------------------------------------------- 1 | # @vue/cli-overlay 2 | 3 | > overlay for vue-cli 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-overlay/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vue/cli-overlay", 3 | "version": "5.0.8", 4 | "description": "error overlay & dev server middleware for vue-cli", 5 | "main": "dist/client.js", 6 | "files": [ 7 | "dist" 8 | ], 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/vuejs/vue-cli.git", 12 | "directory": "packages/@vue/cli-overlay" 13 | }, 14 | "keywords": [ 15 | "vue", 16 | "cli", 17 | "cli-overlay" 18 | ], 19 | "author": "Evan You", 20 | "license": "MIT", 21 | "bugs": { 22 | "url": "https://github.com/vuejs/vue-cli/issues" 23 | }, 24 | "homepage": "https://github.com/vuejs/vue-cli/tree/dev/packages/@vue/cli-overlay#readme", 25 | "publishConfig": { 26 | "access": "public" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/@vue/cli-overlay/src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-overlay/src/index.js -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | __testfixtures__ 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/codemods/__testfixtures__/customConfig.input.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | ['@vue/app', { 4 | polyfills: [] 5 | }] 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/codemods/__testfixtures__/customConfig.output.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | ['@vue/cli-plugin-babel/preset', { 4 | polyfills: [] 5 | }] 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/codemods/__testfixtures__/default.input.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/app'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/codemods/__testfixtures__/default.output.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/cli-plugin-babel/preset'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/codemods/__testfixtures__/doubleQuote.input.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ["@vue/app"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/codemods/__testfixtures__/doubleQuote.output.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ["@vue/cli-plugin-babel/preset"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/codemods/__testfixtures__/require.input.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | presets: [ 3 | [require('@vue/babel-preset-app'), { 4 | polyfills: [] 5 | }] 6 | ] 7 | } 8 | 9 | module.exports = config 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/codemods/__testfixtures__/require.output.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | presets: [ 3 | [require('@vue/cli-plugin-babel/preset'), { 4 | polyfills: [] 5 | }] 6 | ] 7 | } 8 | 9 | module.exports = config 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/codemods/__testfixtures__/templateLiteral.input.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [`@vue/app`] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/codemods/__testfixtures__/templateLiteral.output.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/cli-plugin-babel/preset'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/codemods/__tests__/usePluginPreset.spec.js: -------------------------------------------------------------------------------- 1 | jest.autoMockOff() 2 | 3 | const { defineTest } = require('jscodeshift/dist/testUtils') 4 | 5 | defineTest(__dirname, 'usePluginPreset', null, 'default') 6 | defineTest(__dirname, 'usePluginPreset', null, 'customConfig') 7 | defineTest(__dirname, 'usePluginPreset', null, 'require') 8 | defineTest(__dirname, 'usePluginPreset', null, 'templateLiteral') 9 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/generator.js: -------------------------------------------------------------------------------- 1 | module.exports = api => { 2 | // Most likely you want to overwrite the whole config to ensure it's working 3 | // without conflicts, e.g. for a project that used Jest without Babel. 4 | // It should be rare for the user to have their own special babel config 5 | // without using the Babel plugin already. 6 | delete api.generator.files['babel.config.js'] 7 | 8 | api.extendPackage({ 9 | babel: { 10 | presets: ['@vue/cli-plugin-babel/preset'] 11 | }, 12 | vue: { 13 | transpileDependencies: true 14 | }, 15 | dependencies: { 16 | 'core-js': '^3.8.3' 17 | } 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-babel/logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/migrator/index.js: -------------------------------------------------------------------------------- 1 | const { chalk } = require('@vue/cli-shared-utils') 2 | 3 | module.exports = api => { 4 | api.transformScript( 5 | 'babel.config.js', 6 | require('../codemods/usePluginPreset') 7 | ) 8 | 9 | if (api.fromVersion('^3')) { 10 | api.extendPackage( 11 | { 12 | dependencies: { 13 | 'core-js': '^3.8.3' 14 | } 15 | }, 16 | { warnIncompatibleVersions: false } 17 | ) 18 | 19 | // TODO: implement a codemod to migrate polyfills 20 | api.exitLog(`core-js has been upgraded from v2 to v3. 21 | If you have any custom polyfills defined in ${chalk.yellow('babel.config.js')}, please be aware their names may have been changed. 22 | For more complete changelog, see https://github.com/zloirock/core-js/blob/master/CHANGELOG.md#300---20190319`) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-babel/preset.js: -------------------------------------------------------------------------------- 1 | module.exports = require('@vue/babel-preset-app') 2 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-cypress/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-cypress/generator/index.js: -------------------------------------------------------------------------------- 1 | module.exports = api => { 2 | api.render('./template', { 3 | hasTS: api.hasPlugin('typescript'), 4 | hasESLint: api.hasPlugin('eslint') 5 | }) 6 | 7 | api.extendPackage({ 8 | devDependencies: { 9 | cypress: require('../package.json').devDependencies.cypress 10 | }, 11 | scripts: { 12 | 'test:e2e': 'vue-cli-service test:e2e' 13 | } 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-cypress/generator/template/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "pluginsFile": "tests/e2e/plugins/index.js" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-cypress/generator/template/tests/e2e/_eslintrc.js: -------------------------------------------------------------------------------- 1 | <%_ if (hasESLint) { _%> 2 | module.exports = { 3 | plugins: [ 4 | 'cypress' 5 | ], 6 | env: { 7 | mocha: true, 8 | 'cypress/globals': true 9 | }, 10 | rules: { 11 | strict: 'off' 12 | } 13 | } 14 | <%_ } _%> 15 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-cypress/generator/template/tests/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/table-of-contents 2 | 3 | describe('My First Test', () => { 4 | it('Visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'Welcome to Your Vue.js <%- hasTS ? '+ TypeScript ' : '' %>App') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-cypress/generator/template/tests/e2e/support/index.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands' 18 | 19 | // Alternatively you can use CommonJS syntax: 20 | // require('./commands') 21 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-cypress/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-e2e-cypress/logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-cypress/migrator/index.js: -------------------------------------------------------------------------------- 1 | module.exports = api => { 2 | api.extendPackage(pkg => { 3 | const allDeps = { 4 | ...pkg.dependencies, 5 | ...pkg.devDependencies, 6 | ...pkg.optionalDependencies 7 | } 8 | 9 | if (!allDeps.cypress) { 10 | return { 11 | devDependencies: { 12 | cypress: require('../package.json').devDependencies.cypress 13 | } 14 | } 15 | } 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-nightwatch/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-nightwatch/__tests__/lib/globals-gecko.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is copied during the firefox test inside the project folder and used to inspect the results 3 | */ 4 | const fs = require('fs') 5 | 6 | module.exports = { 7 | reporter (results, cb) { 8 | fs.writeFile('test_results_gecko.json', JSON.stringify(results), cb) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-nightwatch/__tests__/lib/globals-generated.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is copied during the test inside the project folder and used to inspect the results 3 | */ 4 | const fs = require('fs') 5 | 6 | module.exports = { 7 | afterEach (browser, cb) { 8 | fs.writeFile('test_settings.json', JSON.stringify(browser.options), cb) 9 | }, 10 | 11 | reporter (results, cb) { 12 | fs.writeFile('test_results.json', JSON.stringify(results), cb) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-nightwatch/__tests__/lib/nightwatch.conf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is copied during the test inside the project folder 3 | */ 4 | module.exports = { 5 | globals_path: './tests/e2e/globals-gecko.js' 6 | } 7 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-nightwatch/generator/template/tests/e2e/_eslintrc.js: -------------------------------------------------------------------------------- 1 | <%_ if (hasESLint) { _%> 2 | module.exports = { 3 | rules: { 4 | <%_ if (hasTS) { _%> 5 | '@typescript-eslint/no-var-requires': 'off', 6 | <%_ } _%> 7 | 'no-unused-expressions': 'off' 8 | } 9 | } 10 | <%_ } _%> 11 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-nightwatch/generator/template/tests/e2e/custom-commands/openHomepageClass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A class-based Nightwatch custom command which is a variation of the openHomepage.js command. 3 | * The command name is the filename and class needs to contain a "command" method. 4 | * 5 | * Example usage: 6 | * browser.openHomepageClass(); 7 | * 8 | * For more information on writing custom commands see: 9 | * https://nightwatchjs.org/guide/extending-nightwatch/#writing-custom-commands 10 | * 11 | */ 12 | 13 | const assert = require('assert') 14 | 15 | module.exports = class { 16 | async command () { 17 | // Other Nightwatch commands are available via "this.api" 18 | this.api.init() 19 | this.api.waitForElementVisible('#app') 20 | 21 | const result = await this.api.elements('css selector', '#app ul') 22 | assert.strictEqual(result.value.length, 3) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-nightwatch/generator/template/tests/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // https://nightwatchjs.org/guide 3 | 4 | module.exports = { 5 | 'default e2e tests': browser => { 6 | browser 7 | .init() 8 | .waitForElementVisible('#app') 9 | .assert.elementPresent('.hello') 10 | .assert.containsText('h1', 'Welcome to Your Vue.js <%- hasTS ? '+ TypeScript ' : '' %>App') 11 | .assert.elementCount('img', 1) 12 | .end() 13 | }, 14 | 15 | 'example e2e test using a custom command': browser => { 16 | browser 17 | .openHomepage() 18 | .assert.elementPresent('.hello') 19 | .end() 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-nightwatch/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-e2e-nightwatch/logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-nightwatch/prompts.js: -------------------------------------------------------------------------------- 1 | const { installedBrowsers } = require('@vue/cli-shared-utils') 2 | 3 | module.exports = [ 4 | { 5 | name: 'webdrivers', 6 | type: `checkbox`, 7 | message: `Pick browsers to run end-to-end test on`, 8 | choices: [ 9 | { 10 | name: `Chrome`, 11 | value: 'chrome', 12 | checked: true 13 | }, 14 | { 15 | name: 'Firefox', 16 | value: 'firefox', 17 | // check the "Firefox" option if user has installed it 18 | checked: !!installedBrowsers.firefox 19 | } 20 | ] 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-webdriverio/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-webdriverio/generator/template/tests/e2e/_eslintrc.js: -------------------------------------------------------------------------------- 1 | <%_ if (hasESLint) { _%> 2 | module.exports = { 3 | plugins: ['wdio'], 4 | extends: 'plugin:wdio/recommended', 5 | env: { 6 | mocha: true 7 | }, 8 | rules: { 9 | 'class-methods-use-this': 'off', 10 | 'max-len': 'off', 11 | strict: 'off' 12 | } 13 | } 14 | <%_ } _%> 15 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-webdriverio/generator/template/tests/e2e/logs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-e2e-webdriverio/generator/template/tests/e2e/logs/.gitkeep -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-webdriverio/generator/template/tests/e2e/pageobjects/app.page.js: -------------------------------------------------------------------------------- 1 | class App { 2 | /** 3 | * elements 4 | */ 5 | get heading () { return $('h1') } 6 | 7 | /** 8 | * methods 9 | */ 10 | async open (path = '/') { 11 | await browser.url(path) 12 | } 13 | } 14 | 15 | <%- hasTS ? 'export default new App()' : 'module.exports = new App()' %> 16 | 17 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-webdriverio/generator/template/tests/e2e/specs/app.spec.js: -------------------------------------------------------------------------------- 1 | <%- hasTS ? 'import App from \'../pageobjects/app.page\'' : 'const App = require(\'../pageobjects/app.page\')' %> 2 | 3 | describe('Vue.js app', () => { 4 | it('should open and render', async () => { 5 | await App.open() 6 | await expect(App.heading).toHaveText('Welcome to Your Vue.js <%- hasTS ? '+ TypeScript ' : '' %>App') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-webdriverio/migrator/index.js: -------------------------------------------------------------------------------- 1 | module.exports = (api) => { 2 | if (api.fromVersion('<= 5.0.0-alpha.4')) { 3 | api.render((files) => { 4 | if (!files['tsconfig.json']) { 5 | return 6 | } 7 | 8 | files['tsconfig.json'] = files['tsconfig.json'].replace( 9 | '"@wdio/sync"', 10 | '"webdriverio/sync"' 11 | ) 12 | if (!/"expect-webdriverio"/.test(files['tsconfig.json'])) { 13 | files['tsconfig.json'] = files['tsconfig.json'].replace( 14 | '"@wdio/mocha-framework",', 15 | '"@wdio/mocha-framework",\n "expect-webdriverio",' 16 | ) 17 | } 18 | }) 19 | } 20 | 21 | if (api.fromVersion('<= 5.0.0-beta.4')) { 22 | api.extendPackage({ 23 | devDependencies: { 24 | '@wdio/sync': '^7.0.7' 25 | } 26 | }) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-webdriverio/prompts.js: -------------------------------------------------------------------------------- 1 | const { installedBrowsers } = require('@vue/cli-shared-utils') 2 | 3 | module.exports = [ 4 | { 5 | name: 'webdrivers', 6 | type: `checkbox`, 7 | message: `Pick browsers to run end-to-end test on`, 8 | choices: [ 9 | { 10 | name: `Chrome`, 11 | value: 'chrome', 12 | checked: true 13 | }, 14 | { 15 | name: 'Firefox', 16 | value: 'firefox', 17 | // check the "Firefox" option if user has installed it 18 | checked: !!installedBrowsers.firefox 19 | } 20 | ] 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-e2e-webdriverio/ui.js: -------------------------------------------------------------------------------- 1 | module.exports = api => { 2 | api.describeTask({ 3 | match: /vue-cli-service test:e2e/, 4 | description: 'org.vue.webdriverio.tasks.test.description', 5 | link: 'https://github.com/vuejs/vue-cli', 6 | prompts: [], 7 | onBeforeRun: () => {} 8 | }) 9 | } 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-eslint/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-eslint/generator/template/airbnb/_editorconfig: -------------------------------------------------------------------------------- 1 | [*.{js,jsx,ts,tsx,vue}] 2 | indent_style = space 3 | indent_size = 2 4 | end_of_line = lf 5 | trim_trailing_whitespace = true 6 | insert_final_newline = true 7 | max_line_length = 100 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-eslint/generator/template/standard/_editorconfig: -------------------------------------------------------------------------------- 1 | [*.{js,jsx,ts,tsx,vue}] 2 | indent_style = space 3 | indent_size = 2 4 | trim_trailing_whitespace = true 5 | insert_final_newline = true 6 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-eslint/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-eslint/logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-eslint/ui/taskDescriptor.js: -------------------------------------------------------------------------------- 1 | const task = { 2 | match: /vue-cli-service lint/, 3 | description: 'org.vue.eslint.tasks.lint.description', 4 | link: 'https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint#injected-commands', 5 | prompts: [ 6 | { 7 | name: 'noFix', 8 | type: 'confirm', 9 | default: false, 10 | description: 'org.vue.eslint.tasks.lint.noFix' 11 | } 12 | ], 13 | onBeforeRun: ({ answers, args }) => { 14 | if (answers.noFix) args.push('--no-fix') 15 | } 16 | } 17 | 18 | module.exports = { 19 | task 20 | } 21 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/index.js: -------------------------------------------------------------------------------- 1 | module.exports = api => { 2 | api.extendPackage({ 3 | dependencies: { 4 | 'register-service-worker': '^1.7.2' 5 | } 6 | }) 7 | api.injectImports(api.entryFile, `import './registerServiceWorker'`) 8 | api.render('./template') 9 | 10 | if (api.invoking && api.hasPlugin('typescript')) { 11 | /* eslint-disable-next-line node/no-extraneous-require */ 12 | const convertFiles = require('@vue/cli-plugin-typescript/generator/convert') 13 | convertFiles(api) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/android-chrome-192x192.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/android-chrome-512x512.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/android-chrome-maskable-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/android-chrome-maskable-192x192.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/android-chrome-maskable-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/android-chrome-maskable-512x512.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/favicon-16x16.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/favicon-32x32.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/msapplication-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/msapplication-icon-144x144.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/mstile-150x150.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/img/icons/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/generator/template/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-pwa/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-pwa/logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-router/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-router/README.md: -------------------------------------------------------------------------------- 1 | # @vue/cli-plugin-router 2 | 3 | > router plugin for vue-cli 4 | 5 | ## Installing in an Already Created Project 6 | 7 | ```bash 8 | vue add router 9 | ``` 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-router/generator/template/src/views/AboutView.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | This is an about page 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-router/generator/template/src/views/HomeView.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%_ if (!rootOptions.bare) { _%> 5 | 6 | <%_ } else { _%> 7 | Welcome to Your Vue.js App 8 | <%_ } _%> 9 | 10 | 11 | <%_ if (!rootOptions.bare) { _%> 12 | 13 | 24 | <%_ } _%> 25 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-router/index.js: -------------------------------------------------------------------------------- 1 | module.exports = (api, options = {}) => {} 2 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-router/prompts.js: -------------------------------------------------------------------------------- 1 | // these prompts are used if the plugin is late-installed into an existing 2 | // project and invoked by `vue invoke`. 3 | 4 | const { chalk } = require('@vue/cli-shared-utils') 5 | 6 | module.exports = [ 7 | { 8 | name: 'historyMode', 9 | type: 'confirm', 10 | message: `Use history mode for router? ${chalk.yellow(`(Requires proper server setup for index fallback in production)`)}`, 11 | description: `By using the HTML5 History API, the URLs don't need the '#' character anymore.` 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/__tests__/tsMochaPlugin.spec.js: -------------------------------------------------------------------------------- 1 | jest.setTimeout(300000) 2 | const create = require('@vue/cli-test-utils/createUpgradableProject') 3 | test('mocha', async () => { 4 | const project = await create('ts-unit-mocha', { 5 | plugins: { 6 | '@vue/cli-plugin-typescript': {}, 7 | '@vue/cli-plugin-unit-mocha': {} 8 | } 9 | }) 10 | await project.run(`vue-cli-service test:unit`) 11 | }) 12 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/__tests__/tsPluginClassComponent.spec.js: -------------------------------------------------------------------------------- 1 | jest.setTimeout(30000) 2 | 3 | const { assertServe, assertBuild } = require('./tsPlugin.helper') 4 | 5 | const options = { 6 | plugins: { 7 | '@vue/cli-plugin-typescript': { 8 | classComponent: true 9 | } 10 | } 11 | } 12 | 13 | assertServe('ts-class-serve', options) 14 | assertBuild('ts-class-build', options, async (project) => { 15 | const app = await project.read('src/App.vue') 16 | expect(app).toMatch(`export default class App extends Vue {`) 17 | }) 18 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/__tests__/tsPluginDefault.spec.js: -------------------------------------------------------------------------------- 1 | jest.setTimeout(30000) 2 | 3 | const { assertServe, assertBuild } = require('./tsPlugin.helper') 4 | 5 | const options = { 6 | plugins: { 7 | '@vue/cli-plugin-typescript': {} 8 | } 9 | } 10 | 11 | assertServe('ts-default-serve', options) 12 | assertBuild('ts-default-build', options) 13 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/__tests__/tsPluginUnit.spec.js: -------------------------------------------------------------------------------- 1 | jest.setTimeout(40000) 2 | 3 | const create = require('@vue/cli-test-utils/createTestProject') 4 | 5 | test('jest', async () => { 6 | const project = await create('ts-unit-jest', { 7 | plugins: { 8 | '@vue/cli-plugin-typescript': {}, 9 | '@vue/cli-plugin-unit-jest': {} 10 | } 11 | }) 12 | await project.run(`vue-cli-service test:unit`) 13 | }) 14 | 15 | test('jest w/ babel', async () => { 16 | const project = await create('ts-unit-jest-babel', { 17 | plugins: { 18 | '@vue/cli-plugin-typescript': {}, 19 | '@vue/cli-plugin-babel': {}, 20 | '@vue/cli-plugin-unit-jest': {} 21 | } 22 | }) 23 | await project.run(`vue-cli-service test:unit`) 24 | }) 25 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/__tests__/tsPluginVue3.spec.js: -------------------------------------------------------------------------------- 1 | jest.setTimeout(300000) 2 | 3 | const { assertServe, assertBuild } = require('./tsPlugin.helper') 4 | 5 | const options = { 6 | vueVersion: '3', 7 | plugins: { 8 | '@vue/cli-plugin-typescript': {} 9 | } 10 | } 11 | 12 | assertServe('ts-vue-3-serve', options, true) 13 | assertBuild('ts-vue-3-build', options, undefined, true) 14 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/codemods/__testfixtures__/shims-vue.input.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import { defineComponent } from 'vue'; 3 | const component: ReturnType; 4 | export default component; 5 | } 6 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/codemods/__testfixtures__/shims-vue.output.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import { DefineComponent } from 'vue'; 3 | const component: DefineComponent<{}, {}, any>; 4 | export default component; 5 | } 6 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/codemods/__tests__/migrateComponentType.spec.js: -------------------------------------------------------------------------------- 1 | jest.autoMockOff() 2 | 3 | const { defineTest } = require('jscodeshift/dist/testUtils') 4 | 5 | defineTest(__dirname, 'migrateComponentType', null, 'shims-vue', { parser: 'ts' }) 6 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/generator/template-vue3/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | --- 2 | extend: '@vue/cli-service/generator/template/src/components/HelloWorld.vue' 3 | replace: !!js/regexp / 28 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/generator/template-vue3/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | declare module '*.vue' { 3 | import type { DefineComponent } from 'vue' 4 | const component: DefineComponent<{}, {}, any> 5 | export default component 6 | } 7 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/generator/template/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | --- 2 | extend: '@vue/cli-service/generator/template/src/components/HelloWorld.vue' 3 | replace: !!js/regexp / 24 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/generator/template/src/shims-tsx.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, { VNode } from 'vue' 2 | 3 | declare global { 4 | namespace JSX { 5 | interface Element extends VNode {} 6 | interface ElementClass extends Vue {} 7 | interface IntrinsicElements { 8 | [elem: string]: any 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/generator/template/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import Vue from 'vue' 3 | export default Vue 4 | } 5 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-typescript/logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-typescript/migrator/index.js: -------------------------------------------------------------------------------- 1 | module.exports = (api, options, rootOptions) => { 2 | api.extendPackage( 3 | { 4 | devDependencies: { 5 | typescript: require('../package.json').devDependencies.typescript 6 | } 7 | }, 8 | { warnIncompatibleVersions: false } 9 | ) 10 | 11 | // update vue 3 typescript shim 12 | if (rootOptions.vueVersion === 3) { 13 | api.transformScript('src/shims-vue.d.ts', require('../codemods/migrateComponentType')) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-unit-jest/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-unit-jest/index.js: -------------------------------------------------------------------------------- 1 | module.exports = api => { 2 | api.registerCommand('test:unit', { 3 | description: 'run unit tests with jest', 4 | usage: 'vue-cli-service test:unit [options] ', 5 | options: { 6 | '--watch': 'run tests in watch mode' 7 | }, 8 | details: 9 | `All jest command line options are supported.\n` + 10 | `See https://facebook.github.io/jest/docs/en/cli.html for more details.` 11 | }, (args, rawArgv) => { 12 | // for @vue/babel-preset-app <= v4.0.0-rc.7 13 | process.env.VUE_CLI_BABEL_TARGET_NODE = true 14 | process.env.VUE_CLI_BABEL_TRANSPILE_MODULES = true 15 | require('jest').run(rawArgv) 16 | }) 17 | } 18 | 19 | module.exports.defaultModes = { 20 | 'test:unit': 'test' 21 | } 22 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-unit-jest/jest-preset.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./presets/default/jest-preset') 2 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-unit-jest/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-unit-jest/logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-unit-jest/presets/no-babel/esmoduleTransformer.js: -------------------------------------------------------------------------------- 1 | const babelJest = require('babel-jest').default 2 | 3 | module.exports = babelJest.createTransformer({ 4 | plugins: ['@babel/plugin-transform-modules-commonjs'], 5 | babelrc: false, 6 | configFile: false 7 | }) 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-unit-jest/presets/no-babel/jest-preset.js: -------------------------------------------------------------------------------- 1 | const deepmerge = require('deepmerge') 2 | const defaultPreset = require('../default/jest-preset') 3 | 4 | // If no default babel preset exists, 5 | // we need to use a customized babel transformer to deal with es modules 6 | 7 | module.exports = deepmerge( 8 | defaultPreset, 9 | { 10 | transform: { 11 | '^.+\\.jsx?$': require.resolve('./esmoduleTransformer') 12 | }, 13 | globals: { 14 | 'vue-jest': { 15 | transform: { 16 | '^jsx?$': require.resolve('./esmoduleTransformer') 17 | } 18 | } 19 | } 20 | } 21 | ) 22 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-unit-jest/presets/typescript-and-babel/jest-preset.js: -------------------------------------------------------------------------------- 1 | const deepmerge = require('deepmerge') 2 | const defaultTsPreset = require('../typescript/jest-preset') 3 | 4 | module.exports = deepmerge( 5 | defaultTsPreset, 6 | { 7 | globals: { 8 | 'ts-jest': { 9 | babelConfig: true 10 | } 11 | } 12 | } 13 | ) 14 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-unit-jest/presets/typescript/jest-preset.js: -------------------------------------------------------------------------------- 1 | const deepmerge = require('deepmerge') 2 | const defaultPreset = require('../default/jest-preset') 3 | 4 | let tsJest = null 5 | try { 6 | tsJest = require.resolve('ts-jest') 7 | } catch (e) { 8 | throw new Error('Cannot resolve "ts-jest" module. Typescript preset requires "ts-jest" to be installed.') 9 | } 10 | 11 | module.exports = deepmerge( 12 | defaultPreset, 13 | { 14 | moduleFileExtensions: ['ts', 'tsx'], 15 | transform: { 16 | '^.+\\.tsx?$': tsJest 17 | } 18 | } 19 | ) 20 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-unit-mocha/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-unit-mocha/__tests__/mochaPlugin.spec.js: -------------------------------------------------------------------------------- 1 | jest.setTimeout(3000000) 2 | 3 | const createOutside = require('@vue/cli-test-utils/createUpgradableProject') 4 | 5 | test('should work', async () => { 6 | const project = await createOutside('unit-mocha', { 7 | plugins: { 8 | '@vue/cli-plugin-babel': {}, 9 | '@vue/cli-plugin-unit-mocha': {} 10 | } 11 | }) 12 | await project.run(`vue-cli-service test:unit`) 13 | }) 14 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-unit-mocha/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-plugin-unit-mocha/logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-unit-mocha/setup.js: -------------------------------------------------------------------------------- 1 | require('jsdom-global')(undefined, { pretendToBeVisual: true, url: 'http://localhost' }) 2 | 3 | // https://github.com/vuejs/vue-test-utils/issues/936 4 | window.Date = Date 5 | // https://github.com/vuejs/vue-next/pull/2943 6 | global.ShadowRoot = window.ShadowRoot 7 | 8 | global.SVGElement = window.SVGElement 9 | 10 | // https://github.com/vuejs/test-utils/issues/1253 11 | global.XMLSerializer = window.XMLSerializer 12 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-unit-mocha/ui.js: -------------------------------------------------------------------------------- 1 | module.exports = api => { 2 | api.describeTask({ 3 | match: /vue-cli-service test:unit/, 4 | description: 'org.vue.mocha.tasks.test.description', 5 | link: 'https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-unit-mocha#injected-commands', 6 | prompts: [ 7 | { 8 | name: 'watch', 9 | type: 'confirm', 10 | default: false, 11 | description: 'org.vue.mocha.tasks.test.watch' 12 | } 13 | ], 14 | onBeforeRun: ({ answers, args }) => { 15 | if (answers.watch) args.push('--watch') 16 | } 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-vuex/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-vuex/README.md: -------------------------------------------------------------------------------- 1 | # @vue/cli-plugin-vuex 2 | 3 | > vuex plugin for vue-cli 4 | 5 | ## Installing in an Already Created Project 6 | 7 | ```bash 8 | vue add vuex 9 | ``` 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-vuex/generator/template-vue3/src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: { 5 | }, 6 | getters: { 7 | }, 8 | mutations: { 9 | }, 10 | actions: { 11 | }, 12 | modules: { 13 | } 14 | }) 15 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-vuex/generator/template/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | Vue.use(Vuex) 5 | 6 | export default new Vuex.Store({ 7 | state: { 8 | }, 9 | getters: { 10 | }, 11 | mutations: { 12 | }, 13 | actions: { 14 | }, 15 | modules: { 16 | } 17 | }) 18 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-vuex/index.js: -------------------------------------------------------------------------------- 1 | module.exports = (api, options = {}) => {} 2 | -------------------------------------------------------------------------------- /packages/@vue/cli-plugin-vuex/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vue/cli-plugin-vuex", 3 | "version": "5.0.8", 4 | "description": "Vuex plugin for vue-cli", 5 | "main": "index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/vuejs/vue-cli.git", 9 | "directory": "packages/@vue/cli-plugin-vuex" 10 | }, 11 | "keywords": [ 12 | "vue", 13 | "cli", 14 | "vuex" 15 | ], 16 | "author": "Evan You", 17 | "license": "MIT", 18 | "bugs": { 19 | "url": "https://github.com/vuejs/vue-cli/issues" 20 | }, 21 | "homepage": "https://github.com/vuejs/vue-cli/tree/dev/packages/@vue/cli-plugin-vuex#readme", 22 | "publishConfig": { 23 | "access": "public" 24 | }, 25 | "devDependencies": { 26 | "@vue/cli-test-utils": "^5.0.8" 27 | }, 28 | "peerDependencies": { 29 | "@vue/cli-service": "^3.0.0 || ^4.0.0 || ^5.0.0-0" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/README.md: -------------------------------------------------------------------------------- 1 | # @vue/cli-service 2 | 3 | > service for vue-cli 4 | 5 | [Full Docs](https://cli.vuejs.org/) 6 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/generator/router.js: -------------------------------------------------------------------------------- 1 | module.exports = (api, options) => { 2 | require('@vue/cli-plugin-router/generator')(api, { 3 | historyMode: options.routerHistoryMode 4 | }) 5 | } 6 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/generator/template/_gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | <%_ if (rootOptions.plugins && rootOptions.plugins['@vue/cli-plugin-e2e-nightwatch']) { _%> 5 | 6 | /tests/e2e/reports/ 7 | selenium-debug.log 8 | chromedriver.log 9 | geckodriver.log 10 | <%_ } _%> 11 | <%_ if (rootOptions.plugins && rootOptions.plugins['@vue/cli-plugin-e2e-cypress']) { _%> 12 | 13 | /tests/e2e/videos/ 14 | /tests/e2e/screenshots/ 15 | <%_ } _%> 16 | 17 | <%_ if (rootOptions.plugins && rootOptions.plugins['@vue/cli-plugin-e2e-webdriverio']) { _%> 18 | 19 | /tests/e2e/logs/ 20 | <%_ } _%> 21 | 22 | # local env files 23 | .env.local 24 | .env.*.local 25 | 26 | # Log files 27 | npm-debug.log* 28 | yarn-debug.log* 29 | yarn-error.log* 30 | pnpm-debug.log* 31 | 32 | # Editor directories and files 33 | .idea 34 | .vscode 35 | *.suo 36 | *.ntvs* 37 | *.njsproj 38 | *.sln 39 | *.sw? 40 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/generator/template/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "<%- options.useBabel ? 'esnext' : 'es5' %>", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/generator/template/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-service/generator/template/public/favicon.ico -------------------------------------------------------------------------------- /packages/@vue/cli-service/generator/template/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%%= htmlWebpackPlugin.options.title %%> 9 | 10 | 11 | 12 | We're sorry but <%%= htmlWebpackPlugin.options.title %%> doesn't work properly without JavaScript enabled. Please enable it to continue. 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/generator/template/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-service/generator/template/src/assets/logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-service/generator/template/src/main.js: -------------------------------------------------------------------------------- 1 | <%_ if (rootOptions.vueVersion === '3') { _%> 2 | import { createApp } from 'vue' 3 | import App from './App.vue' 4 | 5 | createApp(App).mount('#app') 6 | <%_ } else { _%> 7 | import Vue from 'vue' 8 | import App from './App.vue' 9 | 10 | Vue.config.productionTip = false 11 | 12 | new Vue({ 13 | <%_ if (doesCompile) { _%> 14 | render: h => h(App), 15 | <%_ } else { _%> 16 | render: function (h) { return h(App) }, 17 | <%_ } _%> 18 | }).$mount('#app') 19 | <%_ } _%> 20 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/generator/vuex.js: -------------------------------------------------------------------------------- 1 | module.exports = api => { 2 | require('@vue/cli-plugin-vuex/generator')(api) 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/commands/build/demo-lib-js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- htmlWebpackPlugin.options.libName %> demo 4 | 5 | <% if (htmlWebpackPlugin.options.cssExtract) { %> 6 | 7 | <% } %> 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/commands/build/demo-wc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- htmlWebpackPlugin.options.libName %> demo 4 | 5 | 6 | 7 | <% for (const comp of htmlWebpackPlugin.options.components) { %> 8 | <<%= comp %>><%= comp %>> 9 | <% } %> 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/commands/build/entry-lib-no-default.js: -------------------------------------------------------------------------------- 1 | import './setPublicPath' 2 | export * from '~entry' 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/commands/build/entry-lib.js: -------------------------------------------------------------------------------- 1 | import './setPublicPath' 2 | import mod from '~entry' 3 | export default mod 4 | export * from '~entry' 5 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/commands/build/entry-wc.js: -------------------------------------------------------------------------------- 1 | import './setPublicPath' 2 | import Vue from 'vue' 3 | import wrap from '@vue/web-component-wrapper' 4 | 5 | // runtime shared by every component chunk 6 | import 'css-loader/dist/runtime/api.js' 7 | import 'vue-style-loader/lib/addStylesShadow' 8 | import 'vue-loader/lib/runtime/componentNormalizer' 9 | 10 | window.customElements.define('build-wc-async-app', wrap(Vue, () => import('~root/src/App.vue?shadow'))) 11 | 12 | window.customElements.define('build-wc-async-hello-world', wrap(Vue, () => import('~root/src/components/HelloWorld.vue?shadow'))) 13 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/config/index-default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vue App 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/config/prod.js: -------------------------------------------------------------------------------- 1 | /** @type {import('@vue/cli-service').ServicePlugin} */ 2 | module.exports = (api, options) => { 3 | api.chainWebpack(webpackConfig => { 4 | if (process.env.NODE_ENV === 'production') { 5 | webpackConfig 6 | .mode('production') 7 | .devtool(options.productionSourceMap ? 'source-map' : false) 8 | 9 | // disable optimization during tests to speed things up 10 | if (process.env.VUE_CLI_TEST && !process.env.VUE_CLI_TEST_MINIMIZE) { 11 | webpackConfig.optimization.minimize(false) 12 | } 13 | } 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/config/vue-loader-v15-resolve-compat/vue-loader.js: -------------------------------------------------------------------------------- 1 | module.exports = require('@vue/vue-loader-v15') 2 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/util/getAssetPath.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = function getAssetPath (options, filePath) { 4 | return options.assetsDir 5 | ? path.posix.join(options.assetsDir, filePath) 6 | : filePath 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/util/getBaseUrl.js: -------------------------------------------------------------------------------- 1 | module.exports = function getBaseUrl (options) { 2 | return options.publicPath === 'auto' ? '' : options.publicPath 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/util/getPadLength.js: -------------------------------------------------------------------------------- 1 | module.exports = function getPadLength (obj) { 2 | let longest = 10 3 | for (const name in obj) { 4 | if (name.length + 1 > longest) { 5 | longest = name.length + 1 6 | } 7 | } 8 | return longest 9 | } 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/util/getVueMajor.js: -------------------------------------------------------------------------------- 1 | const { semver, loadModule } = require('@vue/cli-shared-utils') 2 | 3 | /** 4 | * Get the major Vue version that the user project uses 5 | * @param {string} cwd the user project root 6 | * @returns {2|3} 7 | */ 8 | module.exports = function getVueMajor (cwd) { 9 | const vue = loadModule('vue', cwd) 10 | // TODO: make Vue 3 the default version 11 | const vueMajor = vue ? semver.major(vue.version) : 2 12 | return vueMajor 13 | } 14 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/util/isAbsoluteUrl.js: -------------------------------------------------------------------------------- 1 | module.exports = function isAbsoluteUrl (url) { 2 | // A URL is considered absolute if it begins with "://" or "//" 3 | return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url) 4 | } 5 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/util/resolveClientEnv.js: -------------------------------------------------------------------------------- 1 | const getBaseUrl = require('./getBaseUrl') 2 | const prefixRE = /^VUE_APP_/ 3 | 4 | module.exports = function resolveClientEnv (options, raw) { 5 | const env = {} 6 | Object.keys(process.env).forEach(key => { 7 | if (prefixRE.test(key) || key === 'NODE_ENV') { 8 | env[key] = process.env[key] 9 | } 10 | }) 11 | env.BASE_URL = getBaseUrl(options) 12 | 13 | if (raw) { 14 | return env 15 | } 16 | 17 | for (const key in env) { 18 | env[key] = JSON.stringify(env[key]) 19 | } 20 | return { 21 | 'process.env': env 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/util/resolveLocal.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = function resolveLocal (...args) { 4 | return path.join(__dirname, '../../', ...args) 5 | } 6 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/lib/webpack/MovePlugin.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra') 2 | 3 | module.exports = class MovePlugin { 4 | constructor (from, to) { 5 | this.from = from 6 | this.to = to 7 | } 8 | 9 | apply (compiler) { 10 | compiler.hooks.done.tap('move-plugin', () => { 11 | if (fs.existsSync(this.from)) { 12 | fs.moveSync(this.from, this.to, { overwrite: true }) 13 | } 14 | }) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-service/logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-service/migrator/index.js: -------------------------------------------------------------------------------- 1 | module.exports = (api) => { 2 | if (api.hasPlugin('vue-next')) { 3 | api.extendPackage({ 4 | devDependencies: { 5 | 'vue-cli-plugin-vue-next': null 6 | } 7 | }, 8 | { 9 | prune: true 10 | }) 11 | 12 | api.exitLog('vue-cli-plugin-vue-next is removed because Vue 3 support has been built into the core plugins.') 13 | } 14 | 15 | // TODO: lint-staged update 16 | } 17 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "cli-service-test.ts", 4 | "index.d.ts", 5 | "ProjectOptions.d.ts" 6 | ], 7 | "compilerOptions": { 8 | "module": "commonjs", 9 | "lib": [ 10 | "es6" 11 | ], 12 | "noImplicitAny": true, 13 | "noImplicitThis": true, 14 | "strictNullChecks": true, 15 | "esModuleInterop": true, 16 | "strictFunctionTypes": true, 17 | "types": [], 18 | "noEmit": true, 19 | "forceConsistentCasingInFileNames": true, 20 | "baseUrl": "." 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/@vue/cli-service/webpack.config.js: -------------------------------------------------------------------------------- 1 | // this file is for cases where we need to access the 2 | // webpack config as a file when using CLI commands. 3 | 4 | let service = process.VUE_CLI_SERVICE 5 | 6 | if (!service || process.env.VUE_CLI_API_MODE) { 7 | const Service = require('./lib/Service') 8 | service = new Service(process.env.VUE_CLI_CONTEXT || process.cwd()) 9 | service.init(process.env.VUE_CLI_MODE || process.env.NODE_ENV) 10 | } 11 | 12 | module.exports = service.resolveWebpackConfig() 13 | -------------------------------------------------------------------------------- /packages/@vue/cli-shared-utils/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-shared-utils/README.md: -------------------------------------------------------------------------------- 1 | # @vue/cli-shared-utils 2 | 3 | > shared-utils for vue-cli 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-shared-utils/index.js: -------------------------------------------------------------------------------- 1 | [ 2 | 'env', 3 | 'exit', 4 | 'ipc', 5 | 'logger', 6 | 'module', 7 | 'object', 8 | 'openBrowser', 9 | 'pkg', 10 | 'pluginResolution', 11 | 'pluginOrder', 12 | 'launch', 13 | 'request', 14 | 'spinner', 15 | 'validate' 16 | ].forEach(m => { 17 | Object.assign(exports, require(`./lib/${m}`)) 18 | }) 19 | 20 | exports.chalk = require('chalk') 21 | exports.execa = require('execa') 22 | exports.semver = require('semver') 23 | 24 | Object.defineProperty(exports, 'installedBrowsers', { 25 | enumerable: true, 26 | get () { 27 | return exports.getInstalledBrowsers() 28 | } 29 | }) 30 | -------------------------------------------------------------------------------- /packages/@vue/cli-shared-utils/lib/_silence.js: -------------------------------------------------------------------------------- 1 | module.exports = function silence (logName, exports) { 2 | const logs = {} 3 | Object.keys(exports).forEach(key => { 4 | if (key !== 'error') { 5 | exports[key] = (...args) => { 6 | if (!logs[key]) logs[key] = [] 7 | logs[key].push(args) 8 | } 9 | } 10 | }) 11 | exports[logName] = logs 12 | } 13 | -------------------------------------------------------------------------------- /packages/@vue/cli-shared-utils/lib/exit.js: -------------------------------------------------------------------------------- 1 | exports.exitProcess = !process.env.VUE_CLI_API_MODE && !process.env.VUE_CLI_TEST 2 | 3 | exports.exit = function (code) { 4 | if (exports.exitProcess) { 5 | process.exit(code) 6 | } else if (code > 0) { 7 | throw new Error(`Process exited with code ${code}`) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-shared-utils/lib/launch.js: -------------------------------------------------------------------------------- 1 | const launch = require('launch-editor') 2 | 3 | exports.launch = (...args) => { 4 | const file = args[0] 5 | console.log(`Opening ${file}...`) 6 | let cb = args[args.length - 1] 7 | if (typeof cb !== 'function') { 8 | cb = null 9 | } 10 | launch(...args, (fileName, errorMessage) => { 11 | console.error(`Unable to open '${fileName}'`, errorMessage) 12 | console.log(`Try setting the EDITOR env variable. More info: https://github.com/yyx990803/launch-editor`) 13 | 14 | if (cb) cb(fileName, errorMessage) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /packages/@vue/cli-shared-utils/lib/pkg.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const path = require('path') 3 | const readPkg = require('read-pkg') 4 | 5 | exports.resolvePkg = function (context) { 6 | if (fs.existsSync(path.join(context, 'package.json'))) { 7 | return readPkg.sync({ cwd: context }) 8 | } 9 | return {} 10 | } 11 | -------------------------------------------------------------------------------- /packages/@vue/cli-shared-utils/lib/request.js: -------------------------------------------------------------------------------- 1 | exports.request = { 2 | get (url, opts) { 3 | // lazy require 4 | const fetch = require('node-fetch') 5 | const reqOpts = { 6 | method: 'GET', 7 | timeout: 30000, 8 | ...opts 9 | } 10 | 11 | return fetch(url, reqOpts).then(result => result.json()) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/@vue/cli-shared-utils/lib/validate.js: -------------------------------------------------------------------------------- 1 | const { exit } = require('./exit') 2 | 3 | // proxy to joi for option validation 4 | exports.createSchema = fn => { 5 | const joi = require('joi') 6 | 7 | let schema = fn(joi) 8 | if (typeof schema === 'object' && typeof schema.validate !== 'function') { 9 | schema = joi.object(schema) 10 | } 11 | 12 | return schema 13 | } 14 | 15 | exports.validate = (obj, schema, cb) => { 16 | const { error } = schema.validate(obj) 17 | if (error) { 18 | cb(error.details[0].message) 19 | 20 | if (process.env.VUE_CLI_TEST) { 21 | throw error 22 | } else { 23 | exit(1) 24 | } 25 | } 26 | } 27 | 28 | exports.validateSync = (obj, schema) => { 29 | const { error } = schema.validate(obj) 30 | if (error) { 31 | throw error 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/@vue/cli-test-utils/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-test-utils/README.md: -------------------------------------------------------------------------------- 1 | # @vue/cli-test-utils 2 | 3 | > test-utils for vue-cli 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-test-utils/assertPromptModule.d.ts: -------------------------------------------------------------------------------- 1 | import { PromptModuleAPI } from '@vue/cli' 2 | 3 | interface CliPromptModule { 4 | (api: PromptModuleAPI): void 5 | } 6 | 7 | declare function assertPromptModule( 8 | module: CliPromptModule | CliPromptModule[], 9 | expectedPrompts: object[], 10 | expectedOptions: object, 11 | opts?: { 12 | pluginsOnly?: boolean 13 | }, 14 | ): Promise 15 | 16 | export = assertPromptModule 17 | -------------------------------------------------------------------------------- /packages/@vue/cli-test-utils/createJSONServer.d.ts: -------------------------------------------------------------------------------- 1 | import { Application } from 'express' 2 | 3 | declare function createJSONServer( 4 | /** 5 | * Either a path to a json file (e.g. 'db.json') or an object in memory 6 | * 7 | * Default: 8 | *{ 9 | * 'posts': [ 10 | * { 'id': 1, 'title': 'json-server', 'author': 'typicode' } 11 | * ], 12 | * 'comments': [ 13 | * { 'id': 1, 'body': 'some comment', 'postId': 1 } 14 | * ], 15 | * 'profile': { 'name': 'typicode' } 16 | *} 17 | */ 18 | data?: string | object, 19 | ): Application 20 | 21 | export = createJSONServer 22 | -------------------------------------------------------------------------------- /packages/@vue/cli-test-utils/createJSONServer.js: -------------------------------------------------------------------------------- 1 | const jsonServer = require('json-server') 2 | 3 | const defaultData = () => ({ 4 | 'posts': [ 5 | { 'id': 1, 'title': 'json-server', 'author': 'typicode' } 6 | ], 7 | 'comments': [ 8 | { 'id': 1, 'body': 'some comment', 'postId': 1 } 9 | ], 10 | 'profile': { 'name': 'typicode' } 11 | }) 12 | 13 | module.exports = function createJSONServer (data = defaultData()) { 14 | const server = jsonServer.create() 15 | const router = jsonServer.router(data) 16 | const middlewares = jsonServer.defaults() 17 | 18 | server.use(middlewares) 19 | server.use(router) 20 | return server 21 | } 22 | -------------------------------------------------------------------------------- /packages/@vue/cli-test-utils/createServer.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as http from 'http' 3 | 4 | declare function createServer(options: { 5 | /** 6 | * Set a sub directory to be served 7 | */ 8 | root: string 9 | }): http.Server 10 | 11 | export = createServer 12 | -------------------------------------------------------------------------------- /packages/@vue/cli-test-utils/createServer.js: -------------------------------------------------------------------------------- 1 | const handler = require('serve-handler') 2 | const http = require('http') 3 | 4 | module.exports = function createServer (options) { 5 | const server = http.createServer((request, response) => { 6 | return handler(request, response, { 7 | public: options.root 8 | }) 9 | }) 10 | 11 | return server 12 | } 13 | -------------------------------------------------------------------------------- /packages/@vue/cli-test-utils/generateWithPlugin.d.ts: -------------------------------------------------------------------------------- 1 | import { GeneratorAPI, Preset } from '@vue/cli' 2 | 3 | type ApplyFn = ( 4 | api: GeneratorAPI, 5 | options: any, 6 | rootOptions: Preset, 7 | invoking: boolean, 8 | ) => any 9 | interface Plugin { 10 | /** package name from plugin */ 11 | id: string 12 | /** generator function from plugin */ 13 | apply: ApplyFn 14 | /** parameter passed to generator function */ 15 | options?: any 16 | } 17 | 18 | /** 19 | * invoke generator function, and generate file tree in memory 20 | */ 21 | declare function generateWithPlugin( 22 | plugin: Plugin | Plugin[], 23 | ): Promise<{ 24 | /** package.json Object */ 25 | pkg: Record 26 | /** virtual file tree, file path is the key of Object */ 27 | files: { 28 | [filePath: string]: string | Buffer 29 | } 30 | }> 31 | 32 | export = generateWithPlugin 33 | -------------------------------------------------------------------------------- /packages/@vue/cli-test-utils/generateWithPlugin.js: -------------------------------------------------------------------------------- 1 | const Generator = require('@vue/cli/lib/Generator') 2 | 3 | module.exports = async function generateWithPlugin (plugin, pkg) { 4 | process.env.VUE_CLI_SKIP_WRITE = true 5 | const generator = new Generator('/', { 6 | plugins: [].concat(plugin) 7 | }) 8 | await generator.generate() 9 | return { 10 | pkg: generator.pkg, 11 | files: generator.files 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/@vue/cli-test-utils/launchPuppeteer.d.ts: -------------------------------------------------------------------------------- 1 | import { Browser, Page } from 'puppeteer' 2 | 3 | declare function launchPuppeteer( 4 | url: string, 5 | ): Promise<{ 6 | browser: Browser 7 | page: Page 8 | logs: string[] 9 | requestUrls: string[] 10 | }> 11 | 12 | export = launchPuppeteer 13 | -------------------------------------------------------------------------------- /packages/@vue/cli-test-utils/serveWithPuppeteer.d.ts: -------------------------------------------------------------------------------- 1 | import execa = require('execa') 2 | import { Browser, Page } from 'puppeteer' 3 | 4 | interface Helpers { 5 | getText: (selector: string) => Promise 6 | hasElement: (selector: string) => Promise 7 | hasClass: (selector: string, cls: string) => Promise 8 | } 9 | 10 | interface Utils { 11 | url: string 12 | browser: Browser 13 | page: Page 14 | /** wait for hot replacement */ 15 | nextUpdate: () => Promise 16 | helpers: Helpers 17 | requestUrls: string[] 18 | } 19 | 20 | declare function serveWithPuppeteer( 21 | serve: () => execa.ExecaChildProcess, 22 | /** Function which executes test codes*/ 23 | test: (arg: Utils) => any, 24 | /** 25 | * don't launch puppeteer. 26 | * Defaults to `false`. 27 | */ 28 | noPuppeteer?: boolean, 29 | ): Promise 30 | 31 | export = serveWithPuppeteer 32 | -------------------------------------------------------------------------------- /packages/@vue/cli-test-utils/types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "cli-test-utils-test.ts" 4 | ], 5 | "compilerOptions": { 6 | "module": "commonjs", 7 | "lib": [ 8 | "es6", 9 | "dom" 10 | ], 11 | "noImplicitAny": true, 12 | "noImplicitThis": true, 13 | "strictNullChecks": true, 14 | "esModuleInterop": true, 15 | "strictFunctionTypes": true, 16 | "types": [], 17 | "noEmit": true, 18 | "forceConsistentCasingInFileNames": true, 19 | "baseUrl": "." 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-webpack/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: [ 4 | 'plugin:vue/essential', 5 | '@vue/standard' 6 | ], 7 | globals: { 8 | ClientAddonApi: false, 9 | mapSharedData: false, 10 | Vue: false, 11 | name: 'off' 12 | }, 13 | parserOptions: { 14 | parser: '@babel/eslint-parser', 15 | babelOptions: { 16 | cwd: __dirname 17 | } 18 | }, 19 | rules: { 20 | 'vue/multi-word-component-names': 'warn' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-webpack/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-webpack/README.md: -------------------------------------------------------------------------------- 1 | # Webpack dashboard 2 | 3 | > Dashboard & analyzer components for @vue/cli-ui 4 | 5 | ``` 6 | yarn serve 7 | yarn build 8 | ``` 9 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-webpack/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/cli-plugin-babel/preset'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-webpack/public/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-ui-addon-webpack/public/.gitkeep -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-webpack/src/assets/speeds.json: -------------------------------------------------------------------------------- 1 | { 2 | "global": { "title": "Global Average", "mbps": 7, "rtt": 30 }, 3 | "edge": { "title": "Mobile Edge", "mbps": 0.24, "rtt": 840 }, 4 | "2g": { "title": "2G", "mbps": 0.28, "rtt": 800 }, 5 | "3gs": { "title": "3G Slow", "mbps": 0.4, "rtt": 400 }, 6 | "3gb": { "title": "3G Basic", "mbps": 1.6, "rtt": 300 }, 7 | "3gf": { "title": "3G Fast", "mbps": 1.6, "rtt": 150 }, 8 | "4g": { "title": "4G", "mbps": 9, "rtt": 170 }, 9 | "lte": { "title": "LTE", "mbps": 12, "rtt": 70 }, 10 | "dup": { "title": "Dial Up", "mbps": 0.05, "rtt": 120 }, 11 | "dsl": { "title": "DSL", "mbps": 1.5, "rtt": 50 }, 12 | "cable": { "title": "Cable", "mbps": 5, "rtt": 28 }, 13 | "fios": { "title": "FIOS", "mbps": 20, "rtt": 4 } 14 | } 15 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-webpack/src/assets/webpack.svg: -------------------------------------------------------------------------------- 1 | icon-square-small -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-webpack/src/filters.js: -------------------------------------------------------------------------------- 1 | export function size (size, unit = '', precision = 1) { 2 | const kb = { 3 | label: 'k', 4 | value: 1024 5 | } 6 | const mb = { 7 | label: 'M', 8 | value: 1024 * 1024 9 | } 10 | let denominator 11 | 12 | if (size >= mb.value) { 13 | denominator = mb 14 | } else { 15 | denominator = kb 16 | if (size < kb.value * 0.92 && precision === 0) { 17 | precision = 1 18 | } 19 | } 20 | return (size / denominator.value).toFixed(precision) + denominator.label + unit 21 | } 22 | 23 | export function round (value, precision) { 24 | return Math.round(value * precision) / precision 25 | } 26 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-webpack/src/locales/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "org": { 3 | "vue": { 4 | "vue-webpack": { 5 | "test-view": "I'm a custom view" 6 | } 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-webpack/vue.config.js: -------------------------------------------------------------------------------- 1 | const { clientAddonConfig } = require('@vue/cli-ui') 2 | 3 | module.exports = { 4 | ...clientAddonConfig({ 5 | id: 'org.vue.webpack.client-addon', 6 | port: 8096 7 | }) 8 | } 9 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-widgets/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | not ie 11 5 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-widgets/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | extends: [ 7 | 'plugin:vue/essential', 8 | '@vue/standard' 9 | ], 10 | rules: { 11 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 13 | 'vue/multi-word-component-names': 'warn' 14 | }, 15 | parserOptions: { 16 | parser: '@babel/eslint-parser', 17 | babelOptions: { 18 | cwd: __dirname 19 | } 20 | }, 21 | globals: { 22 | ClientAddonApi: false, 23 | mapSharedData: false, 24 | Vue: false, 25 | name: 'off' 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-widgets/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-widgets/README.md: -------------------------------------------------------------------------------- 1 | # cli-ui-addon-widgets 2 | 3 | ## Project setup 4 | ``` 5 | yarn install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | yarn run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | yarn run build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | yarn run lint 21 | ``` 22 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-widgets/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/cli-plugin-babel/preset'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-widgets/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-ui-addon-widgets/public/favicon.ico -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-widgets/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | cli-ui-addon-widgets 9 | 10 | 11 | 12 | We're sorry but cli-ui-addon-widgets doesn't work properly without JavaScript enabled. Please enable it to continue. 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-widgets/src/util/consts.js: -------------------------------------------------------------------------------- 1 | export const UPDATES_ICONS = { 2 | ok: 'check_circle', 3 | loading: 'hourglass_full', 4 | attention: 'error' 5 | } 6 | 7 | export const UPDATES_ICON_CLASSES = { 8 | ok: 'success', 9 | loading: '', 10 | attention: 'warning' 11 | } 12 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui-addon-widgets/vue.config.js: -------------------------------------------------------------------------------- 1 | const { clientAddonConfig } = require('@vue/cli-ui') 2 | 3 | module.exports = { 4 | ...clientAddonConfig({ 5 | id: 'org.vue.webpack.client-addon', 6 | port: 8097 7 | }) 8 | } 9 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/.env.development: -------------------------------------------------------------------------------- 1 | VUE_APP_CLI_UI_DEV=true 2 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/.env.production: -------------------------------------------------------------------------------- 1 | VUE_APP_CLI_UI_URL= 2 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | 22 | /live/ 23 | /live-test/ 24 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/api/client-addon.js: -------------------------------------------------------------------------------- 1 | const { createSchema, validateSync } = require('@vue/cli-shared-utils') 2 | 3 | const schema = createSchema(joi => ({ 4 | id: joi.string().required(), 5 | path: joi.string(), 6 | url: joi.string() 7 | })) 8 | 9 | exports.validateClientAddon = (options) => { 10 | validateSync(options, schema) 11 | } 12 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/api/configuration.js: -------------------------------------------------------------------------------- 1 | const { createSchema, validateSync } = require('@vue/cli-shared-utils') 2 | 3 | const schema = createSchema(joi => ({ 4 | id: joi.string().required(), 5 | name: joi.string().required(), 6 | description: joi.string(), 7 | link: joi.string().uri(), 8 | icon: joi.string(), 9 | files: joi.object().pattern(/^/, joi.object({ 10 | json: joi.array().items(joi.string()), 11 | js: joi.array().items(joi.string()), 12 | yaml: joi.array().items(joi.string()), 13 | package: joi.string() 14 | })), 15 | onRead: joi.func().required(), 16 | onWrite: joi.func().required() 17 | })) 18 | 19 | exports.validateConfiguration = (options) => { 20 | validateSync(options, schema) 21 | } 22 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/api/notify.js: -------------------------------------------------------------------------------- 1 | const { createSchema, validateSync } = require('@vue/cli-shared-utils') 2 | 3 | const schema = createSchema(joi => ({ 4 | title: joi.string().required(), 5 | message: joi.string().required(), 6 | icon: joi.string() 7 | })) 8 | 9 | exports.validateNotify = (options) => { 10 | validateSync(options, schema) 11 | } 12 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/api/progress.js: -------------------------------------------------------------------------------- 1 | const { createSchema, validateSync } = require('@vue/cli-shared-utils') 2 | 3 | const schema = createSchema(joi => ({ 4 | status: joi.string().required(), 5 | error: joi.string(), 6 | info: joi.string(), 7 | progress: joi.number(), 8 | args: joi.array() 9 | })) 10 | 11 | exports.validateProgress = (options) => { 12 | validateSync(options, schema) 13 | } 14 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/api/suggestion.js: -------------------------------------------------------------------------------- 1 | const { createSchema, validateSync } = require('@vue/cli-shared-utils') 2 | 3 | const schema = createSchema(joi => ({ 4 | id: joi.string().required(), 5 | label: joi.string().required(), 6 | type: joi.string().required(), 7 | handler: joi.func(), 8 | actionLink: joi.string(), 9 | importance: joi.string(), 10 | message: joi.string(), 11 | link: joi.string(), 12 | image: joi.string() 13 | })) 14 | 15 | exports.validateSuggestion = (options) => { 16 | validateSync(options, schema) 17 | } 18 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/api/view.js: -------------------------------------------------------------------------------- 1 | const { createSchema, validateSync } = require('@vue/cli-shared-utils') 2 | 3 | const viewSchema = createSchema(joi => ({ 4 | id: joi.string().required(), 5 | name: joi.string().required().description('route name (vue-router)'), 6 | icon: joi.string(), 7 | tooltip: joi.string().required(), 8 | projectTypes: joi.array().items(joi.string()) 9 | })) 10 | 11 | const badgeSchema = createSchema(joi => ({ 12 | id: joi.string().required(), 13 | type: joi.string(), 14 | label: joi.string().required(), 15 | priority: joi.number().integer(), 16 | hidden: joi.boolean() 17 | })) 18 | 19 | exports.validateView = (options) => { 20 | validateSync(options, viewSchema) 21 | } 22 | 23 | exports.validateBadge = (options) => { 24 | validateSync(options, badgeSchema) 25 | } 26 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/channels.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | CWD_CHANGED: 'cwd_changed', 3 | PROGRESS_CHANGED: 'progress_changed', 4 | PROGRESS_REMOVED: 'progress_removed', 5 | CONSOLE_LOG_ADDED: 'console_log_added', 6 | TASK_CHANGED: 'task_changed', 7 | TASK_LOG_ADDED: 'task_log_added', 8 | VIEW_ADDED: 'view_added', 9 | VIEW_REMOVED: 'view_removed', 10 | VIEW_CHANGED: 'view_changed', 11 | CLIENT_ADDON_ADDED: 'client_addon_added', 12 | SHARED_DATA_UPDATED: 'shared_data_updated', 13 | PLUGIN_ACTION_CALLED: 'plugin_action_called', 14 | PLUGIN_ACTION_RESOLVED: 'plugin_action_resolved', 15 | LOCALE_ADDED: 'locale_added', 16 | SUGGESTION_ADDED: 'suggestion_added', 17 | SUGGESTION_REMOVED: 'suggestion_removed', 18 | SUGGESTION_UPDATED: 'suggestion_updated', 19 | ROUTE_REQUESTED: 'route_requested' 20 | } 21 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/connectors/app.js: -------------------------------------------------------------------------------- 1 | const channels = require('../channels') 2 | 3 | function requestRoute (route, context) { 4 | context.pubsub.publish(channels.ROUTE_REQUESTED, { routeRequested: route }) 5 | } 6 | 7 | module.exports = { 8 | requestRoute 9 | } 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/connectors/cwd.js: -------------------------------------------------------------------------------- 1 | const channels = require('../channels') 2 | const fs = require('fs') 3 | const path = require('path') 4 | 5 | let cwd = process.cwd() 6 | 7 | function normalize (value) { 8 | if (value.length === 1) return value 9 | const lastChar = value.charAt(value.length - 1) 10 | if (lastChar === path.sep) { 11 | value = value.substr(0, value.length - 1) 12 | } 13 | return value 14 | } 15 | 16 | module.exports = { 17 | get: () => cwd, 18 | set: (value, context) => { 19 | value = normalize(value) 20 | if (!fs.existsSync(value)) return 21 | cwd = value 22 | process.env.VUE_CLI_CONTEXT = value 23 | context.pubsub.publish(channels.CWD_CHANGED, { cwdChanged: value }) 24 | try { 25 | process.chdir(value) 26 | } catch (err) {} 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/connectors/files.js: -------------------------------------------------------------------------------- 1 | const { launch } = require('@vue/cli-shared-utils') 2 | const path = require('path') 3 | // Connectors 4 | const cwd = require('./cwd') 5 | const git = require('./git') 6 | const logs = require('./logs') 7 | 8 | async function openInEditor (input, context) { 9 | let query 10 | if (input.gitPath) { 11 | query = await git.resolveFile(input.file, context) 12 | } else { 13 | query = path.resolve(cwd.get(), input.file) 14 | } 15 | if (input.line) { 16 | query += `:${input.line}` 17 | if (input.column) { 18 | query += `:${input.column}` 19 | } 20 | } 21 | logs.add({ 22 | message: `Opening file '${query}' in code editor...`, 23 | type: 'info' 24 | }, context) 25 | launch(query) 26 | return true 27 | } 28 | 29 | module.exports = { 30 | openInEditor 31 | } 32 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/context.js: -------------------------------------------------------------------------------- 1 | const { db } = require('./util/db') 2 | const pubsub = require('./pubsub') 3 | const cwd = require('./connectors/cwd') 4 | 5 | // Context passed to all resolvers (third argument) 6 | // eslint-disable-next-line no-unused-vars 7 | module.exports = ({ req } = {}) => { 8 | return { 9 | db, 10 | pubsub, 11 | cwd: cwd.get() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/directives.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // GraphQL directives here 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/mocks.js: -------------------------------------------------------------------------------- 1 | // Enable mocking in vue.config.js with `"pluginOptions": { "graphqlMock": true }` 2 | // Customize mocking: https://www.apollographql.com/docs/graphql-tools/mocking.html#Customizing-mocks 3 | module.exports = { 4 | // Mock resolvers here 5 | } 6 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/pubsub.js: -------------------------------------------------------------------------------- 1 | const { PubSub } = require('graphql-subscriptions') 2 | 3 | const pubsub = new PubSub() 4 | pubsub.ee.setMaxListeners(Infinity) 5 | module.exports = pubsub 6 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/util/command.js: -------------------------------------------------------------------------------- 1 | const { 2 | hasYarn, 3 | hasProjectYarn, 4 | hasPnpm3OrLater, 5 | hasProjectPnpm 6 | } = require('@vue/cli-shared-utils') 7 | const { loadOptions } = require('@vue/cli/lib/options') 8 | 9 | exports.getCommand = function (cwd = undefined) { 10 | if (!cwd) { 11 | return loadOptions().packageManager || (hasYarn() ? 'yarn' : hasPnpm3OrLater() ? 'pnpm' : 'npm') 12 | } 13 | return hasProjectYarn(cwd) ? 'yarn' : hasProjectPnpm(cwd) ? 'pnpm' : 'npm' 14 | } 15 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/util/db.js: -------------------------------------------------------------------------------- 1 | const Lowdb = require('lowdb') 2 | const FileSync = require('lowdb/adapters/FileSync') 3 | const path = require('path') 4 | const { rcFolder } = require('./rcFolder') 5 | 6 | const db = new Lowdb(new FileSync(path.resolve(rcFolder, 'db.json'))) 7 | 8 | // Seed an empty DB 9 | db.defaults({ 10 | projects: [], 11 | foldersFavorite: [], 12 | tasks: [], 13 | config: {} 14 | }).write() 15 | 16 | module.exports = { 17 | db 18 | } 19 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/util/parse-args.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @param {string} args 3 | */ 4 | exports.parseArgs = function (args) { 5 | const parts = args.split(/\s+/) 6 | const result = [] 7 | let arg 8 | let index = 0 9 | for (const part of parts) { 10 | const l = part.length 11 | if (!arg && part.charAt(0) === '"') { 12 | arg = part.substr(1) 13 | } else if (part.charAt(l - 1) === '"' && ( 14 | l === 1 || part.charAt(l - 2) !== '\\' 15 | )) { 16 | arg += args.charAt(index - 1) + part.substr(0, l - 1) 17 | result.push(arg) 18 | arg = null 19 | } else if (arg) { 20 | arg += args.charAt(index - 1) + part 21 | } else { 22 | result.push(part) 23 | } 24 | index += part.length + 1 25 | } 26 | return result 27 | } 28 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/util/rcFolder.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra') 2 | const path = require('path') 3 | 4 | const { getRcPath } = require('@vue/cli/lib/util/rcPath') 5 | 6 | let folder 7 | 8 | if (process.env.VUE_CLI_UI_TEST) { 9 | folder = path.resolve(__dirname, '../../live-test') 10 | // Clean DB 11 | fs.removeSync(path.resolve(__dirname, folder)) 12 | } else if (process.env.VUE_APP_CLI_UI_DEV) { 13 | folder = path.resolve(__dirname, '../../live') 14 | } else { 15 | folder = 16 | (process.env.VUE_CLI_UI_DB_PATH && 17 | path.resolve(__dirname, process.env.VUE_CLI_UI_DB_PATH)) || 18 | getRcPath('.vue-cli-ui') 19 | } 20 | 21 | fs.ensureDirSync(path.resolve(__dirname, folder)) 22 | 23 | exports.rcFolder = folder 24 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/util/stats.js: -------------------------------------------------------------------------------- 1 | const stats = new Map() 2 | 3 | exports.get = (type, id) => { 4 | let dic = stats.get(type) 5 | if (!dic) { 6 | dic = new Map() 7 | stats.set(type, dic) 8 | } 9 | let stat = dic.get(id) 10 | if (!stat) { 11 | stat = { 12 | value: 0 13 | } 14 | dic.set(id, stat) 15 | } 16 | return stat 17 | } 18 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/util/strings.js: -------------------------------------------------------------------------------- 1 | exports.getHttpsGitURL = url => { 2 | if (url.startsWith('http')) { 3 | return url.replace('.git', '') 4 | } else if (url.startsWith('git@')) { 5 | return url 6 | .replace(':', '/') 7 | .replace('git@', 'https://') 8 | .replace(/.git([^.git]*)$/, '') 9 | } 10 | return url 11 | } 12 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/apollo-server/util/terminate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | terminateTree() { 4 | for cpid in $(/usr/bin/pgrep -P $1); do 5 | terminateTree $cpid 6 | done 7 | kill -9 $1 > /dev/null 2>&1 8 | } 9 | 10 | for pid in $*; do 11 | terminateTree $pid 12 | done 13 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/cli-plugin-babel/preset'] 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "pluginsFile": "tests/e2e/plugins/index.js" 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-ui/public/favicon.ico -------------------------------------------------------------------------------- /packages/@vue/cli-ui/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Vue CLI 9 | 10 | 11 | 12 | We're sorry but cli-ui doesn't work properly without JavaScript enabled. Please enable it to continue. 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/server.js: -------------------------------------------------------------------------------- 1 | exports.server = require('./graphql-server') 2 | exports.portfinder = require('portfinder') 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/assets/done.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-ui/src/assets/done.png -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/assets/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-ui/src/assets/error.png -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-ui/src/assets/logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/components/app/AppLoading.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 24 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/components/app/TopBar.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | Vue 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 36 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/components/content/ListFilter.vue: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/components/content/ListSort.vue: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/components/prompt/PromptConfirm.vue: -------------------------------------------------------------------------------- 1 | 2 | 6 | answer(value)" 10 | > 11 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 29 | 30 | 37 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/components/prompt/PromptError.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ $t(error.message) }} 6 | 7 | 8 | 9 | 10 | 20 | 21 | 28 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/components/prompt/PromptInput.vue: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | answer(value)" 18 | /> 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 35 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/components/suggestion/SuggestionBarList.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | 13 | 23 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/filters.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Display a folder path 3 | * @param {string} value path 4 | * @param {number} maxLength maximum length of displayed path 5 | */ 6 | export function folder (value, maxLength = -1) { 7 | value = value.replace(/\\/g, '/') 8 | 9 | if (value.charAt(value.length - 1) !== '/') { 10 | value += '/' 11 | } 12 | 13 | if (maxLength !== -1 && value.length > maxLength) { 14 | const exceeded = value.length - maxLength + 3 15 | const firstEnd = Math.floor(maxLength / 2 - exceeded / 2) 16 | const lastStart = Math.ceil(maxLength / 2 + exceeded / 2) 17 | value = value.substring(0, firstEnd) + '...' + value.substring(lastStart) 18 | } 19 | 20 | return value 21 | } 22 | 23 | export function date (value) { 24 | return new Date(value).toLocaleString() 25 | } 26 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/app/routeRequested.gql: -------------------------------------------------------------------------------- 1 | subscription routeRequested { 2 | routeRequested 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/client-addon/clientAddonAdded.gql: -------------------------------------------------------------------------------- 1 | #import "./clientAddonFragment.gql" 2 | 3 | subscription clientAddonAdded { 4 | clientAddonAdded { 5 | ...clientAddon 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/client-addon/clientAddonFragment.gql: -------------------------------------------------------------------------------- 1 | fragment clientAddon on ClientAddon { 2 | id 3 | url 4 | } 5 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/client-addon/clientAddons.gql: -------------------------------------------------------------------------------- 1 | #import "./clientAddonFragment.gql" 2 | 3 | query clientAddons { 4 | clientAddons { 5 | ...clientAddon 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/configuration/configuration.gql: -------------------------------------------------------------------------------- 1 | #import "./configurationFragment.gql" 2 | #import "../prompt/promptFragment.gql" 3 | 4 | query configuration ($id: ID!) { 5 | configuration(id: $id) { 6 | ...configuration 7 | link 8 | tabs { 9 | id 10 | label 11 | icon 12 | prompts { 13 | ...prompt 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/configuration/configurationCancel.gql: -------------------------------------------------------------------------------- 1 | #import "./configurationFragment.gql" 2 | 3 | mutation configurationCancel ($id: ID!) { 4 | configurationCancel (id: $id) { 5 | ...configuration 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/configuration/configurationFragment.gql: -------------------------------------------------------------------------------- 1 | fragment configuration on Configuration { 2 | id 3 | name 4 | description 5 | icon 6 | plugin { 7 | id 8 | logo 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/configuration/configurationSave.gql: -------------------------------------------------------------------------------- 1 | #import "./configurationFragment.gql" 2 | 3 | mutation configurationSave ($id: ID!) { 4 | configurationSave (id: $id) { 5 | ...configuration 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/configuration/configurations.gql: -------------------------------------------------------------------------------- 1 | #import "./configurationFragment.gql" 2 | 3 | query configurations { 4 | configurations { 5 | ...configuration 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/connected/connected.gql: -------------------------------------------------------------------------------- 1 | query connected { 2 | connected @client 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/connected/connectedSet.gql: -------------------------------------------------------------------------------- 1 | mutation connectedSet ($value: Boolean!) { 2 | connectedSet (value: $value) @client 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/console-log/consoleLogAdded.gql: -------------------------------------------------------------------------------- 1 | #import "./consoleLogFragment.gql" 2 | 3 | subscription consoleLogAdded { 4 | consoleLogAdded { 5 | ...consoleLog 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/console-log/consoleLogFragment.gql: -------------------------------------------------------------------------------- 1 | fragment consoleLog on ConsoleLog { 2 | id 3 | type 4 | message 5 | tag 6 | date 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/console-log/consoleLogLast.gql: -------------------------------------------------------------------------------- 1 | #import "./consoleLogFragment.gql" 2 | 3 | query consoleLogLast { 4 | consoleLogLast { 5 | ...consoleLog 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/console-log/consoleLogs.gql: -------------------------------------------------------------------------------- 1 | #import "./consoleLogFragment.gql" 2 | 3 | query consoleLogs { 4 | consoleLogs { 5 | ...consoleLog 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/console-log/consoleLogsClear.gql: -------------------------------------------------------------------------------- 1 | #import "./consoleLogFragment.gql" 2 | 3 | mutation consoleLogsClear { 4 | consoleLogsClear { 5 | ...consoleLog 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/cwd/cwd.gql: -------------------------------------------------------------------------------- 1 | query cwd { 2 | cwd 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/cwd/cwdChanged.gql: -------------------------------------------------------------------------------- 1 | subscription cwdChanged { 2 | cwd: cwdChanged 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/dark-mode/darkMode.gql: -------------------------------------------------------------------------------- 1 | query darkMode { 2 | darkMode @client 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/dark-mode/darkModeSet.gql: -------------------------------------------------------------------------------- 1 | mutation darkModeSet($enabled: Boolean!) { 2 | darkModeSet (enabled: $enabled) @client 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/dependency/dependencies.gql: -------------------------------------------------------------------------------- 1 | #import "./dependencyFragment.gql" 2 | 3 | query dependencies { 4 | dependencies { 5 | ...dependency 6 | } 7 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/dependency/dependenciesUpdate.gql: -------------------------------------------------------------------------------- 1 | mutation dependenciesUpdate { 2 | dependenciesUpdate { 3 | id 4 | version { 5 | current 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/dependency/dependencyDetails.gql: -------------------------------------------------------------------------------- 1 | #import "../version/versionFragment.gql" 2 | 3 | query dependencyDetails ($id: ID!) { 4 | dependencyDetails: dependency (id: $id) { 5 | id 6 | version { 7 | ...version 8 | } 9 | description 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/dependency/dependencyFragment.gql: -------------------------------------------------------------------------------- 1 | fragment dependency on Dependency { 2 | id 3 | type 4 | installed 5 | website 6 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/dependency/dependencyInstall.gql: -------------------------------------------------------------------------------- 1 | #import "./dependencyFragment.gql" 2 | 3 | mutation dependencyInstall ($input: DependencyInstall!) { 4 | dependencyInstall (input: $input) { 5 | ...dependency 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/dependency/dependencyUninstall.gql: -------------------------------------------------------------------------------- 1 | #import "./dependencyFragment.gql" 2 | 3 | mutation dependencyUninstall ($input: DependencyUninstall!) { 4 | dependencyUninstall (input: $input) { 5 | ...dependency 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/dependency/dependencyUpdate.gql: -------------------------------------------------------------------------------- 1 | mutation dependencyUpdate ($input: DependencyUpdate!) { 2 | dependencyUpdate (input: $input) { 3 | id 4 | version { 5 | current 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/feature/featureFragment.gql: -------------------------------------------------------------------------------- 1 | fragment feature on Feature { 2 | id 3 | name 4 | description 5 | link 6 | enabled 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/feature/featureSetEnabled.gql: -------------------------------------------------------------------------------- 1 | #import "./featureFragment.gql" 2 | 3 | mutation featureSetEnabled ($id: ID!, $enabled: Boolean!) { 4 | featureSetEnabled (id: $id, enabled: $enabled) { 5 | ...feature 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/file/fileOpenInEditor.gql: -------------------------------------------------------------------------------- 1 | mutation fileOpenInEditor ($input: OpenInEditorInput!) { 2 | fileOpenInEditor (input: $input) 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/folder/folderCreate.gql: -------------------------------------------------------------------------------- 1 | #import "./folderCurrentFragment.gql" 2 | 3 | mutation folderCreate ($name: String!) { 4 | folderCreate (name: $name) { 5 | ...folderCurrent 6 | } 7 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/folder/folderCurrent.gql: -------------------------------------------------------------------------------- 1 | #import "./folderCurrentFragment.gql" 2 | 3 | query folderCurrent { 4 | folderCurrent { 5 | ...folderCurrent 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/folder/folderCurrentFragment.gql: -------------------------------------------------------------------------------- 1 | fragment folderCurrent on Folder { 2 | name 3 | path 4 | favorite 5 | isPackage 6 | isVueProject 7 | children { 8 | name 9 | path 10 | isPackage 11 | isVueProject 12 | hidden 13 | favorite 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/folder/folderExists.gql: -------------------------------------------------------------------------------- 1 | query folderExists ($file: String!) { 2 | folderExists(file: $file) 3 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/folder/folderOpen.gql: -------------------------------------------------------------------------------- 1 | #import "./folderCurrentFragment.gql" 2 | 3 | mutation folderOpen ($path: String!) { 4 | folderOpen(path: $path) { 5 | ...folderCurrent 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/folder/folderOpenParent.gql: -------------------------------------------------------------------------------- 1 | #import "./folderCurrentFragment.gql" 2 | 3 | mutation folderOpenParent { 4 | folderOpenParent { 5 | ...folderCurrent 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/folder/folderSetFavorite.gql: -------------------------------------------------------------------------------- 1 | #import "./folderCurrentFragment.gql" 2 | 3 | mutation folderSetFavorite ($path: String!, $favorite: Boolean!) { 4 | folderSetFavorite (path: $path, favorite: $favorite) { 5 | ...folderCurrent 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/folder/foldersFavorite.gql: -------------------------------------------------------------------------------- 1 | query foldersFavorite { 2 | foldersFavorite { 3 | path 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/git/fileDiffs.gql: -------------------------------------------------------------------------------- 1 | query fileDiffs { 2 | fileDiffs { 3 | id 4 | from 5 | to 6 | new 7 | deleted 8 | binary 9 | chunks { 10 | oldStart 11 | oldLines 12 | newStart 13 | newLines 14 | changes { 15 | type 16 | ln 17 | ln1 18 | ln2 19 | content 20 | normal 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/git/gitCommit.gql: -------------------------------------------------------------------------------- 1 | mutation gitCommit ($message: String!) { 2 | gitCommit (message: $message) 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/loading/loading.gql: -------------------------------------------------------------------------------- 1 | query loading { 2 | loading @client 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/loading/loadingChange.gql: -------------------------------------------------------------------------------- 1 | mutation loadingChange ($mod: Int!) { 2 | loadingChange (mod: $mod) @client 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/locale/localeAdded.gql: -------------------------------------------------------------------------------- 1 | #import "./localeFragment.gql" 2 | 3 | subscription localeAdded { 4 | localeAdded { 5 | ...locale 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/locale/localeFragment.gql: -------------------------------------------------------------------------------- 1 | fragment locale on Locale { 2 | lang 3 | strings 4 | } 5 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/locale/locales.gql: -------------------------------------------------------------------------------- 1 | #import "./localeFragment.gql" 2 | 3 | query locales { 4 | locales { 5 | ...locale 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginActionCall.gql: -------------------------------------------------------------------------------- 1 | #import "./pluginActionResultFragment.gql" 2 | 3 | mutation pluginActionCall ($id: ID!, $params: JSON) { 4 | pluginActionCall (id: $id, params: $params) { 5 | ...pluginActionResult 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginActionCallFragment.gql: -------------------------------------------------------------------------------- 1 | fragment pluginActionCall on PluginActionCall { 2 | id 3 | params 4 | } 5 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginActionCalled.gql: -------------------------------------------------------------------------------- 1 | #import "./pluginActionCallFragment.gql" 2 | 3 | subscription pluginActionCalled { 4 | pluginActionCalled { 5 | ...pluginActionCall 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginActionResolved.gql: -------------------------------------------------------------------------------- 1 | #import "./pluginActionResultFragment.gql" 2 | 3 | subscription pluginActionResolved { 4 | pluginActionResolved { 5 | ...pluginActionResult 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginActionResultFragment.gql: -------------------------------------------------------------------------------- 1 | fragment pluginActionResult on PluginActionResult { 2 | id 3 | params 4 | results 5 | errors 6 | } 7 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginDetails.gql: -------------------------------------------------------------------------------- 1 | #import "../version/versionFragment.gql" 2 | 3 | query pluginDetails ($id: ID!) { 4 | pluginDetails: plugin (id: $id) { 5 | id 6 | version { 7 | ...version 8 | } 9 | description 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginFinishInstall.gql: -------------------------------------------------------------------------------- 1 | #import "./pluginInstallationFragment.gql" 2 | 3 | mutation pluginFinishInstall { 4 | pluginFinishInstall { 5 | ...pluginInstallation 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginFragment.gql: -------------------------------------------------------------------------------- 1 | fragment plugin on Plugin { 2 | id 3 | official 4 | installed 5 | website 6 | } 7 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginInstall.gql: -------------------------------------------------------------------------------- 1 | #import "./pluginInstallationFragment.gql" 2 | 3 | mutation pluginInstall ($id: ID!) { 4 | pluginInstall (id: $id) { 5 | ...pluginInstallation 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginInstallLocal.gql: -------------------------------------------------------------------------------- 1 | #import "./pluginInstallationFragment.gql" 2 | 3 | mutation pluginInstallLocal { 4 | pluginInstallLocal { 5 | ...pluginInstallation 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginInstallation.gql: -------------------------------------------------------------------------------- 1 | #import "./pluginInstallationFragment.gql" 2 | 3 | query pluginInstallation { 4 | pluginInstallation { 5 | ...pluginInstallation 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginInstallationFragment.gql: -------------------------------------------------------------------------------- 1 | #import "../prompt/promptFragment.gql" 2 | 3 | fragment pluginInstallation on PluginInstallation { 4 | id 5 | pluginId 6 | step 7 | prompts { 8 | ...prompt 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginInvoke.gql: -------------------------------------------------------------------------------- 1 | #import "./pluginInstallationFragment.gql" 2 | 3 | mutation pluginInvoke ($id: ID!) { 4 | pluginInvoke (id: $id) { 5 | ...pluginInstallation 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginLogo.gql: -------------------------------------------------------------------------------- 1 | query pluginLogo ($id: ID!) { 2 | pluginLogo: plugin (id: $id) { 3 | id 4 | logo 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginResetApi.gql: -------------------------------------------------------------------------------- 1 | mutation pluginResetApi { 2 | pluginResetApi 3 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginUninstall.gql: -------------------------------------------------------------------------------- 1 | #import "./pluginInstallationFragment.gql" 2 | 3 | mutation pluginUninstall ($id: ID!) { 4 | pluginUninstall (id: $id) { 5 | ...pluginInstallation 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginUpdate.gql: -------------------------------------------------------------------------------- 1 | #import "../version/versionFragment.gql" 2 | 3 | mutation pluginUpdate ($id: ID!, $full: Boolean) { 4 | pluginUpdate (id: $id, full: $full) { 5 | id 6 | version { 7 | ...version 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/plugins.gql: -------------------------------------------------------------------------------- 1 | #import "./pluginFragment.gql" 2 | 3 | query plugins { 4 | plugins { 5 | ...plugin 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/plugin/pluginsUpdate.gql: -------------------------------------------------------------------------------- 1 | #import "../version/versionFragment.gql" 2 | 3 | mutation pluginsUpdate { 4 | pluginsUpdate { 5 | id 6 | version { 7 | ...version 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/preset/presetApply.gql: -------------------------------------------------------------------------------- 1 | #import "../project/projectCreationFragment.gql" 2 | 3 | mutation presetApply ($id: ID!) { 4 | presetApply(id: $id) { 5 | ...projectCreation 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/preset/presetFragment.gql: -------------------------------------------------------------------------------- 1 | fragment preset on Preset { 2 | id 3 | name 4 | description 5 | link 6 | } 7 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/progress/progress.gql: -------------------------------------------------------------------------------- 1 | #import "./progressFragment.gql" 2 | 3 | query progress ($id: ID!) { 4 | progress (id: $id) { 5 | ...progress 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/progress/progressChanged.gql: -------------------------------------------------------------------------------- 1 | #import "./progressFragment.gql" 2 | 3 | subscription progressChanged ($id: ID!) { 4 | progressChanged (id: $id) { 5 | ...progress 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/progress/progressFragment.gql: -------------------------------------------------------------------------------- 1 | fragment progress on Progress { 2 | id 3 | status 4 | info 5 | error 6 | progress 7 | args 8 | } 9 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/progress/progressRemoved.gql: -------------------------------------------------------------------------------- 1 | subscription progressRemoved ($id: ID!) { 2 | progressRemoved (id: $id) 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/currentProjectId.gql: -------------------------------------------------------------------------------- 1 | query currentProjectId { 2 | currentProjectId @client 3 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/currentProjectIdSet.gql: -------------------------------------------------------------------------------- 1 | mutation currentProjectIdSet ($projectId: ID!) { 2 | currentProjectIdSet(projectId: $projectId) @client 3 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/projectCancelCreation.gql: -------------------------------------------------------------------------------- 1 | mutation projectCancelCreation { 2 | projectCancelCreation 3 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/projectCreate.gql: -------------------------------------------------------------------------------- 1 | #import "./projectFragment.gql" 2 | 3 | mutation projectCreate ($input: ProjectCreateInput!) { 4 | projectCreate(input: $input) { 5 | ...project 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/projectCreation.gql: -------------------------------------------------------------------------------- 1 | #import "./projectCreationFragment.gql" 2 | 3 | query projectCreation { 4 | projectCreation { 5 | ...projectCreation 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/projectCreationFragment.gql: -------------------------------------------------------------------------------- 1 | #import "../preset/presetFragment.gql" 2 | #import "../feature/featureFragment.gql" 3 | #import "../prompt/promptFragment.gql" 4 | 5 | fragment projectCreation on ProjectCreation { 6 | presets { 7 | ...preset 8 | } 9 | features { 10 | ...feature 11 | } 12 | prompts { 13 | ...prompt 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/projectCurrent.gql: -------------------------------------------------------------------------------- 1 | #import "./projectFragment.gql" 2 | 3 | query projectCurrent { 4 | projectCurrent { 5 | ...project 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/projectCwdReset.gql: -------------------------------------------------------------------------------- 1 | mutation projectCwdReset { 2 | projectCwdReset 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/projectFragment.gql: -------------------------------------------------------------------------------- 1 | fragment project on Project { 2 | id 3 | name 4 | type 5 | path 6 | favorite 7 | homepage 8 | openDate 9 | } 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/projectImport.gql: -------------------------------------------------------------------------------- 1 | #import "./projectFragment.gql" 2 | 3 | mutation projectImport ($input: ProjectImportInput!) { 4 | projectImport(input: $input) { 5 | ...project 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/projectInitCreation.gql: -------------------------------------------------------------------------------- 1 | #import "./projectCreationFragment.gql" 2 | 3 | mutation projectInitCreation { 4 | projectInitCreation { 5 | ...projectCreation 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/projectOpen.gql: -------------------------------------------------------------------------------- 1 | #import "./projectFragment.gql" 2 | 3 | mutation projectOpen ($id: ID!) { 4 | projectOpen(id: $id) { 5 | ...project 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/projectRemove.gql: -------------------------------------------------------------------------------- 1 | mutation projectRemove ($id: ID!) { 2 | projectRemove (id: $id) 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/projectSetFavorite.gql: -------------------------------------------------------------------------------- 1 | #import "./projectFragment.gql" 2 | 3 | mutation projectSetFavorite ($id: ID!, $favorite: Int!) { 4 | projectSetFavorite (id: $id, favorite: $favorite) { 5 | ...project 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/project/projects.gql: -------------------------------------------------------------------------------- 1 | #import "./projectFragment.gql" 2 | #import "../task/taskFragment.gql" 3 | 4 | query projects { 5 | projects { 6 | ...project 7 | tasks { 8 | ...task 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/prompt/promptAnswer.gql: -------------------------------------------------------------------------------- 1 | #import "./promptFragment.gql" 2 | 3 | mutation promptAnswer ($input: PromptInput!) { 4 | promptAnswer(input: $input) { 5 | ...prompt 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/prompt/promptChoiceFragment.gql: -------------------------------------------------------------------------------- 1 | fragment promptChoice on PromptChoice { 2 | value 3 | name 4 | checked 5 | disabled 6 | isDefault 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/prompt/promptErrorFragment.gql: -------------------------------------------------------------------------------- 1 | fragment promptError on PromptError { 2 | message 3 | link 4 | } 5 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/prompt/promptFragment.gql: -------------------------------------------------------------------------------- 1 | #import "./promptChoiceFragment.gql" 2 | #import "./promptErrorFragment.gql" 3 | 4 | fragment prompt on Prompt { 5 | id 6 | type 7 | visible 8 | enabled 9 | name 10 | message 11 | group 12 | description 13 | link 14 | choices { 15 | ...promptChoice 16 | } 17 | value 18 | valueChanged 19 | error { 20 | ...promptError 21 | } 22 | tabId 23 | } 24 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/shared-data/sharedData.gql: -------------------------------------------------------------------------------- 1 | #import "./sharedDataFragment.gql" 2 | 3 | query sharedData ($id: ID!, $projectId: ID!) { 4 | sharedData (id: $id, projectId: $projectId) { 5 | ...sharedData 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/shared-data/sharedDataFragment.gql: -------------------------------------------------------------------------------- 1 | fragment sharedData on SharedData { 2 | id 3 | value 4 | } 5 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/shared-data/sharedDataUpdate.gql: -------------------------------------------------------------------------------- 1 | #import "./sharedDataFragment.gql" 2 | 3 | mutation sharedDataUpdate ($id: ID!, $projectId: ID!, $value: JSON!) { 4 | sharedDataUpdate (id: $id, projectId: $projectId, value: $value) { 5 | ...sharedData 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/shared-data/sharedDataUpdated.gql: -------------------------------------------------------------------------------- 1 | #import "./sharedDataFragment.gql" 2 | 3 | subscription sharedDataUpdated ($id: ID!, $projectId: ID!) { 4 | sharedDataUpdated (id: $id, projectId: $projectId) { 5 | ...sharedData 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/suggestion/suggestionActivate.gql: -------------------------------------------------------------------------------- 1 | #import "./suggestionFragment.gql" 2 | 3 | mutation suggestionActivate ($input: SuggestionActivate!) { 4 | suggestionActivate (input: $input) { 5 | ...suggestion 6 | } 7 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/suggestion/suggestionAdded.gql: -------------------------------------------------------------------------------- 1 | #import "./suggestionFragment.gql" 2 | 3 | subscription suggestionAdded { 4 | suggestionAdded { 5 | ...suggestion 6 | } 7 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/suggestion/suggestionFragment.gql: -------------------------------------------------------------------------------- 1 | fragment suggestion on Suggestion { 2 | id 3 | type 4 | importance 5 | label 6 | message 7 | image 8 | link 9 | actionLink 10 | busy 11 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/suggestion/suggestionRemoved.gql: -------------------------------------------------------------------------------- 1 | #import "./suggestionFragment.gql" 2 | 3 | subscription suggestionRemoved { 4 | suggestionRemoved { 5 | ...suggestion 6 | } 7 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/suggestion/suggestionUpdated.gql: -------------------------------------------------------------------------------- 1 | #import "./suggestionFragment.gql" 2 | 3 | subscription suggestionUpdated { 4 | suggestionUpdated { 5 | ...suggestion 6 | } 7 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/suggestion/suggestions.gql: -------------------------------------------------------------------------------- 1 | #import "./suggestionFragment.gql" 2 | 3 | query suggestions { 4 | suggestions { 5 | ...suggestion 6 | } 7 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/task/task.gql: -------------------------------------------------------------------------------- 1 | #import "./taskFragment.gql" 2 | #import "../prompt/promptFragment.gql" 3 | 4 | query task ($id: ID!) { 5 | task (id: $id) { 6 | ...task 7 | link 8 | prompts { 9 | ...prompt 10 | } 11 | views { 12 | id 13 | label 14 | icon 15 | component 16 | } 17 | defaultView 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/task/taskChanged.gql: -------------------------------------------------------------------------------- 1 | #import "./taskFragment.gql" 2 | 3 | subscription taskChanged { 4 | taskChanged { 5 | ...task 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/task/taskFragment.gql: -------------------------------------------------------------------------------- 1 | fragment task on Task { 2 | id 3 | status 4 | name 5 | command 6 | description 7 | icon 8 | plugin { 9 | id 10 | logo 11 | } 12 | project { 13 | id 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/task/taskLogAdded.gql: -------------------------------------------------------------------------------- 1 | #import "./taskLogFragment.gql" 2 | 3 | subscription taskLogAdded ($id: ID!) { 4 | taskLogAdded (id: $id) { 5 | ...taskLog 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/task/taskLogFragment.gql: -------------------------------------------------------------------------------- 1 | fragment taskLog on TaskLog { 2 | taskId 3 | type 4 | text 5 | } 6 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/task/taskLogs.gql: -------------------------------------------------------------------------------- 1 | #import "./taskLogFragment.gql" 2 | 3 | query taskLogs ($id: ID!) { 4 | taskLogs: task(id: $id) { 5 | id 6 | logs { 7 | ...taskLog 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/task/taskLogsClear.gql: -------------------------------------------------------------------------------- 1 | #import "./taskFragment.gql" 2 | 3 | mutation taskLogsClear ($id: ID!) { 4 | taskLogsClear (id: $id) { 5 | ...task 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/task/taskOpen.gql: -------------------------------------------------------------------------------- 1 | mutation taskOpen ($id: ID!) { 2 | taskOpen (id: $id) 3 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/task/taskRestoreParameters.gql: -------------------------------------------------------------------------------- 1 | #import "../prompt/promptFragment.gql" 2 | 3 | mutation taskRestoreParameters ($id: ID!) { 4 | taskRestoreParameters (id: $id) { 5 | ...prompt 6 | } 7 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/task/taskRun.gql: -------------------------------------------------------------------------------- 1 | #import "./taskFragment.gql" 2 | 3 | mutation taskRun ($id: ID!) { 4 | taskRun (id: $id) { 5 | ...task 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/task/taskSaveParameters.gql: -------------------------------------------------------------------------------- 1 | #import "../prompt/promptFragment.gql" 2 | 3 | mutation taskSaveParameters ($id: ID!) { 4 | taskSaveParameters (id: $id) { 5 | ...prompt 6 | } 7 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/task/taskStop.gql: -------------------------------------------------------------------------------- 1 | #import "./taskFragment.gql" 2 | 3 | mutation taskStop ($id: ID!) { 4 | taskStop (id: $id) { 5 | ...task 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/task/tasks.gql: -------------------------------------------------------------------------------- 1 | #import "./taskFragment.gql" 2 | 3 | query tasks { 4 | tasks { 5 | ...task 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/version/versionFragment.gql: -------------------------------------------------------------------------------- 1 | fragment version on Version { 2 | current 3 | latest 4 | wanted 5 | range 6 | localPath 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/view/viewAdded.gql: -------------------------------------------------------------------------------- 1 | #import "./viewFragment.gql" 2 | 3 | subscription viewAdded { 4 | viewAdded { 5 | ...view 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/view/viewChanged.gql: -------------------------------------------------------------------------------- 1 | #import "./viewFragment.gql" 2 | 3 | subscription viewChanged { 4 | viewChanged { 5 | ...view 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/view/viewFragment.gql: -------------------------------------------------------------------------------- 1 | fragment view on View { 2 | id 3 | name 4 | icon 5 | tooltip 6 | badges { 7 | id 8 | type 9 | count 10 | label 11 | priority 12 | hidden 13 | } 14 | projectTypes 15 | } 16 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/view/viewOpen.gql: -------------------------------------------------------------------------------- 1 | mutation viewOpen ($id: ID!) { 2 | viewOpen (id: $id) 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/view/viewRemoved.gql: -------------------------------------------------------------------------------- 1 | #import "./viewFragment.gql" 2 | 3 | subscription viewRemoved { 4 | viewRemoved { 5 | ...view 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/view/views.gql: -------------------------------------------------------------------------------- 1 | #import "./viewFragment.gql" 2 | 3 | query views { 4 | views { 5 | ...view 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/widget/widgetAdd.gql: -------------------------------------------------------------------------------- 1 | #import "./widgetFragment.gql" 2 | 3 | mutation widgetAdd ($input: WidgetAddInput!) { 4 | widgetAdd (input: $input) { 5 | ...widget 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/widget/widgetConfigOpen.gql: -------------------------------------------------------------------------------- 1 | #import "./widgetFragment.gql" 2 | 3 | mutation widgetConfigOpen ($id: ID!) { 4 | widgetConfigOpen (id: $id) { 5 | ...widget 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/widget/widgetConfigSave.gql: -------------------------------------------------------------------------------- 1 | #import "./widgetFragment.gql" 2 | 3 | mutation widgetConfigSave ($id: ID!) { 4 | widgetConfigSave (id: $id) { 5 | ...widget 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/widget/widgetDefinitionFragment.gql: -------------------------------------------------------------------------------- 1 | fragment widgetDefinition on WidgetDefinition { 2 | id 3 | title 4 | description 5 | longDescription 6 | link 7 | icon 8 | screenshot 9 | component 10 | canAddMore 11 | count 12 | maxCount 13 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/widget/widgetDefinitions.gql: -------------------------------------------------------------------------------- 1 | #import "./widgetDefinitionFragment.gql" 2 | 3 | query widgetDefinitions { 4 | widgetDefinitions { 5 | ...widgetDefinition 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/widget/widgetFragment.gql: -------------------------------------------------------------------------------- 1 | #import "../prompt/promptFragment.gql" 2 | 3 | fragment widget on Widget { 4 | id 5 | definition { 6 | id 7 | title 8 | icon 9 | component 10 | detailsComponent 11 | canAddMore 12 | hasConfigPrompts 13 | minWidth 14 | minHeight 15 | maxWidth 16 | maxHeight 17 | openDetailsButton 18 | } 19 | x 20 | y 21 | width 22 | height 23 | config 24 | configured 25 | prompts { 26 | ...prompt 27 | } 28 | } -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/widget/widgetMove.gql: -------------------------------------------------------------------------------- 1 | #import "./widgetFragment.gql" 2 | 3 | mutation widgetMove ($input: WidgetMoveInput!) { 4 | widgetMove (input: $input) { 5 | ...widget 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/widget/widgetRemove.gql: -------------------------------------------------------------------------------- 1 | #import "./widgetFragment.gql" 2 | 3 | mutation widgetRemove ($id: ID!) { 4 | widgetRemove(id: $id) { 5 | ...widget 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/graphql/widget/widgets.gql: -------------------------------------------------------------------------------- 1 | #import "./widgetFragment.gql" 2 | 3 | query widgets { 4 | widgets { 5 | ...widget 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/main.js: -------------------------------------------------------------------------------- 1 | import './plugins' 2 | import './register-components' 3 | 4 | import Vue from 'vue' 5 | import App from './App.vue' 6 | import router from './router' 7 | import i18n from './i18n' 8 | import { apolloProvider } from './vue-apollo' 9 | import ClientAddonApi from './util/ClientAddonApi' 10 | import gql from 'graphql-tag' 11 | 12 | window.gql = gql 13 | 14 | Vue.config.productionTip = false 15 | Vue.config.devtools = true 16 | 17 | // For client addons 18 | window.Vue = Vue 19 | window.ClientAddonApi = new ClientAddonApi() 20 | 21 | const app = new Vue({ 22 | router, 23 | apolloProvider, 24 | i18n, 25 | ...App 26 | }) 27 | 28 | app.$mount('#app') 29 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/mixins/ClientState.js: -------------------------------------------------------------------------------- 1 | import CONNECTED from '@/graphql/connected/connected.gql' 2 | import DARK_MODE from '@/graphql/dark-mode/darkMode.gql' 3 | 4 | // @vue/component 5 | export default { 6 | beforeCreate () { 7 | if (this.$options.clientState) { 8 | const newData = { 9 | connected: CONNECTED, 10 | darkMode: DARK_MODE 11 | } 12 | this.$options.apollo = { 13 | ...this.$options.apollo, 14 | ...newData 15 | } 16 | // Proxy prop on `this` 17 | for (const key in newData) { 18 | Object.defineProperty(this, key, { 19 | get: () => this.$data.$apolloData.data[key], 20 | enumerable: true, 21 | configurable: true 22 | }) 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/mixins/Defer.js: -------------------------------------------------------------------------------- 1 | export default function (count = 10) { 2 | // @vue/component 3 | return { 4 | data () { 5 | return { 6 | displayPriority: 0 7 | } 8 | }, 9 | 10 | mounted () { 11 | this.runDisplayPriority() 12 | }, 13 | 14 | methods: { 15 | runDisplayPriority () { 16 | this.displayPriority = 0 17 | const step = () => { 18 | requestAnimationFrame(() => { 19 | this.displayPriority++ 20 | if (this.displayPriority < count) { 21 | step() 22 | } 23 | }) 24 | } 25 | step() 26 | }, 27 | 28 | defer (priority) { 29 | return this.displayPriority >= priority 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/mixins/OnWindowResize.js: -------------------------------------------------------------------------------- 1 | export default function () { 2 | // @vue/component 3 | return { 4 | mounted () { 5 | window.addEventListener('resize', this.onWindowResize) 6 | this.onWindowResize() 7 | }, 8 | 9 | beforeDestroy () { 10 | window.removeEventListener('resize', this.onWindowResize) 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/mixins/PageVisibility.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | const vm = new Vue({ 4 | data: { 5 | documentVisible: !document.hidden, 6 | documentFocus: document.hasFocus() 7 | } 8 | }) 9 | 10 | document.addEventListener('visibilitychange', () => { 11 | vm.documentVisible = !document.hidden 12 | }, false) 13 | 14 | window.addEventListener('focus', () => { 15 | vm.documentFocus = true 16 | }) 17 | 18 | window.addEventListener('blur', () => { 19 | vm.documentFocus = false 20 | }) 21 | 22 | // @vue/component 23 | export default { 24 | computed: { 25 | documentVisible () { 26 | return vm.documentVisible 27 | }, 28 | 29 | documentFocus () { 30 | return vm.documentFocus 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/register-components.js: -------------------------------------------------------------------------------- 1 | /** 2 | * We register all the components so future cli-ui plugins 3 | * could use them directly 4 | */ 5 | 6 | import Vue from 'vue' 7 | 8 | // https://webpack.js.org/guides/dependency-management/#require-context 9 | const requireComponent = require.context('./components', true, /[a-z0-9]+\.(jsx?|vue)$/i) 10 | 11 | // For each matching file name... 12 | requireComponent.keys().forEach(fileName => { 13 | const componentConfig = requireComponent(fileName) 14 | const componentName = fileName 15 | .substr(fileName.lastIndexOf('/') + 1) 16 | // Remove the file extension from the end 17 | .replace(/\.\w+$/, '') 18 | // Globally register the component 19 | Vue.component(componentName, componentConfig.default || componentConfig) 20 | }) 21 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/state/defaults.js: -------------------------------------------------------------------------------- 1 | export default () => ({ 2 | connected: true, 3 | loading: 0, 4 | darkMode: false, 5 | currentProjectId: null 6 | }) 7 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/state/typeDefs.js: -------------------------------------------------------------------------------- 1 | import gql from 'graphql-tag' 2 | 3 | export default gql` 4 | extend type Query { 5 | connected: Boolean! 6 | loading: Boolean! 7 | darkMode: Boolean! 8 | currentProjectId: String 9 | } 10 | 11 | extend type Mutation { 12 | connectedSet (value: Boolean!): Boolean 13 | loadingChange (mod: Int!): Boolean 14 | darkModeSet (enabled: Boolean!): Boolean 15 | currentProjectIdSet (projectId: String): Boolean 16 | } 17 | ` 18 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/style/colors.styl: -------------------------------------------------------------------------------- 1 | $color-background-light = lighten($vue-ui-color-light-neutral, 80%) 2 | $color-text-light = lighten($vue-ui-color-dark, 40%) 3 | 4 | $content-bg-primary-light = darken($vue-ui-color-light-neutral, 8%) 5 | $content-bg-primary-dark = lighten($vue-ui-color-dark, 3%) 6 | $content-bg-secondary-light = darken($vue-ui-color-light-neutral, 12%) 7 | $content-bg-secondary-dark = lighten($vue-ui-color-dark, 6%) 8 | $content-bg-list-light = $vue-ui-color-light-neutral 9 | $content-bg-list-dark = $vue-ui-color-dark 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/style/imports.styl: -------------------------------------------------------------------------------- 1 | @import "~@vue/ui/src/style/imports" 2 | @import "colors" 3 | @import "vars" 4 | @import "mixins" 5 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/style/mixins.styl: -------------------------------------------------------------------------------- 1 | list-item() 2 | user-select none 3 | cursor pointer 4 | 5 | &.selected 6 | background rgba($vue-ui-color-primary, .08) 7 | 8 | &:hover 9 | background rgba($vue-ui-color-primary, .05) 10 | 11 | 12 | ansi-colors($name, $color) 13 | .ansi-{$name}-fg 14 | color $color 15 | .ansi-{$name}-bg 16 | background $color 17 | .ansi-bright-{$name}-fg 18 | color lighten($color, 10%) 19 | .ansi-bright-{$name}-bg 20 | background lighten($color, 10%) 21 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/style/transitions.styl: -------------------------------------------------------------------------------- 1 | .sidepane-enter-active, 2 | .sidepane-leave-active 3 | transition transform .15s 4 | 5 | .sidepane-enter, 6 | .sidepane-leave-to 7 | transform translateX(100%) 8 | 9 | .slide-up-enter-active, 10 | .slide-up-leave-active 11 | transition transform .3s ease-out, opacity .3s 12 | 13 | .slide-up-enter, 14 | .slide-up-leave-to 15 | opacity 0 16 | 17 | .slide-up-enter 18 | transform translateY(100%) 19 | 20 | .slide-up-leave-to 21 | transform translateY(-100%) 22 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/style/vars.styl: -------------------------------------------------------------------------------- 1 | $padding-item = 16px 2 | $font-mono = 'Roboto Mono', monospace 3 | $ease = cubic-bezier(0.075, 0.820, 0.165, 1.000) 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/util/ansi-colors.js: -------------------------------------------------------------------------------- 1 | import AU from 'ansi_up' 2 | 3 | const ansiUp = new AU() 4 | ansiUp.use_classes = true 5 | ansiUp.escape_for_html = false 6 | 7 | export default { 8 | install (Vue) { 9 | Vue.prototype.ansiColors = text => ansiUp.ansi_to_html(text) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/util/focus.js: -------------------------------------------------------------------------------- 1 | export default { 2 | bind (el) { 3 | requestAnimationFrame(() => { 4 | const input = el.querySelector('input') 5 | if (input) el = input 6 | el.focus() 7 | }) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/util/folders.js: -------------------------------------------------------------------------------- 1 | export function isValidName (name) { 2 | return !name.match(/[/@\s+%:]|^[_.]/) && encodeURIComponent(name) === name && name.length <= 214 3 | } 4 | 5 | export function isValidMultiName (name) { 6 | name = name.replace(/\\/g, '/') 7 | return name.split('/').every(isValidName) 8 | } 9 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/util/image.js: -------------------------------------------------------------------------------- 1 | export function getImageUrl (url) { 2 | // Fix images in development 3 | if (process.env.VUE_APP_CLI_UI_DEV && url.charAt(0) === '/') { 4 | return `http://localhost:${process.env.VUE_APP_GRAPHQL_PORT}${url}` 5 | } 6 | return url 7 | } 8 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/util/responsive.js: -------------------------------------------------------------------------------- 1 | export let responsive 2 | 3 | export default { 4 | install (Vue, options) { 5 | const finalOptions = Object.assign({}, { 6 | computed: {} 7 | }, options) 8 | 9 | responsive = new Vue({ 10 | data () { 11 | return { 12 | width: window.innerWidth, 13 | height: window.innerHeight 14 | } 15 | }, 16 | computed: finalOptions.computed 17 | }) 18 | 19 | Object.defineProperty(Vue.prototype, '$responsive', { 20 | get: () => responsive 21 | }) 22 | 23 | window.addEventListener('resize', () => { 24 | responsive.width = window.innerWidth 25 | responsive.height = window.innerHeight 26 | }) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/util/search.js: -------------------------------------------------------------------------------- 1 | export function generateSearchRegex (text) { 2 | return text && new RegExp(text.trim().replace(/\s+/g, '.{0,5}'), 'i') 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/util/set-size.js: -------------------------------------------------------------------------------- 1 | export default { 2 | bind (el, { value }) { 3 | if (typeof value === 'string') { 4 | value = el.querySelector(value) 5 | } 6 | requestAnimationFrame(() => { 7 | const bounds = value.getBoundingClientRect() 8 | el.style.width = `${bounds.width}px` 9 | el.style.height = `${bounds.height}px` 10 | }) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/src/util/theme.js: -------------------------------------------------------------------------------- 1 | let forcedTheme = null 2 | 3 | { 4 | const result = /\?theme=(\w+)/.exec(window.location.href) 5 | if (result) forcedTheme = result[1] 6 | } 7 | 8 | console.log('forced theme', forcedTheme) 9 | 10 | export function getForcedTheme () { 11 | return forcedTheme 12 | } 13 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/tests/e2e/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "cypress" 4 | ], 5 | "env": { 6 | "mocha": true, 7 | "cypress/globals": true 8 | }, 9 | "rules": { 10 | "strict": "off" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/tests/e2e/.gitignore: -------------------------------------------------------------------------------- 1 | /screenshots 2 | /videos 3 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/tests/e2e/plugins/index.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/guides/guides/plugins-guide.html 2 | const path = require('path') 3 | 4 | module.exports = (on, config) => { 5 | return Object.assign({}, config, { 6 | fixturesFolder: 'tests/e2e/fixtures', 7 | integrationFolder: 'tests/e2e/specs', 8 | screenshotsFolder: 'tests/e2e/screenshots', 9 | videosFolder: 'tests/e2e/videos', 10 | supportFile: 'tests/e2e/support/index.js', 11 | execTimeout: 1000000, 12 | pageLoadTimeout: 1000000, 13 | requestTimeout: 1000000, 14 | responseTimeout: 1000000, 15 | env: { 16 | cwd: path.resolve(__dirname, '../../../../../test') 17 | } 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/tests/e2e/specs/g3-configurations.js: -------------------------------------------------------------------------------- 1 | describe('Configurations', () => { 2 | it('Displays configurations', () => { 3 | cy.visit('/configuration') 4 | cy.get('.configuration-item').should('have.length', 3) 5 | }) 6 | }) 7 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/ui-defaults/index.js: -------------------------------------------------------------------------------- 1 | module.exports = api => { 2 | require('./tasks')(api) 3 | require('./suggestions')(api) 4 | require('./config')(api) 5 | require('./widgets')(api) 6 | } 7 | -------------------------------------------------------------------------------- /packages/@vue/cli-ui/ui-public/vue-cli.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-ui/ui-public/vue-cli.png -------------------------------------------------------------------------------- /packages/@vue/cli-ui/ui-public/vue-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-ui/ui-public/vue-logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-ui/ui-public/webpack-inspect-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-ui/ui-public/webpack-inspect-logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-ui/ui-public/webpack-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/@vue/cli-ui/ui-public/webpack-logo.png -------------------------------------------------------------------------------- /packages/@vue/cli-ui/vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | pluginOptions: { 3 | apollo: { 4 | enableMocks: false, 5 | enableEngine: false, 6 | lintGQL: false 7 | } 8 | }, 9 | 10 | configureWebpack: { 11 | resolve: { 12 | symlinks: false 13 | } 14 | }, 15 | 16 | css: { 17 | loaderOptions: { 18 | stylus: { 19 | stylusOptions: { 20 | import: ['~@/style/imports'] 21 | } 22 | } 23 | } 24 | }, 25 | parallel: !process.env.CIRCLECI 26 | } 27 | -------------------------------------------------------------------------------- /packages/@vue/cli/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | __mocks__ 3 | .version 4 | -------------------------------------------------------------------------------- /packages/@vue/cli/README.md: -------------------------------------------------------------------------------- 1 | # @vue/cli 2 | 3 | ``` sh 4 | npm install -g @vue/cli 5 | vue create my-project 6 | ``` 7 | 8 | [Full Docs](https://cli.vuejs.org/) 9 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/Upgrader.spec.js: -------------------------------------------------------------------------------- 1 | test.todo('upgrade: should respect plugin resolveFrom') 2 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/args.spec.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const { execa } = require('@vue/cli-shared-utils') 3 | 4 | const CLI_PATH = path.resolve(__dirname, '..', 'bin', 'vue.js') 5 | 6 | const runAsync = (args, options) => execa(CLI_PATH, args, options) 7 | 8 | test('suggests matching command', async () => { 9 | const { code, stdout } = await runAsync(['confgi'], { reject: false }) 10 | 11 | // Assertions 12 | expect(code).toBe(1) 13 | expect(stdout).toContain('Did you mean config?') 14 | }) 15 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/mock-preset-with-async-generator/generator/index.js: -------------------------------------------------------------------------------- 1 | const sleep = n => new Promise(resolve => setTimeout(resolve, n)) 2 | 3 | module.exports = async (api, options) => { 4 | api.render('./template', options) 5 | 6 | // add asynchronous code test 7 | await sleep(1000) 8 | 9 | api.extendPackage({ 10 | scripts: { 11 | testasync: 'this is the test' 12 | }, 13 | devDependencies: { 14 | 'vue-cli-plugin-async-generator': 'v0.0.1' 15 | } 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/mock-preset-with-async-generator/generator/template/test.js: -------------------------------------------------------------------------------- 1 | <%= ok %> 2 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/mock-preset-with-async-generator/preset.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": { 3 | "@vue/cli-plugin-babel": {} 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/mock-preset-with-async-generator/prompts.js: -------------------------------------------------------------------------------- 1 | module.exports = [{ 2 | type: 'confirm', 3 | name: 'ok', 4 | message: 'Are you ok?' 5 | }] 6 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/mock-preset-with-readme/generator.js: -------------------------------------------------------------------------------- 1 | module.exports = (api, options) => { 2 | api.render(files => { 3 | files['README.md'] = 'hello' 4 | }) 5 | } 6 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/mock-preset-with-readme/preset.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": { 3 | "@vue/cli-plugin-babel": {} 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/mock-preset-with-template/generator/index.js: -------------------------------------------------------------------------------- 1 | module.exports = (api, options) => { 2 | api.render('./template', options) 3 | } 4 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/mock-preset-with-template/generator/template/test.js: -------------------------------------------------------------------------------- 1 | <%= ok %> 2 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/mock-preset-with-template/preset.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": { 3 | "@vue/cli-plugin-babel": {} 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/mock-preset-with-template/prompts.js: -------------------------------------------------------------------------------- 1 | module.exports = [{ 2 | type: 'confirm', 3 | name: 'ok', 4 | message: 'Are you ok?' 5 | }] 6 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/mock-preset/generator.js: -------------------------------------------------------------------------------- 1 | module.exports = (api, options) => { 2 | api.render(files => { 3 | files['test.js'] = options.ok ? 'true' : 'false' 4 | }) 5 | } 6 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/mock-preset/preset.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": { 3 | "@vue/cli-plugin-babel": {} 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/@vue/cli/__tests__/mock-preset/prompts.js: -------------------------------------------------------------------------------- 1 | module.exports = [{ 2 | type: 'confirm', 3 | name: 'ok', 4 | message: 'Are you ok?' 5 | }] 6 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/MigratorAPI.js: -------------------------------------------------------------------------------- 1 | const { semver } = require('@vue/cli-shared-utils') 2 | const GeneratorAPI = require('./GeneratorAPI') 3 | 4 | class MigratorAPI extends GeneratorAPI { 5 | /** 6 | * @param {string} id - Id of the owner plugin 7 | * @param {Migrator} migrator - The invoking Migrator instance 8 | * @param {object} options - options passed to this plugin 9 | * @param {object} rootOptions - root options (the entire preset) 10 | */ 11 | constructor (id, baseVersion, migrator, options, rootOptions) { 12 | super(id, migrator, options, rootOptions) 13 | 14 | this.baseVersion = baseVersion 15 | this.migrator = this.generator 16 | } 17 | 18 | fromVersion (range) { 19 | return semver.satisfies(this.baseVersion, range) 20 | } 21 | } 22 | 23 | module.exports = MigratorAPI 24 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/PromptModuleAPI.js: -------------------------------------------------------------------------------- 1 | module.exports = class PromptModuleAPI { 2 | constructor (creator) { 3 | this.creator = creator 4 | } 5 | 6 | injectFeature (feature) { 7 | this.creator.featurePrompt.choices.push(feature) 8 | } 9 | 10 | injectPrompt (prompt) { 11 | this.creator.injectedPrompts.push(prompt) 12 | } 13 | 14 | injectOptionForPrompt (name, option) { 15 | this.creator.injectedPrompts.find(f => { 16 | return f.name === name 17 | }).choices.push(option) 18 | } 19 | 20 | onPromptComplete (cb) { 21 | this.creator.promptCompleteCbs.push(cb) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/outdated.js: -------------------------------------------------------------------------------- 1 | const { error } = require('@vue/cli-shared-utils') 2 | 3 | const Upgrader = require('./Upgrader') 4 | 5 | async function outdated (options, context = process.cwd()) { 6 | const upgrader = new Upgrader(context) 7 | return upgrader.checkForUpdates(options.next) 8 | } 9 | 10 | module.exports = (...args) => { 11 | return outdated(...args).catch(err => { 12 | error(err) 13 | if (!process.env.VUE_CLI_TEST) { 14 | process.exit(1) 15 | } 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/promptModules/__tests__/cssPreprocessors.spec.js: -------------------------------------------------------------------------------- 1 | jest.mock('fs') 2 | jest.mock('inquirer') 3 | 4 | const assertPromptModule = require('@vue/cli-test-utils/assertPromptModule') 5 | 6 | const moduleToTest = require('../cssPreprocessors') 7 | 8 | test('CSS pre-processor ', async () => { 9 | const expectedPrompts = [ 10 | { 11 | message: 'features', 12 | choices: ['CSS Pre-processors'], 13 | check: [0] 14 | }, 15 | { 16 | message: 'Pick a CSS pre-processor', 17 | choices: ['Sass/SCSS (with dart-sass)', 'Less', 'Stylus'], 18 | choose: 0 19 | } 20 | ] 21 | 22 | const expectedOptions = { 23 | cssPreprocessor: 'dart-sass', 24 | plugins: {} 25 | } 26 | 27 | await assertPromptModule( 28 | moduleToTest, 29 | expectedPrompts, 30 | expectedOptions, 31 | { pluginsOnly: true } 32 | ) 33 | }) 34 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/promptModules/__tests__/pwa.spec.js: -------------------------------------------------------------------------------- 1 | jest.mock('fs') 2 | jest.mock('inquirer') 3 | 4 | const assertPromptModule = require('@vue/cli-test-utils/assertPromptModule') 5 | 6 | const moduleToTest = require('../pwa') 7 | 8 | test('pwa', async () => { 9 | const expectedPrompts = [ 10 | { 11 | message: 'features', 12 | choices: ['PWA'], 13 | check: [0] 14 | } 15 | ] 16 | 17 | const expectedOptions = { 18 | plugins: { 19 | '@vue/cli-plugin-pwa': {} 20 | } 21 | } 22 | 23 | await assertPromptModule( 24 | moduleToTest, 25 | expectedPrompts, 26 | expectedOptions, 27 | { pluginsOnly: true } 28 | ) 29 | }) 30 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/promptModules/__tests__/router.spec.js: -------------------------------------------------------------------------------- 1 | jest.mock('fs') 2 | jest.mock('inquirer') 3 | 4 | const assertPromptModule = require('@vue/cli-test-utils/assertPromptModule') 5 | 6 | const moduleToTest = require('../router') 7 | 8 | test('router', async () => { 9 | const expectedPrompts = [ 10 | { 11 | message: 'features', 12 | choices: ['Router'], 13 | check: [0] 14 | }, 15 | { 16 | message: 'history mode', 17 | confirm: true 18 | } 19 | ] 20 | 21 | const expectedOptions = { 22 | plugins: { 23 | '@vue/cli-plugin-router': { 24 | historyMode: true 25 | } 26 | } 27 | } 28 | 29 | await assertPromptModule( 30 | moduleToTest, 31 | expectedPrompts, 32 | expectedOptions, 33 | { pluginsOnly: true } 34 | ) 35 | }) 36 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/promptModules/__tests__/vuex.spec.js: -------------------------------------------------------------------------------- 1 | jest.mock('fs') 2 | jest.mock('inquirer') 3 | 4 | const assertPromptModule = require('@vue/cli-test-utils/assertPromptModule') 5 | 6 | const moduleToTest = require('../vuex') 7 | 8 | test('vuex', async () => { 9 | const expectedPrompts = [ 10 | { 11 | message: 'features', 12 | choices: ['Vuex'], 13 | check: [0] 14 | } 15 | ] 16 | 17 | const expectedOptions = { 18 | plugins: { 19 | '@vue/cli-plugin-vuex': {} 20 | } 21 | } 22 | 23 | await assertPromptModule( 24 | moduleToTest, 25 | expectedPrompts, 26 | expectedOptions, 27 | { pluginsOnly: true } 28 | ) 29 | }) 30 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/promptModules/babel.js: -------------------------------------------------------------------------------- 1 | module.exports = cli => { 2 | cli.injectFeature({ 3 | name: 'Babel', 4 | value: 'babel', 5 | short: 'Babel', 6 | description: 'Transpile modern JavaScript to older versions (for compatibility)', 7 | link: 'https://babeljs.io/', 8 | checked: true 9 | }) 10 | 11 | cli.onPromptComplete((answers, options) => { 12 | if (answers.features.includes('ts')) { 13 | if (!answers.useTsWithBabel) { 14 | return 15 | } 16 | } else if (!answers.features.includes('babel')) { 17 | return 18 | } 19 | options.plugins['@vue/cli-plugin-babel'] = {} 20 | }) 21 | } 22 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/promptModules/pwa.js: -------------------------------------------------------------------------------- 1 | module.exports = cli => { 2 | cli.injectFeature({ 3 | name: 'Progressive Web App (PWA) Support', 4 | value: 'pwa', 5 | short: 'PWA', 6 | description: 'Improve performances with features like Web manifest and Service workers', 7 | link: 'https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa' 8 | }) 9 | 10 | cli.onPromptComplete((answers, options) => { 11 | if (answers.features.includes('pwa')) { 12 | options.plugins['@vue/cli-plugin-pwa'] = {} 13 | } 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/promptModules/vueVersion.js: -------------------------------------------------------------------------------- 1 | module.exports = cli => { 2 | cli.injectPrompt({ 3 | name: 'vueVersion', 4 | message: 'Choose a version of Vue.js that you want to start the project with', 5 | type: 'list', 6 | choices: [ 7 | { 8 | name: '3.x', 9 | value: '3' 10 | }, 11 | { 12 | name: '2.x', 13 | value: '2' 14 | } 15 | ], 16 | default: '3' 17 | }) 18 | 19 | cli.onPromptComplete((answers, options) => { 20 | if (answers.vueVersion) { 21 | options.vueVersion = answers.vueVersion 22 | } 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/promptModules/vuex.js: -------------------------------------------------------------------------------- 1 | module.exports = cli => { 2 | cli.injectFeature({ 3 | name: 'Vuex', 4 | value: 'vuex', 5 | description: 'Manage the app state with a centralized store', 6 | link: 'https://vuex.vuejs.org/' 7 | }) 8 | 9 | cli.onPromptComplete((answers, options) => { 10 | if (answers.features.includes('vuex')) { 11 | options.plugins['@vue/cli-plugin-vuex'] = {} 12 | } 13 | }) 14 | } 15 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/.npmignore: -------------------------------------------------------------------------------- 1 | __tests__ 2 | .version 3 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/createTools.js: -------------------------------------------------------------------------------- 1 | exports.getPromptModules = () => { 2 | return [ 3 | 'vueVersion', 4 | 'babel', 5 | 'typescript', 6 | 'pwa', 7 | 'router', 8 | 'vuex', 9 | 'cssPreprocessors', 10 | 'linter', 11 | 'unit', 12 | 'e2e' 13 | ].map(file => require(`../promptModules/${file}`)) 14 | } 15 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/enhanceErrorMessages.js: -------------------------------------------------------------------------------- 1 | const program = require('commander') 2 | const { chalk } = require('@vue/cli-shared-utils') 3 | 4 | module.exports = (methodName, log) => { 5 | program.Command.prototype[methodName] = function (...args) { 6 | if (methodName === 'unknownOption' && this._allowUnknownOption) { 7 | return 8 | } 9 | this.outputHelp() 10 | console.log(` ` + chalk.red(log(...args))) 11 | console.log() 12 | process.exit(1) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/getChangedFiles.js: -------------------------------------------------------------------------------- 1 | const { execa, hasProjectGit } = require('@vue/cli-shared-utils') 2 | 3 | module.exports = async function getChangedFiles (context) { 4 | if (!hasProjectGit(context)) return [] 5 | 6 | const { stdout } = await execa('git', [ 7 | 'ls-files', 8 | '-o', 9 | '--exclude-standard', 10 | '--full-name' 11 | ], { 12 | cwd: context 13 | }) 14 | if (stdout.trim()) { 15 | return stdout.split(/\r?\n/g) 16 | } 17 | return [] 18 | } 19 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/getGlobalInstallCommand.js: -------------------------------------------------------------------------------- 1 | const { execa, hasYarn, hasPnpm3OrLater } = require('@vue/cli-shared-utils') 2 | 3 | module.exports = function getGlobalInstallCommand () { 4 | if (hasYarn()) { 5 | const { stdout: yarnGlobalDir } = execa.sync('yarn', ['global', 'dir']) 6 | if (__dirname.includes(yarnGlobalDir)) { 7 | return 'yarn global add' 8 | } 9 | } 10 | 11 | if (hasPnpm3OrLater()) { 12 | const { stdout: pnpmGlobalPrefix } = execa.sync('pnpm', ['config', 'get', 'prefix']) 13 | if (__dirname.includes(pnpmGlobalPrefix) && __dirname.includes('pnpm-global')) { 14 | return `pnpm i -g` 15 | } 16 | } 17 | 18 | const { stdout: npmGlobalPrefix } = execa.sync('npm', ['config', 'get', 'prefix']) 19 | if (__dirname.includes(npmGlobalPrefix)) { 20 | return `npm i -g` 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/linkBin.js: -------------------------------------------------------------------------------- 1 | // cross-platform executable link, mostly for Windows 2 | // this file is dev-only. 3 | 4 | const fs = require('fs-extra') 5 | const path = require('path') 6 | const cmdShim = require('cmd-shim') 7 | 8 | exports.linkBin = async (src, dest) => { 9 | if (!process.env.VUE_CLI_TEST && !process.env.VUE_CLI_DEBUG) { 10 | throw new Error(`linkBin should only be used during tests or debugging.`) 11 | } 12 | if (process.platform === 'win32' && !process.env.CI) { 13 | // not doing mutex lock because this is only used in dev and the 14 | // src will not be modified 15 | await cmdShim(src, dest) 16 | } else { 17 | await fs.ensureDir(path.dirname(dest)) 18 | await fs.symlink(src, dest) 19 | await fs.chmod(dest, '755') 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/loadLocalPreset.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra') 2 | const loadPresetFromDir = require('./loadPresetFromDir') 3 | 4 | module.exports = async function loadLocalPreset (path) { 5 | const stats = fs.statSync(path) 6 | if (stats.isFile()) { 7 | return await fs.readJson(path) 8 | } else if (stats.isDirectory()) { 9 | return await loadPresetFromDir(path) 10 | } else { 11 | throw new Error(`Invalid local preset path: ${path}`) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/loadPresetFromDir.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs-extra') 3 | 4 | module.exports = async function loadPresetFromDir (dir) { 5 | const presetPath = path.join(dir, 'preset.json') 6 | if (!fs.existsSync(presetPath)) { 7 | throw new Error('remote / local preset does not contain preset.json!') 8 | } 9 | const preset = await fs.readJson(presetPath) 10 | 11 | // if the preset dir contains generator.js or generator/index.js, we will inject it as a hidden 12 | // plugin so it will be invoked by the generator. 13 | const hasGenerator = fs.existsSync(path.join(dir, 'generator.js')) || fs.existsSync(path.join(dir, 'generator/index.js')) 14 | if (hasGenerator) { 15 | (preset.plugins || (preset.plugins = {}))[dir.replace(/[/]$/, '')] = { 16 | _isPreset: true, 17 | prompts: true 18 | } 19 | } 20 | 21 | return preset 22 | } 23 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/normalizeFilePaths.js: -------------------------------------------------------------------------------- 1 | const slash = require('slash') 2 | 3 | module.exports = function normalizeFilePaths (files) { 4 | Object.keys(files).forEach(file => { 5 | const normalized = slash(file) 6 | if (file !== normalized) { 7 | files[normalized] = files[file] 8 | delete files[file] 9 | } 10 | }) 11 | return files 12 | } 13 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/readFiles.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra') 2 | const path = require('path') 3 | 4 | const globby = require('globby') 5 | const { isBinaryFileSync } = require('isbinaryfile') 6 | const normalizeFilePaths = require('./normalizeFilePaths') 7 | 8 | module.exports = async function readFiles (context) { 9 | const files = await globby(['**'], { 10 | cwd: context, 11 | onlyFiles: true, 12 | gitignore: true, 13 | ignore: ['**/node_modules/**', '**/.git/**', '**/.svn/**'], 14 | dot: true 15 | }) 16 | const res = {} 17 | for (const file of files) { 18 | const name = path.resolve(context, file) 19 | res[file] = isBinaryFileSync(name) 20 | ? fs.readFileSync(name) 21 | : fs.readFileSync(name, 'utf-8') 22 | } 23 | return normalizeFilePaths(res) 24 | } 25 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/registries.js: -------------------------------------------------------------------------------- 1 | const registries = { 2 | npm: 'https://registry.npmjs.org', 3 | yarn: 'https://registry.yarnpkg.com', 4 | taobao: 'https://registry.npmmirror.com', 5 | pnpm: 'https://registry.npmjs.org' 6 | } 7 | 8 | module.exports = registries 9 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/runNpmScript.js: -------------------------------------------------------------------------------- 1 | const pkgDir = require('pkg-dir') 2 | const PackageManager = require('./ProjectPackageManager') 3 | const { chalk, execa } = require('@vue/cli-shared-utils') 4 | 5 | module.exports = async function runNpmScript (task, additonalArgs) { 6 | const projectRoot = await pkgDir(process.cwd()) 7 | const pm = new PackageManager({ context: projectRoot }) 8 | 9 | const args = [task, ...additonalArgs] 10 | if (pm.bin !== 'yarn') { 11 | args.unshift('run') 12 | } 13 | 14 | const command = chalk.dim(`${pm.bin} ${args.join(' ')}`) 15 | console.log(`Running ${command}`) 16 | 17 | return await execa(pm.bin, args, { cwd: projectRoot, stdio: 'inherit' }) 18 | } 19 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/setupDevProject.js: -------------------------------------------------------------------------------- 1 | // dev only 2 | 3 | const path = require('path') 4 | const { linkBin } = require('./linkBin') 5 | 6 | module.exports = function setupDevProject (targetDir) { 7 | return linkBin( 8 | require.resolve('@vue/cli-service/bin/vue-cli-service'), 9 | path.join(targetDir, 'node_modules', '.bin', 'vue-cli-service') 10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/sortObject.js: -------------------------------------------------------------------------------- 1 | module.exports = function sortObject (obj, keyOrder, dontSortByUnicode) { 2 | if (!obj) return 3 | const res = {} 4 | 5 | if (keyOrder) { 6 | keyOrder.forEach(key => { 7 | if (Object.prototype.hasOwnProperty.call(obj, key)) { 8 | res[key] = obj[key] 9 | delete obj[key] 10 | } 11 | }) 12 | } 13 | 14 | const keys = Object.keys(obj) 15 | 16 | !dontSortByUnicode && keys.sort() 17 | keys.forEach(key => { 18 | res[key] = obj[key] 19 | }) 20 | 21 | return res 22 | } 23 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/stringifyJS.js: -------------------------------------------------------------------------------- 1 | module.exports = function stringifyJS (value) { 2 | const { stringify } = require('javascript-stringify') 3 | // eslint-disable-next-line no-shadow 4 | return stringify(value, (val, indent, stringify) => { 5 | if (val && val.__expression) { 6 | return val.__expression 7 | } 8 | return stringify(val) 9 | }, 2) 10 | } 11 | -------------------------------------------------------------------------------- /packages/@vue/cli/lib/util/tryGetNewerRange.js: -------------------------------------------------------------------------------- 1 | const { semver } = require('@vue/cli-shared-utils') 2 | 3 | const leadRE = /^(~|\^|>=?)/ 4 | const rangeToVersion = r => r.replace(leadRE, '').replace(/x/g, '0') 5 | 6 | module.exports = function tryGetNewerRange (r1, r2) { 7 | const v1 = rangeToVersion(r1) 8 | const v2 = rangeToVersion(r2) 9 | if (semver.valid(v1) && semver.valid(v2)) { 10 | return semver.gt(v1, v2) ? r1 : r2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/@vue/cli/types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "cli-test.ts", 4 | "index.d.ts" 5 | ], 6 | "compilerOptions": { 7 | "module": "commonjs", 8 | "lib": [ 9 | "es6" 10 | ], 11 | "noImplicitAny": true, 12 | "noImplicitThis": true, 13 | "strictNullChecks": true, 14 | "esModuleInterop": true, 15 | "strictFunctionTypes": true, 16 | "types": [], 17 | "noEmit": true, 18 | "forceConsistentCasingInFileNames": true, 19 | "baseUrl": "." 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/test/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs/vue-cli/f36a4edfbd2bca485e64761d75490e06948abdc9/packages/test/.gitkeep -------------------------------------------------------------------------------- /packages/vue-cli-version-marker/README.md: -------------------------------------------------------------------------------- 1 | # What is This? 2 | 3 | The npm registry does not expose `/latest` endpoints for scoped packages. Getting the full metadata for a scoped package is typically `~300ms` slower than simply getting the latest version from an unscoped package. 4 | 5 | This package serves as an unscoped marker to expose the latest version currently published for `@vue/cli`. 6 | -------------------------------------------------------------------------------- /packages/vue-cli-version-marker/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-cli-version-marker", 3 | "version": "5.0.8", 4 | "description": "version marker for @vue/cli", 5 | "author": "Evan You", 6 | "license": "MIT", 7 | "main": "package.json", 8 | "devDependencies": { 9 | "@vue/cli": "^5.0.8" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /scripts/e2e-test/cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function cleanup { 4 | echo "Cleaning up." 5 | stopLocalRegistry 6 | 7 | if [ -n "$GIT_E2E_SETUP" ]; then 8 | cleanupE2Egit 9 | fi 10 | } 11 | 12 | # Error messages are redirected to stderr 13 | function handle_error { 14 | echo "$(basename $0): ERROR! An error was encountered executing line $1." 1>&2; 15 | cleanup 16 | echo "Exiting with error." 1>&2; 17 | exit 1 18 | } 19 | 20 | function handle_exit { 21 | cleanup 22 | echo "Exiting without error." 1>&2; 23 | exit 24 | } 25 | 26 | # Exit the script with a helpful error message when any error is encountered 27 | trap 'set +x; handle_error $LINENO $BASH_COMMAND' ERR 28 | 29 | # Cleanup before exit on any termination signal 30 | trap 'set +x; handle_exit' SIGQUIT SIGTERM SIGINT SIGKILL SIGHUP 31 | -------------------------------------------------------------------------------- /scripts/patchChromedriver.js: -------------------------------------------------------------------------------- 1 | // Appveyor current only ships Chrome 72 2 | // which is no longer supported by the latest version of Chromedriver. 3 | 4 | const fs = require('fs') 5 | const path = require('path') 6 | const pkg = require('../package.json') 7 | 8 | const versionString = require('child_process').execSync('wmic datafile where name="C:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe" get Version /value').toString() 9 | const majorVersion = versionString.match(/Version=(\d+)/)[1] 10 | pkg.resolutions.chromedriver = `^${majorVersion}.0.0` 11 | 12 | console.log(`patched chromedriver to version ${majorVersion}`) 13 | 14 | fs.writeFileSync(path.resolve(__dirname, '../package.json'), JSON.stringify(pkg, null, 2)) 15 | -------------------------------------------------------------------------------- /scripts/testSetup.js: -------------------------------------------------------------------------------- 1 | process.env.VUE_CLI_TEST = true 2 | process.env.VUE_CLI_SKIP_DIRTY_GIT_PROMPT = true 3 | --------------------------------------------------------------------------------