forstok-ui-lib 1.0.5 → 1.0.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.
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "forstok-ui-lib",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Forstok UI Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
9
9
  "test": "echo \"Error: no test specified\" && exit 1",
10
- "rollup": "rollup -c --bundleConfigAsCjs"
10
+ "build": "rollup -c --bundleConfigAsCjs"
11
11
  },
12
12
  "repository": {
13
13
  "type": "git",
package/rollup.config.js CHANGED
@@ -6,6 +6,7 @@ import postcss from 'rollup-plugin-postcss';
6
6
  import dts from 'rollup-plugin-dts';
7
7
  import typescript from "@rollup/plugin-typescript";
8
8
 
9
+ const createStyledComponentsTransformer = require('typescript-plugin-styled-components').default;
9
10
  const packageJson = require('./package.json');
10
11
 
11
12
  export default [
@@ -29,7 +30,19 @@ export default [
29
30
  PeerDepsExternalPlugin(),
30
31
  resolve(),
31
32
  commonjs(),
32
- typescript({ tsconfig: "./tsconfig.json" }),
33
+ typescript({
34
+ tsconfig: "./tsconfig.json",
35
+ transformers: [
36
+ (program) => ({
37
+ before: [createStyledComponentsTransformer(program, {
38
+ setComponentId: true,
39
+ setDisplayName: true,
40
+ namespace: 'fs-',
41
+ minify: true,
42
+ })],
43
+ }),
44
+ ],
45
+ }),
33
46
  terser(),
34
47
  postcss({
35
48
  extract: true,
@@ -41,14 +54,9 @@ export default [
41
54
  {
42
55
  input: 'src/index.ts',
43
56
  output: [
44
- {
45
- file: packageJson.types,
46
- format: 'esm'
47
- },
48
- ],
49
- plugins: [
50
- dts.default()
57
+ { file: packageJson.types }
51
58
  ],
59
+ plugins: [dts.default()],
52
60
  external: [/\.css/],
53
61
  }
54
62
  ];
package/tsconfig.json CHANGED
@@ -22,5 +22,9 @@
22
22
  },
23
23
  "include": [
24
24
  "src"
25
- ]
25
+ ],
26
+ "exclude": [
27
+ "node_modules",
28
+ "dist"
29
+ ]
26
30
  }