@squiz/component-cli-lib 1.12.0-alpha.21 → 1.12.0-alpha.22

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 (40) hide show
  1. package/.npm/_logs/{2023-02-10T03_34_35_584Z-debug-0.log → 2023-02-10T04_47_38_780Z-debug-0.log} +11 -11
  2. package/build.js +4 -0
  3. package/lib/component-init.d.ts +12 -0
  4. package/lib/component-init.spec.d.ts +1 -0
  5. package/lib/index.d.ts +1 -0
  6. package/lib/index.js +86 -82
  7. package/lib/index.js.map +4 -4
  8. package/lib/templates/advanced/build.js +43 -0
  9. package/lib/templates/advanced/main.js +3 -0
  10. package/lib/templates/advanced/manifest.json +53 -0
  11. package/lib/templates/advanced/package.json +11 -0
  12. package/lib/templates/advanced/previews/example.data.json +1 -0
  13. package/lib/templates/advanced/previews/preview.html +9 -0
  14. package/lib/templates/advanced/static/default.js +1 -0
  15. package/lib/templates/advanced/static/default.scss +1 -0
  16. package/lib/templates/basic/main.js +3 -0
  17. package/lib/templates/basic/manifest.json +53 -0
  18. package/lib/templates/basic/previews/example.data.json +1 -0
  19. package/lib/templates/basic/previews/preview.html +9 -0
  20. package/lib/templates/basic/static/default.css +1 -0
  21. package/lib/templates/basic/static/default.js +1 -0
  22. package/package.json +9 -9
  23. package/src/component-init.spec.ts +203 -0
  24. package/src/component-init.ts +48 -0
  25. package/src/index.ts +1 -0
  26. package/templates/advanced/build.js +43 -0
  27. package/templates/advanced/main.js +3 -0
  28. package/templates/advanced/manifest.json +53 -0
  29. package/templates/advanced/package.json +11 -0
  30. package/templates/advanced/previews/example.data.json +1 -0
  31. package/templates/advanced/previews/preview.html +9 -0
  32. package/templates/advanced/static/default.js +1 -0
  33. package/templates/advanced/static/default.scss +1 -0
  34. package/templates/basic/main.js +3 -0
  35. package/templates/basic/manifest.json +53 -0
  36. package/templates/basic/previews/example.data.json +1 -0
  37. package/templates/basic/previews/preview.html +9 -0
  38. package/templates/basic/static/default.css +1 -0
  39. package/templates/basic/static/default.js +1 -0
  40. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "http://localhost:3000/schemas/v1.json",
3
+ "name": "default",
4
+ "namespace": "default-namespace",
5
+ "displayName": "Default Component",
6
+ "description": "Default example component",
7
+ "version": "0.0.1",
8
+ "mainFunction": "main",
9
+ "functions": [
10
+ {
11
+ "name": "main",
12
+ "entry": "main.js",
13
+ "input": {},
14
+ "output": {
15
+ "responseType": "html",
16
+ "staticFiles": [
17
+ {
18
+ "location": "header",
19
+ "file": {
20
+ "type": "css",
21
+ "filepath": "default.css"
22
+ }
23
+ },
24
+ {
25
+ "location": "footer",
26
+ "file": {
27
+ "type": "js",
28
+ "filepath": "default.js"
29
+ }
30
+ }
31
+ ]
32
+ }
33
+ }
34
+ ],
35
+ "previews": {
36
+ "default": {
37
+ "functionData": {
38
+ "main": {
39
+ "inputData": {
40
+ "type": "file",
41
+ "path": "previews/example.data.json"
42
+ },
43
+ "wrapper": {
44
+ "path": "previews/preview.html"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "staticFiles": {
51
+ "locationRoot": "static"
52
+ }
53
+ }
@@ -0,0 +1,9 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" dir="ltr">
3
+ <head>
4
+ [component://static-header]
5
+ </head>
6
+ <body>
7
+ [component://output] [component://static-footer]
8
+ </body>
9
+ </html>
@@ -0,0 +1 @@
1
+ /* Client Side CSS goes here */
@@ -0,0 +1 @@
1
+ // Client Side JS goes here