![]() ![]() State-management is a complicated and sometimes controversial topic in modern JavaScript development. It is a great way to learn how to use this library. You can learn a lot about Vue and the conventions around project structure, testing, and other usages from these templates. When you're ready to start a "real" project (which you intend to build to a production environment), use the webpack template.If you'd like to start writing single-file components and building a more "real-world" app, try the webpack-simple template.If you are just playing with Vue.js for the first time, the simple template is a great place to start.Simple – The simplest possible Vue setup in a single HTML fileĮach template includes documentation of its own, which explains the project structure and available scripts/commands to start/build/test your app. ![]() Pwa – PWA template for vue-cli based on the Webpack template Webpack-simple – A simple Webpack + vue-loader setup for quick prototypingīrowserify – A full-featured Browserify + vueify setup with hot-reload, linting and unit testingīrowserify-simple – A simple Browserify + vueify setup for quick prototyping Webpack – A full-featured Webpack + vue-loader setup with hot reload, linting, testing and css extraction The available templates (as of the time of writing) are listed below (descriptions taken from the vue-cli README): The Vue-CLI is the preferred way of creating new Vue applications. Each of these tools deserves an entire article of its own, so we will just summarize their capabilities in this final section. Several official companion libraries and tools are available, with support from the Vue community, as well as from the core development team. Vue's ecosystem is remarkably mature considering the relatively young age of the library. ![]() We will look at Vue-CLI in the following section. vue components, as well as to process JSX and other Vue-specific features and syntax. Instead, you will typically use the Vue-CLI to generate your new Vue project (based on a predefined template), which will preconfigure Webpack to build your. However, for new Vue apps, it is usually preferable to not write the Webpack configuration from scratch. How you choose to configure these loaders will vary depending on your project. You can refer to the vue-loader documentation for details about the various options and related loaders that are available. Within the template you can use Vue-specific directives, as well as JavaScript expressions, within double-curly-braces (e.g., In this example, the contents of the marked with an id of app will be used as the template, but more typically you will define a discrete template for your app and each component. A Vue instance typically renders a template. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |