Code Monkey home page Code Monkey logo

vuetify-spa's Introduction

vuetify-spa

.NET 8.0 Vuetify Webpack App Template

Browse source code, view live demo vuetify-spa.web-templates.io and install with dotnet-new:

$ dotnet tool install -g x

$ x new LegacyTemplates/vuetify-spa ProjectName

Alternatively write new project files directly into an empty repository, using the Directory Name as the ProjectName:

$ git clone https://github.com/<User>/<ProjectName>.git
$ cd <ProjectName>
$ x new LegacyTemplates/vuetify-spa

Development workflow

Our recommendation during development is to run the dev npm script or Gulp task and leave it running in the background:

$ npm run dev

This initially generates a full development build of your Web App then stays running in the background to process files as they’re changed. This enables the normal dev workflow of running your ASP.NET Web App, saving changes locally which are then reloaded using ServiceStack’s built-in hot reloading. Alternatively hitting F5 will refresh the page and view the latest changes.

Each change updates the output dev resources so even if you stop the dev task your Web App remains in a working state that’s viewable when running the ASP.NET Web App.

Live reload with built-in Dev Server

The alternative dev workflow is to run the serve npm or gulp script to run Create React App's built-in Webpack dev server:

$ npm run serve

This launches the Webpack dev server listening at http://localhost:8080/ and configured to proxy all non-Webpack HTTP requests to the ASP.NET Web App where it handles all Server API requests. The benefit of viewing your App through the Webpack dev server is its built-in Live Reload feature where it will automatically reload the page as resources are updated. We’ve found the Webpack dev server ideal when developing UI’s where your Web App is running side-by-side VS.NET, where every change saved triggers the dev server to reload the current page so changes are visible immediately.

The disadvantage of the dev server is that all transformations are kept in memory so when the dev server is stopped, the Web Apps resources are lost, so it requires a webpack-build in order to generate a current build. There’s also a lag in API requests resulting from all server request being proxied.

Watched .NET Core builds

.NET Core projects can also benefit from Live Coding using dotnet watch which performs a “watched build” where it automatically stops, recompiles and restarts your .NET Core App when it detects source file changes. You can start a watched build from the command-line with:

$ dotnet watch run

Create a production build

Run the build npm script or gulp task to generate a static production build of your App saved to your .NET App's /wwwroot folder:

$ npm run build

This will let you run the production build of your App that's hosted by your .NET App.

Updating Server TypeScript DTOs

Run the dtos npm script or Gulp task to update your server dtos in /src/dtos.ts:

$ npm run dtos

Deployments

When your App is ready to deploy, run the publish npm (or Gulp) script to package your App for deployment:

$ npm run publish

Which will create a production build of your App which then runs dotnet publish -c Release to Publish a Release build of your App in the /bin/net5/publish folder which can then copied to remote server or an included in a Docker container to deploy your App.

Testing

Run the test npm script or gulp task to launch the test runner in the interactive watch mode:

$ npm test

To launch a live testing session that continuously reruns tests when making source code changes, run the test-watch npm script instead:

$ npm run test-watch

To run end-to-end integration tests with cypress:

$ npm run e2e

Vue CLI App

This project was bootstrapped with Vue CLI App with the vuetify cli plugin, refer to the documentation links to learn more about developing with Vue CLI Apps.

vuetify-spa's People

Contributors

mythz avatar layoric avatar lightwithin avatar

Stargazers

Dev-X avatar Mark Zhukovsky avatar  avatar  avatar Mohammed Saigh avatar  avatar Gorgud Gadimli avatar Salvatore Esposito avatar Damian Ritorto avatar Tyson avatar Jan Hjørdie avatar  avatar Akash Pawara avatar  avatar Luis Marroquin avatar Guyang Li avatar  avatar Andrii Zahreichuk avatar Annamalai avatar Jimmy Yen avatar Ty Moodley avatar  avatar Matthew McLeod avatar Marten T. Compoc avatar  avatar Chris Smith avatar Vyacheslav Treskov avatar Marcio Lourenco avatar Roy avatar  avatar 千军万马 avatar Dennis Hulsmans avatar Yaroslav Zhmayev avatar hoangitk avatar  avatar Daniel Blendea avatar

Watchers

 avatar  avatar James Cloos avatar Tyson avatar Robert  avatar Dieter Lackner-Gansberger avatar  avatar

vuetify-spa's Issues

Crashes during initiall install

x new vuetify-spa CeeNineteen crashes:


> vue-cli-service build


-  Building for production...
Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

  `@babel/polyfill` is deprecated. Please, use required parts of `core-js`
  and `regenerator-runtime/runtime` separately
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
 ERROR  Error: No module factory available for dependency type: CssDependency
