@modern-js/utils 1.0.0-rc.3 → 1.0.0-rc.7
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +29 -0
- package/dist/js/modern/constants.js +14 -0
- package/dist/js/node/constants.js +14 -0
- package/dist/js/treeshaking/constants.js +14 -0
- package/dist/js/treeshaking/getPort.js +4 -2
- package/dist/js/treeshaking/watch.js +8 -6
- package/dist/types/constants.d.ts +6 -0
- package/package.json +4 -4
- package/src/constants.ts +11 -0
package/CHANGELOG.md
CHANGED
@@ -1,6 +1,35 @@
|
|
1
1
|
# @modern-js/utils
|
2
2
|
|
3
|
+
## 1.0.0-rc.7
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 224f7fe: fix server route match
|
8
|
+
- 204c626: feat: initial
|
9
|
+
|
10
|
+
## 1.0.0-rc.6
|
11
|
+
|
12
|
+
### Patch Changes
|
13
|
+
|
14
|
+
- 224f7fe: fix server route match
|
15
|
+
- 204c626: feat: initial
|
16
|
+
|
17
|
+
## 1.0.0-rc.5
|
18
|
+
|
19
|
+
### Patch Changes
|
20
|
+
|
21
|
+
- 224f7fe: fix server route match
|
22
|
+
- 204c626: feat: initial
|
23
|
+
|
24
|
+
## 1.0.0-rc.4
|
25
|
+
|
26
|
+
### Patch Changes
|
27
|
+
|
28
|
+
- fix server route match
|
29
|
+
- 204c626: feat: initial
|
30
|
+
|
3
31
|
## 1.0.0-rc.3
|
32
|
+
|
4
33
|
### Patch Changes
|
5
34
|
|
6
35
|
- feat: initial
|
@@ -114,6 +114,9 @@ export const INTERNAL_PLUGINS = {
|
|
114
114
|
},
|
115
115
|
'@modern-js/plugin-jarvis': {
|
116
116
|
cli: '@modern-js/plugin-jarvis/cli'
|
117
|
+
},
|
118
|
+
'@modern-js/plugin-tailwind': {
|
119
|
+
cli: '@modern-js/plugin-tailwind/cli'
|
117
120
|
}
|
118
121
|
};
|
119
122
|
/**
|
@@ -174,6 +177,17 @@ export const PLUGIN_SCHEMAS = {
|
|
174
177
|
typeof: ['object', 'function']
|
175
178
|
}
|
176
179
|
}],
|
180
|
+
'@modern-js/plugin-tailwind': [{
|
181
|
+
target: 'tools.tailwind',
|
182
|
+
schema: {
|
183
|
+
typeof: ['object', 'function']
|
184
|
+
}
|
185
|
+
}, {
|
186
|
+
target: 'source.designSystem',
|
187
|
+
schema: {
|
188
|
+
typeof: ['object']
|
189
|
+
}
|
190
|
+
}],
|
177
191
|
'@modern-js/plugin-proxy': [{
|
178
192
|
target: 'dev.proxy',
|
179
193
|
schema: {
|
@@ -130,6 +130,9 @@ const INTERNAL_PLUGINS = {
|
|
130
130
|
},
|
131
131
|
'@modern-js/plugin-jarvis': {
|
132
132
|
cli: '@modern-js/plugin-jarvis/cli'
|
133
|
+
},
|
134
|
+
'@modern-js/plugin-tailwind': {
|
135
|
+
cli: '@modern-js/plugin-tailwind/cli'
|
133
136
|
}
|
134
137
|
};
|
135
138
|
/**
|
@@ -191,6 +194,17 @@ const PLUGIN_SCHEMAS = {
|
|
191
194
|
typeof: ['object', 'function']
|
192
195
|
}
|
193
196
|
}],
|
197
|
+
'@modern-js/plugin-tailwind': [{
|
198
|
+
target: 'tools.tailwind',
|
199
|
+
schema: {
|
200
|
+
typeof: ['object', 'function']
|
201
|
+
}
|
202
|
+
}, {
|
203
|
+
target: 'source.designSystem',
|
204
|
+
schema: {
|
205
|
+
typeof: ['object']
|
206
|
+
}
|
207
|
+
}],
|
194
208
|
'@modern-js/plugin-proxy': [{
|
195
209
|
target: 'dev.proxy',
|
196
210
|
schema: {
|
@@ -116,6 +116,9 @@ export var INTERNAL_PLUGINS = {
|
|
116
116
|
},
|
117
117
|
'@modern-js/plugin-jarvis': {
|
118
118
|
cli: '@modern-js/plugin-jarvis/cli'
|
119
|
+
},
|
120
|
+
'@modern-js/plugin-tailwind': {
|
121
|
+
cli: '@modern-js/plugin-tailwind/cli'
|
119
122
|
}
|
120
123
|
};
|
121
124
|
/**
|
@@ -174,6 +177,17 @@ export var PLUGIN_SCHEMAS = {
|
|
174
177
|
"typeof": ['object', 'function']
|
175
178
|
}
|
176
179
|
}],
|
180
|
+
'@modern-js/plugin-tailwind': [{
|
181
|
+
target: 'tools.tailwind',
|
182
|
+
schema: {
|
183
|
+
"typeof": ['object', 'function']
|
184
|
+
}
|
185
|
+
}, {
|
186
|
+
target: 'source.designSystem',
|
187
|
+
schema: {
|
188
|
+
"typeof": ['object']
|
189
|
+
}
|
190
|
+
}],
|
177
191
|
'@modern-js/plugin-proxy': [{
|
178
192
|
target: 'dev.proxy',
|
179
193
|
schema: {
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
2
|
+
|
1
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
2
4
|
|
3
5
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
@@ -15,13 +17,13 @@ import { logger } from "./logger";
|
|
15
17
|
/* eslint-disable no-param-reassign, @typescript-eslint/no-loop-func */
|
16
18
|
|
17
19
|
export var getPort = /*#__PURE__*/function () {
|
18
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
20
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(port) {
|
19
21
|
var tryLimits,
|
20
22
|
original,
|
21
23
|
found,
|
22
24
|
attempts,
|
23
25
|
_args = arguments;
|
24
|
-
return
|
26
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
25
27
|
while (1) {
|
26
28
|
switch (_context.prev = _context.next) {
|
27
29
|
case 0:
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
2
|
+
|
1
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
2
4
|
|
3
5
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
@@ -20,9 +22,9 @@ export var watch = function watch(watchDir, runTask) {
|
|
20
22
|
return ready = true;
|
21
23
|
});
|
22
24
|
watcher.on('change', /*#__PURE__*/function () {
|
23
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
25
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(filePath) {
|
24
26
|
var changedFilePath;
|
25
|
-
return
|
27
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
26
28
|
while (1) {
|
27
29
|
switch (_context.prev = _context.next) {
|
28
30
|
case 0:
|
@@ -46,9 +48,9 @@ export var watch = function watch(watchDir, runTask) {
|
|
46
48
|
};
|
47
49
|
}());
|
48
50
|
watcher.on('add', /*#__PURE__*/function () {
|
49
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
51
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(filePath) {
|
50
52
|
var changedFilePath;
|
51
|
-
return
|
53
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
52
54
|
while (1) {
|
53
55
|
switch (_context2.prev = _context2.next) {
|
54
56
|
case 0:
|
@@ -78,9 +80,9 @@ export var watch = function watch(watchDir, runTask) {
|
|
78
80
|
};
|
79
81
|
}());
|
80
82
|
watcher.on('unlink', /*#__PURE__*/function () {
|
81
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/
|
83
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(filePath) {
|
82
84
|
var changedFilePath;
|
83
|
-
return
|
85
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
84
86
|
while (1) {
|
85
87
|
switch (_context3.prev = _context3.next) {
|
86
88
|
case 0:
|
@@ -111,6 +111,12 @@ export declare const PLUGIN_SCHEMAS: {
|
|
111
111
|
typeof: string[];
|
112
112
|
};
|
113
113
|
}[];
|
114
|
+
'@modern-js/plugin-tailwind': {
|
115
|
+
target: string;
|
116
|
+
schema: {
|
117
|
+
typeof: string[];
|
118
|
+
};
|
119
|
+
}[];
|
114
120
|
'@modern-js/plugin-proxy': {
|
115
121
|
target: string;
|
116
122
|
schema: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@modern-js/utils",
|
3
|
-
"version": "1.0.0-rc.
|
3
|
+
"version": "1.0.0-rc.7",
|
4
4
|
"jsnext:source": "./src/index.ts",
|
5
5
|
"types": "./dist/types/index.d.ts",
|
6
6
|
"main": "./dist/js/node/index.js",
|
@@ -53,14 +53,14 @@
|
|
53
53
|
"@types/recursive-readdir": "^2.2.0",
|
54
54
|
"typescript": "^4",
|
55
55
|
"webpack": "^5.54.0",
|
56
|
-
"@modern-js/plugin-testing": "^1.0.0-rc.
|
57
|
-
"@modern-js/module-tools": "^1.0.0-rc.
|
56
|
+
"@modern-js/plugin-testing": "^1.0.0-rc.7",
|
57
|
+
"@modern-js/module-tools": "^1.0.0-rc.7"
|
58
58
|
},
|
59
59
|
"peerDependencies": {
|
60
60
|
"typescript": "^4.4.3"
|
61
61
|
},
|
62
62
|
"sideEffects": false,
|
63
|
-
"
|
63
|
+
"publishConfig": {
|
64
64
|
"registry": "https://registry.npmjs.org/",
|
65
65
|
"access": "public"
|
66
66
|
},
|
package/src/constants.ts
CHANGED
@@ -87,6 +87,7 @@ export const INTERNAL_PLUGINS: {
|
|
87
87
|
cli: '@modern-js/plugin-micro-frontend/cli',
|
88
88
|
},
|
89
89
|
'@modern-js/plugin-jarvis': { cli: '@modern-js/plugin-jarvis/cli' },
|
90
|
+
'@modern-js/plugin-tailwind': { cli: '@modern-js/plugin-tailwind/cli' },
|
90
91
|
};
|
91
92
|
|
92
93
|
/**
|
@@ -141,6 +142,16 @@ export const PLUGIN_SCHEMAS = {
|
|
141
142
|
schema: { typeof: ['object', 'function'] },
|
142
143
|
},
|
143
144
|
],
|
145
|
+
'@modern-js/plugin-tailwind': [
|
146
|
+
{
|
147
|
+
target: 'tools.tailwind',
|
148
|
+
schema: { typeof: ['object', 'function'] },
|
149
|
+
},
|
150
|
+
{
|
151
|
+
target: 'source.designSystem',
|
152
|
+
schema: { typeof: ['object'] },
|
153
|
+
},
|
154
|
+
],
|
144
155
|
'@modern-js/plugin-proxy': [
|
145
156
|
{
|
146
157
|
target: 'dev.proxy',
|