* vite是什么?
* 一个前端的开发构建工具
* 当我们的项目组件变大时,会自觉的分文件、分组件等操作,缩减单文件的大小、增加可维护性,vite则可以帮我们管理,并且它有很多插件帮助我们开发。
目录
初始化
- 创建一个文件夹,比如这里创建一个叫 mimicrymusic 的文件夹:
- 然后进入这个文件夹,或是把它拖进vscode中:
- 可以进VSCode内,使用终端运行以下命令:
- 初始化生成包配置文件:npm init -y
- 生成package.json:
- -
- 内容如下:
- -
- 其中:
- name:项目名
- version:版本号
- description:项目描述
- main:js入口
- scripts:配置用于npm的命令
- keywords:(可以不要)
- author:作者信息(可以不要)
- license:开源协议
安装vite依赖
- 在终端中执行命令:npm i vite -D
- 安装vite的开发环境依赖:
- 等待一段时间的下载:
- 下载完成后我们刚刚的包配置文件package.json中就会有自动增加一个vite的依赖:
安装vue的依赖
- 在终端中执行命令:npm i vue
- 等待安装完成以后,package.json中就会自动增加vue的配置:
创建index.html
- 在项目的根位置,即和package.json同级的位置创建一个index.html文件:
- 里面写如下内容:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>标题</title>
</head>
<body>
<!-- 引用的js文件位置 -->
<script type="module" src=""></script>
</body>
</html>
- 正如上面代码中注释所说,script标签引入了一个js文件到index.html,但我们还没有指定引入哪一个js文件,下面我们将创建这个文件,然后在引入。
创建main.js
- 在项目根位置创建src目录,然后在src内创建main.js文件:
- 里面我们可以先随便写一句输出: console.log("hello coolight");
- 保存文件
- 在我们刚刚的index.html中引入main.js文件:
<!-- 引用的js文件 -->
<script type="module" src="./src/main.js"></script>
- 在package.json中配置npm命令,即把里面的scripts的内容改为 "dev" : "vite"
尝试让它跑起来(1)
- 在终端中敲 npm run dev,就会有如下信息提示
- 键盘按住ctrl,然后鼠标左键点击终端里图中框起来的链接(不要点我的图,点你的终端里的!!!):
- 它就会跳转到浏览器,显示我们刚刚写的页面
- 一片空白则是正常的,因为我们的页面并没有写东西
- 我们的js也只写了一句输出,这时候要在浏览器中打开控制台看看有没有这句输出
- 浏览器中来到我们写的页面
- 在浏览器中按一下键盘F12键
- 浏览器就会弹出一个窗口:
- 此时点击控制台,就可以看见我们的main.js的输出了:
创建App.vue
- 在src目录下,新建 App.vue 文件:
- 内容可以随便写点,比如:
<template>
<div>
你好 coolight
</div>
</template>
在main.js中创建vue,安装vitejs
- 修改main.js的内容为:
import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App)
app.mount('#app')
- 可以看到,我们在main.js中创建的vue需要一个挂载点,在html中一个id为 app 的元素
- 所以我们需要在index.html中增加一个 <div id="app"></div> :
- 保存文件
- 此时你可能发现,欸vite好像报错了:
- [vite] Internal server error: Failed to parse source for import analysis because the content contains invalid JS syntax. Install @vitejs/plugin-vue to handle .vue files.
- 浏览器里我们的页面也有报错:
- 它的意思很明显,需要我们去安装 @vitejs/plugin-vue,因为浏览器正常执行不了vue文件,所以需要安装插件来编译解析。
- 那么我们就来安装它。
- 如果你的终端vite还在运行,也就是没有显示提示让你输入,就像这样:
- 那么就按键盘ctrl + c ,停止掉vite
- 它会问你 终止批处理操作吗(Y/N)?
- 我们输入 y ,然后回车即可
- 然后再输入 npm i @vitejs/plugin-vue -D
- 等待下载安装:
- 然后在项目根目录创建vite的配置文件:vite.config.js
- 里面写如下配置:
import { defineConfig } from "vite"
import Vue from "@vitejs/plugin-vue"
export default defineConfig({
plugins:[
Vue()
]
})
- 保存文件
- 在终端中执行 npm run dev
- 然后回到浏览器中看看我们的页面,就会发现已经正常了!
结语
- 这个是手动配置的方法,其实有很简单的一键操作。
- 后面我们聊聊给手动配置路由router,状态管理pinia等
alternative to tamoxifen: does tamoxifen cause menopause – natural alternatives to tamoxifen
get cheap propecia without insurance: cost generic propecia tablets – order propecia without a prescription
http://nolvadex.life/# aromatase inhibitor tamoxifen
https://ciprofloxacin.tech/# cipro 500mg best prices
https://finasteride.store/# cost of generic propecia without a prescription
buy cytotec online buy cytotec Misoprostol 200 mg buy online
antibiotics cipro: cipro for sale – ciprofloxacin mail online
Какие радиаторы выбрать для отопления https://propest.ru/kak-vybrat-radiator-dlya-doma.html частного загородного дома – каменного или деревянного: разновидности и классы, правила выбора, цены, сравнения.
how does tamoxifen work tamoxifen 20 mg tablet tamoxifen citrate pct
Когда возникли проблемы с моим Lenovo, я нашел отличный сервисный центр – lenovoruremont.ru. Меня впечатлил качеством услуг и компетентностью мастеров. Они быстро продиагностировали проблему и предложили оптимальное решение. Ремонт был выполнен качественно и в срок. Результат превзошел мои ожидания, теперь всем советую обращаться именно сюда для ремонта устройств Lenovo.
buy generic ciprofloxacin buy ciprofloxacin buy cipro online without prescription
lisinopril tab 100mg lisinopril 250 mg order cheap lisinopril
http://finasteride.store/# propecia
http://ciprofloxacin.tech/# buy cipro online without prescription
buy misoprostol over the counter: order cytotec online – purchase cytotec
zavod-lazer.com
https://nolvadex.life/# tamoxifen alternatives premenopausal
купить женщину резиновую
buy cipro online cipro for sale cipro online no prescription in the usa
generic propecia pill cost of propecia online order propecia without dr prescription
where to buy digoxin without a prescription – purchase verapamil pills order generic lasix 100mg
cytotec online: cytotec abortion pill – buy cytotec
does tamoxifen cause joint pain tamoxifen hot flashes nolvadex estrogen blocker
antibiotics cipro ciprofloxacin over the counter cipro pharmacy
http://ciprofloxacin.tech/# cipro 500mg best prices
order cytotec online: buy cytotec pills – buy cytotec over the counter
https://nolvadex.life/# tamoxifen vs raloxifene
http://lisinopril.network/# lisinopril 10 mg brand name in india
http://nolvadex.life/# is nolvadex legal
Brands that manufacture chronometer watches
Understanding COSC Certification and Its Importance in Horology
COSC Validation and its Stringent Standards
Controle Officiel Suisse des Chronometres, or the Controle Officiel Suisse des Chronometres, is the official Swiss testing agency that attests to the precision and precision of timepieces. COSC accreditation is a sign of excellent craftsmanship and dependability in chronometry. Not all watch brands seek COSC validation, such as Hublot, which instead follows to its proprietary strict standards with mechanisms like the UNICO, attaining similar accuracy.
The Art of Exact Chronometry
The core system of a mechanical watch involves the mainspring, which supplies power as it unwinds. This mechanism, however, can be susceptible to environmental elements that may affect its precision. COSC-certified mechanisms undergo rigorous testing—over fifteen days in various conditions (5 positions, three temperatures)—to ensure their resilience and reliability. The tests assess:
Mean daily rate precision between -4 and +6 secs.
Mean variation, highest variation levels, and effects of temperature variations.
Why COSC Accreditation Matters
For timepiece fans and collectors, a COSC-accredited watch isn’t just a item of tech but a proof to lasting quality and accuracy. It symbolizes a watch that:
Offers excellent dependability and accuracy.
Offers assurance of superiority across the complete construction of the watch.
Is likely to maintain its worth more efficiently, making it a smart investment.
Popular Chronometer Brands
Several well-known brands prioritize COSC accreditation for their timepieces, including Rolex, Omega, Breitling, and Longines, among others. Longines, for instance, presents collections like the Archive and Soul, which highlight COSC-validated mechanisms equipped with advanced substances like silicone equilibrium suspensions to boost resilience and performance.
Historic Background and the Development of Timepieces
The notion of the chronometer dates back to the requirement for exact chronometry for navigational at sea, highlighted by John Harrison’s work in the eighteenth cent. Since the official establishment of COSC in 1973, the accreditation has become a standard for assessing the precision of luxury timepieces, continuing a legacy of excellence in watchmaking.
Conclusion
Owning a COSC-certified watch is more than an visual selection; it’s a commitment to excellence and accuracy. For those valuing precision above all, the COSC validation provides peace of mind, guaranteeing that each certified watch will function reliably under various circumstances. Whether for individual satisfaction or as an investment decision, COSC-accredited watches stand out in the world of watchmaking, bearing on a tradition of precise chronometry.
https://canadaph24.pro/# pharmacy wholesalers canada
mexico drug stores pharmacies: mexican pharmacy – mexico drug stores pharmacies
top 10 online pharmacy in india http://indiaph24.store/# buy prescription drugs from india
best online pharmacy india
indian pharmacies safe https://indiaph24.store/# online shopping pharmacy india
indian pharmacy online
http://indiaph24.store/# buy prescription drugs from india
world pharmacy india buy medicines from India п»їlegitimate online pharmacies india
top online pharmacy india indian pharmacy Online medicine order
https://canadaph24.pro/# safe canadian pharmacies
http://canadaph24.pro/# canadapharmacyonline
mexican online pharmacies prescription drugs mexico pharmacy п»їbest mexican online pharmacies
квартиры на сутки https://www.sutki24.by .
canadian pharmacy online Certified Canadian Pharmacies canadian pharmacy online store
reputable mexican pharmacies online: mexico pharmacy – mexico pharmacy
top 10 online pharmacy in india https://indiaph24.store/# pharmacy website india
top online pharmacy india
Brands that manufacture chronometer watches
Understanding COSC Accreditation and Its Importance in Watchmaking
COSC Certification and its Stringent Criteria
Controle Officiel Suisse des Chronometres, or the Controle Officiel Suisse des Chronometres, is the authorized Swiss testing agency that verifies the precision and precision of wristwatches. COSC accreditation is a mark of excellent craftsmanship and trustworthiness in timekeeping. Not all watch brands pursue COSC validation, such as Hublot, which instead adheres to its own stringent criteria with movements like the UNICO calibre, attaining equivalent precision.
The Science of Exact Timekeeping
The central mechanism of a mechanized timepiece involves the spring, which provides energy as it unwinds. This system, however, can be prone to environmental elements that may affect its accuracy. COSC-validated movements undergo rigorous testing—over fifteen days in various conditions (5 positions, three temperatures)—to ensure their durability and reliability. The tests assess:
Mean daily rate accuracy between -4 and +6 seconds.
Mean variation, highest variation levels, and effects of temperature variations.
Why COSC Validation Matters
For watch enthusiasts and collectors, a COSC-accredited watch isn’t just a item of tech but a testament to enduring excellence and precision. It represents a timepiece that:
Presents exceptional reliability and accuracy.
Ensures guarantee of quality across the entire design of the timepiece.
Is apt to retain its value more efficiently, making it a sound choice.
Popular Timepiece Brands
Several well-known manufacturers prioritize COSC certification for their timepieces, including Rolex, Omega, Breitling, and Longines, among others. Longines, for instance, offers collections like the Archive and Spirit, which feature COSC-accredited mechanisms equipped with advanced materials like silicone equilibrium suspensions to boost resilience and performance.
Historic Background and the Evolution of Timepieces
The idea of the chronometer dates back to the need for precise chronometry for navigation at sea, highlighted by John Harrison’s work in the 18th century. Since the official establishment of COSC in 1973, the accreditation has become a benchmark for evaluating the precision of luxury watches, continuing a tradition of superiority in watchmaking.
Conclusion
Owning a COSC-accredited watch is more than an visual choice; it’s a commitment to quality and precision. For those appreciating accuracy above all, the COSC accreditation offers peacefulness of thoughts, ensuring that each accredited timepiece will perform reliably under various circumstances. Whether for personal satisfaction or as an investment decision, COSC-certified watches distinguish themselves in the world of watchmaking, maintaining on a tradition of precise chronometry.
https://mexicoph24.life/# mexican pharmacy
http://canadaph24.pro/# buying drugs from canada
reputable indian online pharmacy http://indiaph24.store/# india pharmacy mail order
Online medicine home delivery
buying prescription drugs in mexico: Online Pharmacies in Mexico – mexican online pharmacies prescription drugs
http://mexicoph24.life/# mexican drugstore online