@farris/cli 2.1.8 → 2.2.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/lib/commands/build-components.js +40 -31
  2. package/lib/commands/build-components.js.map +1 -1
  3. package/lib/commands/build-lib.js +7 -7
  4. package/lib/commands/build-lib.js.map +1 -1
  5. package/lib/commands/create-app-options.js +73 -0
  6. package/lib/commands/create-app-options.js.map +1 -0
  7. package/lib/commands/create-app.js +71 -40
  8. package/lib/commands/create-app.js.map +1 -1
  9. package/lib/common/component-file-name.js +4 -0
  10. package/lib/common/component-file-name.js.map +1 -0
  11. package/lib/common/constant.js +1 -1
  12. package/lib/common/constant.js.map +1 -1
  13. package/lib/common/generate-app.js +45 -36
  14. package/lib/common/generate-app.js.map +1 -1
  15. package/lib/common/get-farris-config.js +19 -5
  16. package/lib/common/get-farris-config.js.map +1 -1
  17. package/lib/common/get-vite-config.js +7 -6
  18. package/lib/common/get-vite-config.js.map +1 -1
  19. package/lib/common/lib-package-exports.js +21 -0
  20. package/lib/common/lib-package-exports.js.map +1 -0
  21. package/lib/common/list-lib-components.js +24 -0
  22. package/lib/common/list-lib-components.js.map +1 -0
  23. package/lib/common/project-package-name.js +5 -0
  24. package/lib/common/project-package-name.js.map +1 -0
  25. package/lib/common/template-manifest.js +17 -0
  26. package/lib/common/template-manifest.js.map +1 -0
  27. package/lib/config/vite-component.js +9 -7
  28. package/lib/config/vite-component.js.map +1 -1
  29. package/lib/index.js +14 -5
  30. package/lib/index.js.map +1 -1
  31. package/lib/plugins/create-package-json.js +26 -11
  32. package/lib/plugins/create-package-json.js.map +1 -1
  33. package/package.json +3 -2
  34. package/templates/lib/.changeset/README.md +1 -0
  35. package/templates/lib/.changeset/config.json +11 -0
  36. package/templates/lib/.gitlab-ci.yml +62 -0
  37. package/templates/lib/README.md +3 -0
  38. package/templates/lib/components/button/button.spec.ts +8 -0
  39. package/templates/lib/components/button/index.ts +7 -0
  40. package/templates/lib/components/button/src/button.scss +10 -0
  41. package/templates/lib/components/button/src/button.vue +12 -0
  42. package/templates/lib/components/common/with-install.ts +9 -0
  43. package/templates/lib/components/index.ts +10 -0
  44. package/templates/lib/farris.config.mjs +13 -0
  45. package/templates/lib/index.html +12 -0
  46. package/templates/lib/package.json +26 -0
  47. package/templates/lib/src/App.vue +7 -0
  48. package/templates/lib/src/main.ts +4 -0
  49. package/templates/lib/tsconfig.json +7 -0
  50. package/templates/lib/vitest.config.ts +9 -0
  51. package/templates/mobile/.changeset/README.md +4 -0
  52. package/templates/mobile/.changeset/config.json +11 -0
  53. package/templates/mobile/.gitlab-ci.yml +63 -0
  54. package/templates/mobile/package.json +9 -2
  55. package/templates/mobile/project.json +4 -0
  56. package/templates/mobile/src/components/TheButton.spec.ts +8 -0
  57. package/templates/mobile/vitest.config.ts +9 -0
  58. package/templates/web/.changeset/README.md +4 -0
  59. package/templates/web/.changeset/config.json +11 -0
  60. package/templates/web/.gitlab-ci.yml +63 -0
  61. package/templates/web/package.json +9 -2
  62. package/templates/web/project.json +4 -0
  63. package/templates/web/src/components/TheButton.spec.ts +8 -0
  64. package/templates/web/vitest.config.ts +9 -0
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "<%= projectPackageName %>",
3
+ "version": "0.0.0"
4
+ }
@@ -0,0 +1,8 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import TheButton from './TheButton.vue';
3
+
4
+ describe('TheButton', () => {
5
+ it('exports a component', () => {
6
+ expect(TheButton).toBeTruthy();
7
+ });
8
+ });
@@ -0,0 +1,9 @@
1
+ import vue from '@vitejs/plugin-vue';
2
+ import { defineConfig } from 'vitest/config';
3
+
4
+ export default defineConfig({
5
+ plugins: [vue()],
6
+ test: {
7
+ include: ['src/**/*.spec.ts']
8
+ }
9
+ });
@@ -0,0 +1,4 @@
1
+ Use `npm run changeset` then `npm run version` to write CHANGELOG.md.
2
+
3
+ This app template is `private` and is not meant for `npm publish`.
4
+ If the default branch is not `main`, edit `baseBranch` in `config.json`.
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json",
3
+ "changelog": "@changesets/cli/changelog",
4
+ "commit": false,
5
+ "fixed": [],
6
+ "linked": [],
7
+ "access": "restricted",
8
+ "baseBranch": "main",
9
+ "updateInternalDependencies": "patch",
10
+ "ignore": []
11
+ }
@@ -0,0 +1,63 @@
1
+ image: node:20
2
+
3
+ variables:
4
+ PROJECT_ROOT: "."
5
+
6
+ stages:
7
+ - pre
8
+ - build
9
+ - publish
10
+ - publishproject
11
+
12
+ pre-job:
13
+ stage: pre
14
+ tags:
15
+ - environment:cloud
16
+ script:
17
+ - export commit_author=$(git log -1 --pretty=format:%an)
18
+ - export commit_email=$(git log -1 --pretty=format:%ce)
19
+
20
+ build-job:
21
+ stage: build
22
+ tags:
23
+ - environment:cloud
24
+ script:
25
+ - npm config set registry https://repos.iec.io/repository/npm-igix/
26
+ - npm config set _auth=$(echo -n $ARTIFACTS_REPO_USERNAME:$ARTIFACTS_REPO_PASSWORD | base64)
27
+ - npm i
28
+ - npm test
29
+ - npm run build
30
+ artifacts:
31
+ expire_in: '5days'
32
+ name: 'dist'
33
+ paths:
34
+ - $CI_PROJECT_DIR/dist
35
+
36
+ publish-one:
37
+ stage: publish
38
+ tags:
39
+ - environment:cloud
40
+ only:
41
+ refs:
42
+ - cicd
43
+ changes:
44
+ - packages/**/package.json
45
+ script:
46
+ - echo "skip publish-one: app package is private"
47
+
48
+ publish-project:
49
+ stage: publishproject
50
+ tags:
51
+ - environment:cloud
52
+ only:
53
+ refs:
54
+ - cicd
55
+ changes:
56
+ - project.json
57
+ script:
58
+ - npm config set registry https://repos.iec.io/repository/npm-igix-release/
59
+ - npm config set _auth=$(echo -n $ARTIFACTS_REPO_USERNAME:$ARTIFACTS_REPO_PASSWORD | base64)
60
+ - cp ./project.json ./dist
61
+ - cd ./dist
62
+ - mv ./project.json ./package.json
63
+ - npm publish
@@ -8,7 +8,11 @@
8
8
  "build": "farris-cli build",