Error: No module factory available for dependency type: CssDependency
    at addDependency (C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\webpack\lib\Compilation.js:800:12)
    at iterationOfArrayCallback (C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\webpack\lib\Compilation.js:208:3)
    at addDependenciesBlock (C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\webpack\lib\Compilation.js:816:5)
    at Compilation.processModuleDependencies (C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\webpack\lib\Compilation.js:827:4)
    at afterBuild (C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\webpack\lib\Compilation.js:954:15)
    at C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\webpack\lib\Compilation.js:998:11
    at callback (C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\webpack\lib\Compilation.js:734:5)
    at C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\webpack\lib\Compilation.js:782:12
    at handleParseResult (C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\webpack\lib\NormalModule.js:478:12)
    at C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\webpack\lib\NormalModule.js:500:6
    at C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\webpack\lib\NormalModule.js:358:12
    at C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\loader-runner\lib\LoaderRunner.js:186:6
    at context.callback (C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at C:\programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\mini-css-extract-plugin\dist\loader.js:199:12
    at C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\webpack\lib\Compiler.js:343:11
    at C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\webpack\lib\Compiler.js:681:15
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:13:1)
    at AsyncSeriesHook.lazyCompileHook (C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\tapable\lib\Hook    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Programming\CovidOffice\CeeNineteen\CeeNineteen\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:4:1)
npm ERR! errno 1
npm ERR! [email protected] build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\xxxx\AppData\Roaming\npm-cache\_logs\2020-12-07T18_13_31_680Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\xxxx\AppData\Roaming\npm-cache\_logs\2020-12-07T18_13_31_828Z-debug.log

Vuetify grid system conflicting with bootstrap grid

I'm getting some weird layout issues due to the 'row' class that is applied by the vuetify v-layout component with the 'row' attribute applied, and bootstrap's 'row' class.

I noticed bootstrap was removed here: 469bad1
but added back in here: 1732a0d

Is there any need for bootstrap in this template? I've removed it and I can't see any ill effects so far.

Error creating creating vuetify spa app

Running x new vuetify-spa RadioArchiveWeb

Installing vuetify-spa...
running nuget restore...
MSBuild auto-detection: using msbuild version '16.8.3.61104' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\bin'.
Restoring packages for C:\git\docker\course\4\RadioArchiveWeb\RadioArchiveWeb.Tests\RadioArchiveWeb.Tests.csproj...
Restoring packages for C:\git\docker\course\4\RadioArchiveWeb\RadioArchiveWeb.ServiceInterface\RadioArchiveWeb.ServiceInterface.csproj...

...

running npm install...
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/vue
npm ERR!   vue@"^2.6.12" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"3.0.5" from @vue/[email protected]
npm ERR! node_modules/@vue/compiler-sfc
npm ERR!   peerOptional @vue/compiler-sfc@"^3.0.0-beta.14" from @vue/[email protected]
npm ERR!   node_modules/@vue/cli-service
npm ERR!     dev @vue/cli-service@"^4.5.9" from the root project
npm ERR!     1 more (@vue/cli-plugin-babel)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\kairu\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\kairu\AppData\Local\npm-cache\_logs\2021-02-07T23_16_56_389Z-debug.log

eresolve-report.txt

Chrome debugging not working - issue with sourcemaps?

From a brand new dotnet-new vuetify-spa VuetifyTest, I'm trying to put a chrome devtools breakpoint in the typescript section of the Home.vue file, but can't seem to find the suitable file. Doing a ctrl-P, I get a range of matching files:

image

That bottom one (the plain Home.vue without cachebuster suffixes) shows as:

__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Home_vue_vue_type_template_id_66dfbd26___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Home.vue?vue&type=template&id=66dfbd26& */ "./src/home/Home.vue?vue&type=template&id=66dfbd26&");
/* harmony import */ var _Home_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Home.vue?vue&type=script&lang=ts& */ "./src/home/Home.vue?vue&type=script&lang=ts&");
/* empty/unused harmony star reexport *//* harmony import */ var _Home_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Home.vue?vue&type=style&index=0&lang=scss& */ "./src/home/Home.vue?vue&type=style&index=0&lang=scss&");
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");






/* normalize component */

var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
_Home_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__["default"],
_Home_vue_vue_type_template_id_66dfbd26___WEBPACK_IMPORTED_MODULE_0__["render"],
_Home_vue_vue_type_template_id_66dfbd26___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
false,
null,
null,
null

)

