@wonderflow/config 3.1.1 → 5.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Wonderflow
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 all
13
+ 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 THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # Wanda Shared Configurations [<img src="https://svgshare.com/i/Ygj.svg" alt="Wonderflow Logo" width="90" height="90" align="right">](https://design.wonderflow.ai)
2
+
3
+ [![Release](https://github.com/wonderflow-bv/config/actions/workflows/release.yml/badge.svg?branch=main)](https://github.com/wonderflow-bv/config/actions/workflows/release.yml)
4
+
5
+ This repository contains the source code of the Wanda design system shared configurations.
6
+
7
+ ```sh
8
+ npm i @wonderflow/config
9
+ ```
10
+
11
+ ## Configurations
12
+
13
+ This package provides a set of predefined [Wanda's](https://design.wonderflow.ai) configurations which you can (and sometimes must) use in wonderflow projects.
14
+
15
+ ### PostCSS
16
+
17
+ Import `postcssConfig` inside your local `postcss.config.js` file. You can [check the exported configuration here](https://github.com/wonderflow-bv/config/blob/main/src/postcss/config.ts#L19-L47).
18
+
19
+ ```js
20
+ const { postcssConfig } = require("@wonderflow/config");
21
+ module.exports = postcssConfig;
22
+ ```
File without changes
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.postcssConfig = void 0;
4
+ var config_1 = require("./postcss/config");
5
+ Object.defineProperty(exports, "postcssConfig", { enumerable: true, get: function () { return config_1.postcssConfig; } });
File without changes
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.postcssConfig = void 0;
7
+ var tokens_json_1 = __importDefault(require("@wonderflow/tokens/platforms/web/tokens.json"));
8
+ var postcss_mixins_1 = __importDefault(require("postcss-mixins"));
9
+ var flat_1 = __importDefault(require("flat"));
10
+ var flatTokens = (0, flat_1.default)(tokens_json_1.default, {
11
+ delimiter: '-'
12
+ });
13
+ var environmentVariables = Object.keys(flatTokens).reduce(function (acc, key) {
14
+ var newKey = "--".concat(key);
15
+ acc[newKey] = "".concat(flatTokens[key]);
16
+ return acc;
17
+ }, {});
18
+ exports.postcssConfig = {
19
+ plugins: {
20
+ 'postcss-import': {},
21
+ 'postcss-preset-env': {
22
+ stage: 0,
23
+ importFrom: [{
24
+ environmentVariables: environmentVariables
25
+ }],
26
+ features: {
27
+ 'logical-properties-and-values': false,
28
+ 'prefers-color-scheme-query': false,
29
+ 'gap-properties': false
30
+ },
31
+ insertAfter: {
32
+ 'custom-media-queries': postcss_mixins_1.default
33
+ }
34
+ },
35
+ 'postcss-mixins': {},
36
+ cssnano: {
37
+ preset: [
38
+ 'default',
39
+ {
40
+ discardComments: {
41
+ removeAll: true
42
+ }
43
+ }
44
+ ]
45
+ }
46
+ }
47
+ };
package/package.json CHANGED
@@ -1,16 +1,19 @@
1
1
  {
2
2
  "name": "@wonderflow/config",
3
3
  "description": "Wanda design system shared configurations ",
4
- "version": "3.1.1",
4
+ "version": "5.0.0",
5
5
  "author": "Wonderflow",
6
6
  "license": "MIT",
7
- "main": "index.js",
7
+ "main": "dist/index",
8
+ "files": [
9
+ "dist"
10
+ ],
8
11
  "publishConfig": {
9
12
  "access": "public"
10
13
  },
11
14
  "repository": {
12
15
  "type": "git",
13
- "url": "git+https://github.com/wonderflow-bv/config.git"
16
+ "url": "git+https://github.com/wonderflow-bv/wanda.git"
14
17
  },
15
18
  "keywords": [
16
19
  "design-system",
@@ -19,56 +22,34 @@
19
22
  "configurations"
20
23
  ],
21
24
  "bugs": {
22
- "url": "https://github.com/wonderflow-bv/config/issues"
25
+ "url": "https://github.com/wonderflow-bv/wanda/issues"
23
26
  },
24
- "homepage": "https://github.com/wonderflow-bv/config#readme",
27
+ "homepage": "https://github.com/wonderflow-bv/wanda",
25
28
  "scripts": {
26
- "lint": "run-s lint:scripts",
27
- "lint:scripts": "eslint \"src/**/*.{tsx,ts}\"",
28
- "lint:commits": "commitlint --edit",
29
- "prepare": "is-ci || husky install",
30
- "release": "semantic-release",
31
- "prebuild": "rimraf dist",
32
- "build": "tsc",
33
- "copy:package": "copyfiles package.json dist",
34
- "minify": "minimize-js -w dist",
35
- "postbuild": "run-s copy:package minify"
29
+ "build": "run-s clean build:ts",
30
+ "clean": "rimraf dist",
31
+ "build:ts": "tsc"
36
32
  },
37
33
  "peerDependencies": {
38
34
  "postcss": ">=8.x"
39
35
  },
40
36
  "dependencies": {
41
- "@wonderflow/tokens": "1.3.7",
37
+ "@wonderflow/tokens": "*",
42
38
  "cssnano": "5.0.15",
43
39
  "cssnano-preset-default": "5.1.10",
44
40
  "flat": "5.0.2",
45
41
  "postcss-import": "14.0.2",
46
42
  "postcss-mixins": "9.0.1",
47
- "postcss-preset-env": "7.2.2"
43
+ "postcss-preset-env": "7.2.3"
48
44
  },
49
45
  "devDependencies": {
50
- "@commitlint/cli": "16.0.2",
51
- "@commitlint/config-conventional": "16.0.0",
52
- "@semantic-release/commit-analyzer": "9.0.2",
53
- "@semantic-release/exec": "6.0.3",
54
- "@semantic-release/git": "10.0.1",
55
- "@semantic-release/github": "8.0.2",
56
- "@semantic-release/npm": "8.0.3",
57
- "@semantic-release/release-notes-generator": "10.0.3",
58
46
  "@types/flat": "5.0.2",
59
47
  "@typescript-eslint/eslint-plugin": "5.9.1",
60
48
  "@typescript-eslint/parser": "5.9.1",
61
49
  "@wonderflow/eslint-config": "1.1.11",
62
- "commitizen": "4.2.4",
63
- "copyfiles": "2.4.1",
64
- "cz-conventional-changelog": "3.3.0",
65
- "eslint": "7.32.0",
66
- "husky": "7.0.4",
67
- "is-ci": "3.0.1",
68
- "minimize-js": "1.2.0",
69
50
  "npm-run-all": "4.1.5",
70
51
  "rimraf": "3.0.2",
71
- "semantic-release": "18.0.1",
72
52
  "typescript": "4.5.4"
73
- }
53
+ },
54
+ "types": "./dist/index.d.ts"
74
55
  }
package/index.js DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.postcssConfig=void 0;var config_1=require("./postcss/config");Object.defineProperty(exports,"postcssConfig",{enumerable:true,get:function(){return config_1.postcssConfig}});
package/postcss/config.js DELETED
@@ -1 +0,0 @@
1
- "use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{"default":mod}};Object.defineProperty(exports,"__esModule",{value:true});exports.postcssConfig=void 0;var tokens_json_1=__importDefault(require("@wonderflow/tokens/platforms/web/tokens.json"));var postcss_mixins_1=__importDefault(require("postcss-mixins"));var flat_1=__importDefault(require("flat"));var flatTokens=(0,flat_1.default)(tokens_json_1.default,{delimiter:"-"});var environmentVariables=Object.keys(flatTokens).reduce(function(acc,key){var newKey="--".concat(key);acc[newKey]="".concat(flatTokens[key]);return acc},{});exports.postcssConfig={plugins:{"postcss-import":{},"postcss-preset-env":{stage:0,importFrom:[{environmentVariables}],features:{"logical-properties-and-values":false,"prefers-color-scheme-query":false,"gap-properties":false},insertAfter:{"custom-media-queries":postcss_mixins_1.default}},"postcss-mixins":{},cssnano:{preset:["default",{discardComments:{removeAll:true}}]}}};