@citolab/tspci 2.3.0-alpha.4 → 2.3.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citolab/tspci",
3
- "version": "2.3.0-alpha.4",
3
+ "version": "2.3.0",
4
4
  "description": "an opiniated typescript ims-pci builder with tao integration",
5
5
  "author": "patrick <patrick.deklein@cito.nl>",
6
6
  "repository": "@citolab/tspci",
@@ -46,5 +46,5 @@
46
46
  "help": "tspci --help",
47
47
  "init": "tspci init --force --path=../../pcis"
48
48
  },
49
- "gitHead": "a73cb286cca0f12d474e155915c251f85abf4b16"
49
+ "gitHead": "c7100a7ee3cd62cb7beb2bd6379c830cdec04a59"
50
50
  }
package/readme.md CHANGED
@@ -23,6 +23,42 @@
23
23
 
24
24
  ## 🔧 Installation & Setup
25
25
 
26
+ ### Cli
27
+
28
+ The easiest way to setup a pci develop environment is by using the cli.
29
+ This will ask a few options, and creates a PCI development environment with an example implementation.
30
+
31
+ <p align="center">
32
+ <img src="https://github.com/Citolab/tspci/blob/main/lib/tspci/tspci-console.png" alt="Setup using console">
33
+ </p>
34
+
35
+ Run: ```npx @citolab/tspci@latest init```
36
+
37
+ 1. It will ask to download the latest version of tspci.
38
+ 2. If agreed; tspci will be downloaded and started.
39
+ 3. You should provide a name/identifier for your PCI.
40
+ 4. You should provide a description.
41
+ 5. Last option is to add options: tailwind and preact (both are selected by default, for more info; keep reading).
42
+
43
+ #### Tailwind
44
+ Tailwind is a popular css framework and can be used to give a nice look and feel of the PCI. The cli will make sure the css is added; and all build stuff that comes with tailwind is setup.
45
+
46
+ #### preact
47
+ preact is a small version of react. You can develop your PCI using hooks and the render function as you are familiar with in react. When preact is selected the cli will also add a store to manage state. This can easily be used to store all user actions in the PCI, and even replay them.
48
+
49
+ ### specific implementations like TAO.
50
+ We also support to create a PCI that can be imported in TAO. Therefor you should use @citolab/tspci-tao.
51
+
52
+ To add tao using the cli you should run the following command inside your PCI folder:
53
+
54
+ ``` sh
55
+ npm run tspci -- add --target tao
56
+ ```
57
+
58
+ For more info: [@citolab/tspci-tao](https://github.com/Citolab/tspci/tree/main/lib/tspci-tao)
59
+
60
+ ### Manual
61
+
26
62
  1️. **Install** by running: `npm i -D @citolab/tspci`
27
63
 
28
64
  2️. **Set up** your `package.json`:
@@ -40,6 +76,11 @@
40
76
  "@citolab/tspci": "^1.5.6",
41
77
  "@citolab/tspci-tao": "^1.0.0"
42
78
  },
79
+ "config": {
80
+ "tspci": {
81
+ "typeIdentifier": "helloWorld"
82
+ }
83
+ },
43
84
  "scripts": {
44
85
  "dev": "tspci --dev",
45
86
  "prod": "tspci"
@@ -129,6 +170,8 @@ Available Commands
129
170
  --watch -w Only watch changes
130
171
  --help -h Help about commandos
131
172
  --target -t Build production for platform
173
+ init Init PCI development environment.
174
+ add --target Add specific implementation to the PCI.
132
175
 
133
176
  Examples package.json scripts
134
177
  $ "dev": "tspci --dev",
@@ -322,14 +365,6 @@ More info, see our extension
322
365
  - [github](https://github.com/Citolab/tspci/blob/main/lib/tspci-tao)
323
366
  - [@citolab/tspci-tao](https://www.npmjs.com/package/@citolab/tspci-tao)
324
367
 
325
-
326
- ## Roadmap
327
-
328
- - Packager for Facet
329
- - Packager for Trifork
330
- - Create PCI with Vue
331
- - Create PCI with Haunted
332
-
333
368
  If you want your platform to be support, [contact us](mailto://getinspiredbycitolab@gmail.com)
334
369
 
335
370
 
package/release-notes.md CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ # 2.3.0
3
+ - added a cli to initialize a PCI workspace (```tspci init```)
2
4
  # 2.1.3
3
5
  - added workaround for bug in new @rollup/plugin-terser
4
6
  see https://github.com/rollup/plugins/issues/1366#issuecomment-1345358157
package/src/cli.js CHANGED
@@ -349,7 +349,7 @@ const run = async () => {
349
349
  if (args.indexOf("--no-install") === -1) {
350
350
  console.log(chalk.green("📦 Installing dependencies"));
351
351
  execSync("npm install", { cwd: destinationFolder, stdio: [0, 1, 2] });
352
- console.log(chalk.green("📦 Done! You can now start the dev server with npm run dev"));
352
+ console.log(chalk.green(`📦 Done! Navigate to ${destinationFolder} or open this folder (e.g. with vscode). You can now start the dev server with: npm run dev`));
353
353
  return;
354
354
  } else {
355
355
  console.log(chalk.yellow("Skipping npm install, run npm install in the project folder to install dependencies"));
Binary file