/* hot reload */
if (true) {
var api = __webpack_require__(/*! ./node_modules/vue-hot-reload-api/dist/index.js */ "./node_modules/vue-hot-reload-api/dist/index.js")
api.install(__webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.runtime.esm.js"))
if (api.compatible) {
    module.hot.accept()
    if (!module.hot.data) {
    api.createRecord('66dfbd26', component.options)
    } else {
    api.reload('66dfbd26', component.options)
    }
    module.hot.accept(/*! ./Home.vue?vue&type=template&id=66dfbd26& */ "./src/home/Home.vue?vue&type=template&id=66dfbd26&", function(__WEBPACK_OUTDATED_DEPENDENCIES__) { /* harmony import */ _Home_vue_vue_type_template_id_66dfbd26___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Home.vue?vue&type=template&id=66dfbd26& */ "./src/home/Home.vue?vue&type=template&id=66dfbd26&");
(function () {
    api.rerender('66dfbd26', {
        render: _Home_vue_vue_type_template_id_66dfbd26___WEBPACK_IMPORTED_MODULE_0__["render"],
        staticRenderFns: _Home_vue_vue_type_template_id_66dfbd26___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]
    })
    })(__WEBPACK_OUTDATED_DEPENDENCIES__); })
}
}
component.options.__file = "src/home/Home.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);//# sourceURL=[module]
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvaG9tZS9Ib21lLnZ1ZT80YmFlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBbUY7QUFDM0I7QUFDTDtBQUNjOzs7QUFHakU7QUFDMEY7QUFDMUYsZ0JBQWdCLDJHQUFVO0FBQzFCLEVBQUUsMEVBQU07QUFDUixFQUFFLCtFQUFNO0FBQ1IsRUFBRSx3RkFBZTtBQUNqQjtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBLElBQUksSUFBVTtBQUNkLFlBQVksbUJBQU8sQ0FBQyx3R0FBeUY7QUFDN0csY0FBYyxtQkFBTyxDQUFDLHVEQUFLO0FBQzNCO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7QUFDQSxzQkFBc0IscUdBQTJDLEVBQUU7QUFBQTtBQUNuRTtBQUNBLGdCQUFnQiwrRUFBTTtBQUN0Qix5QkFBeUIsd0ZBQWU7QUFDeEMsT0FBTztBQUNQLEtBQUs7QUFDTDtBQUNBO0FBQ0E7QUFDZSxnRiIsImZpbGUiOiIuL3NyYy9ob21lL0hvbWUudnVlLmpzIiwic291cmNlc0Nvb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UmVjb3JkKCc2NmRmYmQyNicsIGNvbXBvbmVudC5vcHRpb25zKVxuICAgIH0gZWxzZSB7XG4gICAgICBhcGkucmVsb2FkKCc2NmRmYmQyNicsIGNvbXBvbmVudC5vcHRpb25zKVxuICAgIH1cbiAgICBtb2R1bGUuaG90LmFjY2VwdChcIi4vSG9tZS52dWU/dnVlJnR5cGU9dGVtcGxhdGUmaWQ9NjZkZmJkMjYmXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgIGFwaS5yZXJlbmRlcignNjZkZmJkMjYnLCB7XG4gICAgICAgIHJlbmRlcjogcmVuZGVyLFxuICAgICAgICBzdGF0aWNSZW5kZXJGbnM6IHN0YXRpY1JlbmRlckZuc1xuICAgICAgfSlcbiAgICB9KVxuICB9XG59XG5jb21wb25lbnQub3B0aW9ucy5fX2ZpbGUgPSBcInNyYy9ob21lL0hvbWUudnVlXCJcbmV4cG9ydCBkZWZhdWx0IGNvbXBvbmVudC5leHBvcnRzIl0sInNvdXJjZVJvb3QiOiIifQ==

The other ones are not much help either. eg. the top one (Home.vue?vbae) contains:

import { render, staticRenderFns } from "./Home.vue?vue&type=template&id=66dfbd26&"
import script from "./Home.vue?vue&type=script&lang=ts&"
export * from "./Home.vue?vue&type=script&lang=ts&"
import style0 from "./Home.vue?vue&type=style&index=0&lang=scss&"


/* normalize component */
import normalizer from "!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js"
var component = normalizer(
script,
render,
staticRenderFns,
false,
null,
null,
null

)

/* hot reload */
if (module.hot) {
var api = require("/Users/tyson/Code/VuetifyTest/VuetifyTest/node_modules/vue-hot-reload-api/dist/index.js")
api.install(require('vue'))
if (api.compatible) {
    module.hot.accept()
    if (!module.hot.data) {
    api.createRecord('66dfbd26', component.options)
    } else {
    api.reload('66dfbd26', component.options)
    }
    module.hot.accept("./Home.vue?vue&type=template&id=66dfbd26&", function () {
    api.rerender('66dfbd26', {
        render: render,
        staticRenderFns: staticRenderFns
    })
    })
}
}
component.options.__file = "src/home/Home.vue"
export default component.exports

Any ideas how to get this working? I'm assuming it's an issue with source maps but don't have any idea where to start.

PS. I'm very new to Vue (and out of touch on front end tech in general) so my apologies if this is something obvious - I was hoping to submit a PR instead but am completely stuck.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.