9
9
  "preview": "farris-cli preview",
10
10
  "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
11
- "format": "prettier --write src/"
11
+ "format": "prettier --write src/",
12
+ "test": "vitest run",
13
+ "test:watch": "vitest",
14
+ "changeset": "changeset",
15
+ "version": "changeset version"
12
16
  },
13
17
  "dependencies": {
14
18
  "@farris/ui-vue": "latest",
@@ -16,14 +20,17 @@
16
20
  "vue-router": "^4.3.0"
17
21
  },
18
22
  "devDependencies": {
23
+ "@changesets/cli": "^2.29.5",
19
24
  "@farris/cli": "<%= cliVersion %>",
20
25
  "@rushstack/eslint-patch": "^1.8.0",
21
26
  "@vue/eslint-config-prettier": "^9.0.0",
22
27
  "@vue/eslint-config-typescript": "^13.0.0",
23
28
  "@vue/tsconfig": "^0.5.1",
29
+ "@vitejs/plugin-vue": "^4.0.0",
24
30
  "eslint": "^8.57.0",
25
31
  "eslint-plugin-vue": "^9.23.0",
26
32
  "prettier": "^3.2.5",
27
- "typescript": "~5.4.0"
33
+ "typescript": "~5.4.0",
34
+ "vitest": "^1.6.1"
28
35
  }
29
36
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "<%= projectPackageName %>",
3
+ "version": "0.0.0"
4
+ }
@@ -0,0 +1,8 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import TheButton from './TheButton.vue';
3
+
4
+ describe('TheButton', () => {
5
+ it('exports a component', () => {
6
+ expect(TheButton).toBeTruthy();
7
+ });
8
+ });
@@ -0,0 +1,9 @@
1
+ import vue from '@vitejs/plugin-vue';
2
+ import { defineConfig } from 'vitest/config';
3
+
4
+ export default defineConfig({
5
+ plugins: [vue()],
6
+ test: {
7
+ include: ['src/**/*.spec.ts']
8
+ }
9
+ });