Skip to content

YAML 示例

YAML 通常用来描述配置文件,下面来看看一些使用示例。

name: material
description: Set of material design icons packed in a single ttf font file. Works on all platforms.
version: 1.0.0+2
homepage: https://github.com/xclud
repository: https://github.com/xclud/flutter_material

environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter:
 fonts:
   - family: Material
     fonts:
       - asset: lib/fonts/material.ttf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  • pnpm-lock.yaml

如果你的前端项目是使用 pnpm 来当做报管理工具的话,你会在项目根目录中发现一个 pnpm-lock.yaml 文件。

lockfileVersion: 5.3

specifiers:
  '@docsearch/css': ^3.1.0
  '@docsearch/js': ^3.1.0
  '@types/lodash': ^4.14.182
  '@types/markdown-it': ^12.2.3
  '@types/node': ^16.9.1
  '@vitejs/plugin-vue-jsx': ^1.3.10
  '@vue/repl': ^1.0.0
  '@vue/theme': ^1.0.2
  '@vueuse/core': ^8.5.0
  body-scroll-lock: ^4.0.0-beta.0
  chalk: ^4.1.2
  dynamics.js: ^1.1.5
  gray-matter: ^4.0.3
  gsap: ^3.9.0
  less: ^4.1.2
  less-loader: ^11.0.0
  lodash: ^4.17.21
  lodash-es: ^4.17.21
  markdown-it-task-lists: ^2.1.1
  normalize.css: ^8.0.1
  open: ^8.4.0
  patch-vue-directive-ssr: ^0.0.1
  shiki: ^0.10.1
  simple-git: ^2.48.0
  vite: ^2.9.9
  vitepress: 1.0.0-alpha.1
  vue: ^3.2.33
  zhlint: ^0.6.0

dependencies:
  '@vue/repl': 1.0.0_vue@3.2.33
  dynamics.js: 1.1.5
  gsap: 3.9.0
  vite: 2.9.9_less@4.1.2

devDependencies:
  '@docsearch/css': 3.1.0
  '@docsearch/js': 3.1.0
  '@types/lodash': 4.14.182
  '@types/markdown-it': 12.2.3
  '@types/node': 16.10.3
  '@vitejs/plugin-vue-jsx': 1.3.10
  '@vue/theme': 1.0.2_vue@3.2.33
  '@vueuse/core': 8.5.0_vue@3.2.33
  body-scroll-lock: 4.0.0-beta.0
  chalk: 4.1.2
  gray-matter: 4.0.3
  less: 4.1.2
  less-loader: 11.0.0_less@4.1.2
  lodash: 4.17.21
  lodash-es: 4.17.21
  markdown-it-task-lists: 2.1.1
  normalize.css: 8.0.1
  open: 8.4.0
  patch-vue-directive-ssr: 0.0.1
  shiki: 0.10.1
  simple-git: 2.48.0
  vitepress: 1.0.0-alpha.1_less@4.1.2
  vue: 3.2.33
  zhlint: 0.6.0

packages:

  /@algolia/autocomplete-core/1.6.3:
    resolution: {integrity: sha512-dqQqRt01fX3YuVFrkceHsoCnzX0bLhrrg8itJI1NM68KjrPYQPYsE+kY8EZTCM4y8VDnhqJErR73xe/ZsV+qAA==}
    dependencies:
      '@algolia/autocomplete-shared': 1.6.3
    dev: true

  /@algolia/autocomplete-shared/1.6.3:
    resolution: {integrity: sha512-UV46bnkTztyADFaETfzFC5ryIdGVb2zpAoYgu0tfcuYWjhg1KbLXveFffZIrGVoboqmAk1b+jMrl6iCja1i3lg==}
    dev: true

  /@algolia/cache-browser-local-storage/4.10.5:
    resolution: {integrity: sha512-cfX2rEKOtuuljcGI5DMDHClwZHdDqd2nT2Ohsc8aHtBiz6bUxKVyIqxr2gaC6tU8AgPtrTVBzcxCA+UavXpKww==}
    dependencies:
      '@algolia/cache-common': 4.10.5
    dev: true
  ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
YAML 示例 has loaded