@flink-app/static-files-plugin 0.2.0-beta.9 → 0.3.7

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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +4 -4
  3. package/readme.md +23 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) Frost Experience AB https://www.frost.se
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flink-app/static-files-plugin",
3
- "version": "0.2.0-beta.9",
3
+ "version": "0.3.7",
4
4
  "description": "Flink plugin that make flink serve static files",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\"",
@@ -18,11 +18,11 @@
18
18
  "node-color-log": "^5.3.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@flink-app/flink": "^0.2.0-beta.9",
22
- "@types/express": "4.17.11",
21
+ "@flink-app/flink": "^0.3.7",
22
+ "@types/express": "4.17.13",
23
23
  "@types/node": "^15.6.2",
24
24
  "ts-node": "^9.1.1",
25
25
  "typescript": "^4.2.4"
26
26
  },
27
- "gitHead": "9ea7b28898b3f40b17fa43d5dbbcb1f7c84a4ed6"
27
+ "gitHead": "e61be35839aa8d459dc07613d9bfa919570361f2"
28
28
  }
package/readme.md CHANGED
@@ -29,3 +29,26 @@ function start() {
29
29
  }
30
30
 
31
31
  ```
32
+
33
+ ### Copy files
34
+
35
+ Flinks typescript compiler will package the app and run from inside the `dist/` folder. Only ts and json files are copied, so any static files needs to be copied manually.
36
+
37
+ There are numerous ways to do that but one way is by using the `copyfiles` package:
38
+
39
+
40
+ ```
41
+ npm i -D copyfiles
42
+ ```
43
+
44
+ Add following to package.json scripts
45
+
46
+ ```
47
+ ...
48
+ "copy-files": "copyfiles -u 1 src/public/**/* dist/src/",
49
+ "predev": "npm run copy-files",
50
+ "prebuild": "npm run copy-files"
51
+ ...
52
+ ```
53
+
54
+ This way all static files in the `src/public` folder will be copied into dist.