tailwindcss 0.0.0-oxide-insiders.377bac2 → 0.0.0-oxide-insiders.5b078d9
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/lib/cli/build/plugin.js +20 -20
- package/lib/lib/sharedState.js +18 -1
- package/lib/oxide/cli/build/plugin.js +20 -20
- package/package.json +17 -20
- package/peers/index.js +71 -141
- package/scripts/swap-engines.js +40 -0
- package/src/cli/build/plugin.js +1 -1
- package/src/lib/sharedState.js +17 -1
- package/src/oxide/cli/build/plugin.ts +1 -1
- package/CHANGELOG.md +0 -2364
- package/lib/cli/shared.js +0 -13
- package/lib/oxide/cli/shared.js +0 -12
- package/oxide-node-api-shim/index.js +0 -21
- package/oxide-node-api-shim/package.json +0 -5
- package/scripts/install-integrations.js +0 -27
- package/scripts/rebuildFixtures.js +0 -68
- package/src/cli/shared.js +0 -6
- package/src/oxide/cli/shared.ts +0 -4
package/lib/cli/build/plugin.js
CHANGED
|
@@ -18,7 +18,7 @@ const _options = /*#__PURE__*/ _interopRequireDefault(require("postcss-load-conf
|
|
|
18
18
|
const _processTailwindFeatures = /*#__PURE__*/ _interopRequireDefault(require("../../processTailwindFeatures"));
|
|
19
19
|
const _deps = require("./deps");
|
|
20
20
|
const _utils = require("./utils");
|
|
21
|
-
const
|
|
21
|
+
const _sharedState = require("../../lib/sharedState");
|
|
22
22
|
const _resolveConfigJs = /*#__PURE__*/ _interopRequireDefault(require("../../../resolveConfig.js"));
|
|
23
23
|
const _getModuleDependenciesJs = /*#__PURE__*/ _interopRequireDefault(require("../../lib/getModuleDependencies.js"));
|
|
24
24
|
const _contentJs = require("../../lib/content.js");
|
|
@@ -143,7 +143,7 @@ let state = {
|
|
|
143
143
|
return config;
|
|
144
144
|
},
|
|
145
145
|
refreshConfigDependencies (configPath) {
|
|
146
|
-
|
|
146
|
+
_sharedState.env.DEBUG && console.time("Module dependencies");
|
|
147
147
|
for (let file of this.configDependencies){
|
|
148
148
|
delete require.cache[require.resolve(file)];
|
|
149
149
|
}
|
|
@@ -153,7 +153,7 @@ let state = {
|
|
|
153
153
|
this.configDependencies.add(dependency);
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
_sharedState.env.DEBUG && console.timeEnd("Module dependencies");
|
|
157
157
|
},
|
|
158
158
|
readContentPaths () {
|
|
159
159
|
let content = [];
|
|
@@ -161,7 +161,7 @@ let state = {
|
|
|
161
161
|
// TODO: When we make the postcss plugin async-capable this can become async
|
|
162
162
|
let files = _fastGlob.default.sync(this.contentPatterns.all);
|
|
163
163
|
for (let file of files){
|
|
164
|
-
if (
|
|
164
|
+
if (_sharedState.env.OXIDE) {
|
|
165
165
|
content.push({
|
|
166
166
|
file,
|
|
167
167
|
extension: _path.default.extname(file).slice(1)
|
|
@@ -190,26 +190,26 @@ let state = {
|
|
|
190
190
|
this.context.changedContent = this.changedContent.splice(0);
|
|
191
191
|
return this.context;
|
|
192
192
|
}
|
|
193
|
-
|
|
193
|
+
_sharedState.env.DEBUG && console.time("Searching for config");
|
|
194
194
|
var _findAtConfigPath;
|
|
195
195
|
let configPath = (_findAtConfigPath = (0, _findAtConfigPathJs.findAtConfigPath)(root, result)) !== null && _findAtConfigPath !== void 0 ? _findAtConfigPath : cliConfigPath;
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
_sharedState.env.DEBUG && console.timeEnd("Searching for config");
|
|
197
|
+
_sharedState.env.DEBUG && console.time("Loading config");
|
|
198
198
|
let config = this.loadConfig(configPath, content);
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
_sharedState.env.DEBUG && console.timeEnd("Loading config");
|
|
200
|
+
_sharedState.env.DEBUG && console.time("Creating context");
|
|
201
201
|
this.context = createContext(config, []);
|
|
202
202
|
Object.assign(this.context, {
|
|
203
203
|
userConfigPath: configPath
|
|
204
204
|
});
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
_sharedState.env.DEBUG && console.timeEnd("Creating context");
|
|
206
|
+
_sharedState.env.DEBUG && console.time("Resolving content paths");
|
|
207
207
|
this.refreshContentPaths();
|
|
208
|
-
|
|
208
|
+
_sharedState.env.DEBUG && console.timeEnd("Resolving content paths");
|
|
209
209
|
if (this.watcher) {
|
|
210
|
-
|
|
210
|
+
_sharedState.env.DEBUG && console.time("Watch new files");
|
|
211
211
|
this.watcher.refreshWatchedFiles();
|
|
212
|
-
|
|
212
|
+
_sharedState.env.DEBUG && console.timeEnd("Watch new files");
|
|
213
213
|
}
|
|
214
214
|
for (let file of this.readContentPaths()){
|
|
215
215
|
this.context.changedContent.push(file);
|
|
@@ -240,7 +240,7 @@ async function createProcessor(args, cliConfigPath) {
|
|
|
240
240
|
return {
|
|
241
241
|
postcssPlugin: "tailwindcss",
|
|
242
242
|
Once (root, { result }) {
|
|
243
|
-
|
|
243
|
+
_sharedState.env.DEBUG && console.time("Compiling CSS");
|
|
244
244
|
(0, _processTailwindFeatures.default)(({ createContext })=>{
|
|
245
245
|
console.error();
|
|
246
246
|
console.error("Rebuilding...");
|
|
@@ -254,7 +254,7 @@ async function createProcessor(args, cliConfigPath) {
|
|
|
254
254
|
});
|
|
255
255
|
};
|
|
256
256
|
})(root, result);
|
|
257
|
-
|
|
257
|
+
_sharedState.env.DEBUG && console.timeEnd("Compiling CSS");
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
260
|
};
|
|
@@ -291,17 +291,17 @@ async function createProcessor(args, cliConfigPath) {
|
|
|
291
291
|
if (!state.watcher) {
|
|
292
292
|
return result;
|
|
293
293
|
}
|
|
294
|
-
|
|
294
|
+
_sharedState.env.DEBUG && console.time("Recording PostCSS dependencies");
|
|
295
295
|
for (let message of result.messages){
|
|
296
296
|
if (message.type === "dependency") {
|
|
297
297
|
state.contextDependencies.add(message.file);
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
|
|
300
|
+
_sharedState.env.DEBUG && console.timeEnd("Recording PostCSS dependencies");
|
|
301
301
|
// TODO: This needs to be in a different spot
|
|
302
|
-
|
|
302
|
+
_sharedState.env.DEBUG && console.time("Watch new files");
|
|
303
303
|
state.watcher.refreshWatchedFiles();
|
|
304
|
-
|
|
304
|
+
_sharedState.env.DEBUG && console.timeEnd("Watch new files");
|
|
305
305
|
return result;
|
|
306
306
|
}).then((result)=>{
|
|
307
307
|
if (!output) {
|
package/lib/lib/sharedState.js
CHANGED
|
@@ -18,10 +18,18 @@ _export(exports, {
|
|
|
18
18
|
NONE: ()=>NONE,
|
|
19
19
|
resolveDebug: ()=>resolveDebug
|
|
20
20
|
});
|
|
21
|
+
const _packageJson = /*#__PURE__*/ _interopRequireDefault(require("../../package.json"));
|
|
22
|
+
function _interopRequireDefault(obj) {
|
|
23
|
+
return obj && obj.__esModule ? obj : {
|
|
24
|
+
default: obj
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
let OXIDE_DEFAULT_ENABLED = _packageJson.default.tailwindcss.engine === "oxide";
|
|
21
28
|
const env = {
|
|
22
29
|
NODE_ENV: process.env.NODE_ENV,
|
|
23
30
|
DEBUG: resolveDebug(process.env.DEBUG),
|
|
24
|
-
|
|
31
|
+
ENGINE: _packageJson.default.tailwindcss.engine,
|
|
32
|
+
OXIDE: resolveBoolean(process.env.OXIDE, OXIDE_DEFAULT_ENABLED)
|
|
25
33
|
};
|
|
26
34
|
const contextMap = new Map();
|
|
27
35
|
const configContextMap = new Map();
|
|
@@ -29,6 +37,15 @@ const contextSourcesMap = new Map();
|
|
|
29
37
|
const sourceHashMap = new Map();
|
|
30
38
|
const NOT_ON_DEMAND = new String("*");
|
|
31
39
|
const NONE = Symbol("__NONE__");
|
|
40
|
+
function resolveBoolean(value, defaultValue) {
|
|
41
|
+
if (value === undefined) {
|
|
42
|
+
return defaultValue;
|
|
43
|
+
}
|
|
44
|
+
if (value === "0" || value === "false") {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
32
49
|
function resolveDebug(debug) {
|
|
33
50
|
if (debug === undefined) {
|
|
34
51
|
return false;
|
|
@@ -17,7 +17,7 @@ const _options = /*#__PURE__*/ _interopRequireDefault(require("postcss-load-conf
|
|
|
17
17
|
const _processTailwindFeatures = /*#__PURE__*/ _interopRequireDefault(require("../../../processTailwindFeatures"));
|
|
18
18
|
const _deps = require("./deps");
|
|
19
19
|
const _utils = require("./utils");
|
|
20
|
-
const
|
|
20
|
+
const _sharedState = require("../../../lib/sharedState");
|
|
21
21
|
const _resolveConfig = /*#__PURE__*/ _interopRequireDefault(require("../../../../resolveConfig"));
|
|
22
22
|
const _getModuleDependencies = /*#__PURE__*/ _interopRequireDefault(require("../../../lib/getModuleDependencies"));
|
|
23
23
|
const _content = require("../../../lib/content");
|
|
@@ -142,7 +142,7 @@ let state = {
|
|
|
142
142
|
return config;
|
|
143
143
|
},
|
|
144
144
|
refreshConfigDependencies (configPath) {
|
|
145
|
-
|
|
145
|
+
_sharedState.env.DEBUG && console.time("Module dependencies");
|
|
146
146
|
for (let file of this.configDependencies){
|
|
147
147
|
delete require.cache[require.resolve(file)];
|
|
148
148
|
}
|
|
@@ -152,7 +152,7 @@ let state = {
|
|
|
152
152
|
this.configDependencies.add(dependency);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
|
|
155
|
+
_sharedState.env.DEBUG && console.timeEnd("Module dependencies");
|
|
156
156
|
},
|
|
157
157
|
readContentPaths () {
|
|
158
158
|
let content = [];
|
|
@@ -160,7 +160,7 @@ let state = {
|
|
|
160
160
|
// TODO: When we make the postcss plugin async-capable this can become async
|
|
161
161
|
let files = _fastGlob.default.sync(this.contentPatterns.all);
|
|
162
162
|
for (let file of files){
|
|
163
|
-
if (
|
|
163
|
+
if (_sharedState.env.OXIDE) {
|
|
164
164
|
content.push({
|
|
165
165
|
file,
|
|
166
166
|
extension: _path.default.extname(file).slice(1)
|
|
@@ -189,26 +189,26 @@ let state = {
|
|
|
189
189
|
this.context.changedContent = this.changedContent.splice(0);
|
|
190
190
|
return this.context;
|
|
191
191
|
}
|
|
192
|
-
|
|
192
|
+
_sharedState.env.DEBUG && console.time("Searching for config");
|
|
193
193
|
var _findAtConfigPath1;
|
|
194
194
|
let configPath = (_findAtConfigPath1 = (0, _findAtConfigPath.findAtConfigPath)(root, result)) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : cliConfigPath;
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
_sharedState.env.DEBUG && console.timeEnd("Searching for config");
|
|
196
|
+
_sharedState.env.DEBUG && console.time("Loading config");
|
|
197
197
|
let config = this.loadConfig(configPath, content);
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
_sharedState.env.DEBUG && console.timeEnd("Loading config");
|
|
199
|
+
_sharedState.env.DEBUG && console.time("Creating context");
|
|
200
200
|
this.context = createContext(config, []);
|
|
201
201
|
Object.assign(this.context, {
|
|
202
202
|
userConfigPath: configPath
|
|
203
203
|
});
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
_sharedState.env.DEBUG && console.timeEnd("Creating context");
|
|
205
|
+
_sharedState.env.DEBUG && console.time("Resolving content paths");
|
|
206
206
|
this.refreshContentPaths();
|
|
207
|
-
|
|
207
|
+
_sharedState.env.DEBUG && console.timeEnd("Resolving content paths");
|
|
208
208
|
if (this.watcher) {
|
|
209
|
-
|
|
209
|
+
_sharedState.env.DEBUG && console.time("Watch new files");
|
|
210
210
|
this.watcher.refreshWatchedFiles();
|
|
211
|
-
|
|
211
|
+
_sharedState.env.DEBUG && console.timeEnd("Watch new files");
|
|
212
212
|
}
|
|
213
213
|
for (let file of this.readContentPaths()){
|
|
214
214
|
this.context.changedContent.push(file);
|
|
@@ -239,7 +239,7 @@ async function createProcessor(args, cliConfigPath) {
|
|
|
239
239
|
return {
|
|
240
240
|
postcssPlugin: "tailwindcss",
|
|
241
241
|
Once (root, { result }) {
|
|
242
|
-
|
|
242
|
+
_sharedState.env.DEBUG && console.time("Compiling CSS");
|
|
243
243
|
(0, _processTailwindFeatures.default)(({ createContext })=>{
|
|
244
244
|
console.error();
|
|
245
245
|
console.error("Rebuilding...");
|
|
@@ -253,7 +253,7 @@ async function createProcessor(args, cliConfigPath) {
|
|
|
253
253
|
});
|
|
254
254
|
};
|
|
255
255
|
})(root, result);
|
|
256
|
-
|
|
256
|
+
_sharedState.env.DEBUG && console.timeEnd("Compiling CSS");
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
259
|
};
|
|
@@ -288,17 +288,17 @@ async function createProcessor(args, cliConfigPath) {
|
|
|
288
288
|
if (!state.watcher) {
|
|
289
289
|
return result;
|
|
290
290
|
}
|
|
291
|
-
|
|
291
|
+
_sharedState.env.DEBUG && console.time("Recording PostCSS dependencies");
|
|
292
292
|
for (let message of result.messages){
|
|
293
293
|
if (message.type === "dependency") {
|
|
294
294
|
state.contextDependencies.add(message.file);
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
|
-
|
|
297
|
+
_sharedState.env.DEBUG && console.timeEnd("Recording PostCSS dependencies");
|
|
298
298
|
// TODO: This needs to be in a different spot
|
|
299
|
-
|
|
299
|
+
_sharedState.env.DEBUG && console.time("Watch new files");
|
|
300
300
|
state.watcher.refreshWatchedFiles();
|
|
301
|
-
|
|
301
|
+
_sharedState.env.DEBUG && console.timeEnd("Watch new files");
|
|
302
302
|
return result;
|
|
303
303
|
}).then((result)=>{
|
|
304
304
|
if (!output) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss",
|
|
3
|
-
"version": "0.0.0-oxide-insiders.
|
|
3
|
+
"version": "0.0.0-oxide-insiders.5b078d9",
|
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -16,25 +16,22 @@
|
|
|
16
16
|
"integrations/*",
|
|
17
17
|
"oxide/crates/node"
|
|
18
18
|
],
|
|
19
|
+
"tailwindcss": {
|
|
20
|
+
"engine": "oxide"
|
|
21
|
+
},
|
|
19
22
|
"scripts": {
|
|
20
|
-
"
|
|
21
|
-
"build": "
|
|
22
|
-
"
|
|
23
|
-
"rebuild-fixtures": "npm run build && node -r @swc/register scripts/rebuildFixtures.js",
|
|
23
|
+
"dev": "concurrently -n tailwind,oxide-node -c green,yellow 'npm run dev:js' 'npm run dev:rust'",
|
|
24
|
+
"build": "npm run build:rust && npm run build:js && npm run build:peers",
|
|
25
|
+
"test": "jest",
|
|
24
26
|
"style": "eslint .",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
27
|
+
"prepublishOnly": "npm install --force && npm run build && npm run generate:types",
|
|
28
|
+
"dev:rust": "npm run --prefix ./oxide dev:node",
|
|
29
|
+
"dev:js": "npm run build:js -- --watch",
|
|
30
|
+
"build:rust": "npm run --prefix ./oxide build:node",
|
|
31
|
+
"build:js": "npm run generate:plugin-list && swc src --out-dir lib --copy-files --delete-dir-on-start",
|
|
32
|
+
"build:peers": "esbuild lib/cli-peer-dependencies.js --bundle --platform=node --outfile=peers/index.js --define:process.env.CSS_TRANSFORMER_WASM=false",
|
|
29
33
|
"generate:plugin-list": "node -r @swc/register scripts/create-plugin-list.js",
|
|
30
|
-
"generate:types": "node -r @swc/register scripts/generate-types.js"
|
|
31
|
-
"generate": "npm run generate:plugin-list && npm run generate:types",
|
|
32
|
-
"release-channel": "node ./scripts/release-channel.js",
|
|
33
|
-
"release-notes": "node ./scripts/release-notes.js",
|
|
34
|
-
"oxide:install": "npm run install:all --prefix ./oxide",
|
|
35
|
-
"oxide:dev": "concurrently -n tailwind,oxide-node -c green,yellow 'npm run build -- --watch' 'npm run --prefix ./oxide dev:node'",
|
|
36
|
-
"oxide:build": "npm run --prefix ./oxide build:node && npm run build",
|
|
37
|
-
"prepublishOnly": "npm install --force && npm run build"
|
|
34
|
+
"generate:types": "node -r @swc/register scripts/generate-types.js"
|
|
38
35
|
},
|
|
39
36
|
"files": [
|
|
40
37
|
"src/*",
|
|
@@ -45,7 +42,6 @@
|
|
|
45
42
|
"stubs/*.stub.js",
|
|
46
43
|
"nesting/*",
|
|
47
44
|
"types/**/*",
|
|
48
|
-
"oxide-node-api-shim",
|
|
49
45
|
"*.d.ts",
|
|
50
46
|
"*.css",
|
|
51
47
|
"*.js"
|
|
@@ -73,7 +69,7 @@
|
|
|
73
69
|
"postcss": "^8.0.9"
|
|
74
70
|
},
|
|
75
71
|
"dependencies": {
|
|
76
|
-
"@tailwindcss/oxide": "0.0.0-oxide-insiders.
|
|
72
|
+
"@tailwindcss/oxide": "0.0.0-oxide-insiders.5b078d9",
|
|
77
73
|
"arg": "^5.0.2",
|
|
78
74
|
"browserslist": "^4.21.4",
|
|
79
75
|
"chokidar": "^3.5.3",
|
|
@@ -108,6 +104,7 @@
|
|
|
108
104
|
],
|
|
109
105
|
"jest": {
|
|
110
106
|
"testTimeout": 30000,
|
|
107
|
+
"globalSetup": "<rootDir>/jest/global-setup.js",
|
|
111
108
|
"setupFilesAfterEnv": [
|
|
112
109
|
"<rootDir>/jest/customMatchers.js"
|
|
113
110
|
],
|
|
@@ -123,6 +120,6 @@
|
|
|
123
120
|
}
|
|
124
121
|
},
|
|
125
122
|
"engines": {
|
|
126
|
-
"node": ">=
|
|
123
|
+
"node": ">=16.0.0"
|
|
127
124
|
}
|
|
128
125
|
}
|
package/peers/index.js
CHANGED
|
@@ -56609,46 +56609,44 @@ var require_walker = __commonJS({
|
|
|
56609
56609
|
var require_package = __commonJS({
|
|
56610
56610
|
"node_modules/css-tree/package.json"(exports2, module2) {
|
|
56611
56611
|
module2.exports = {
|
|
56612
|
-
|
|
56613
|
-
|
|
56614
|
-
|
|
56615
|
-
|
|
56616
|
-
|
|
56617
|
-
|
|
56618
|
-
|
|
56619
|
-
|
|
56620
|
-
|
|
56621
|
-
|
|
56622
|
-
|
|
56623
|
-
|
|
56624
|
-
|
|
56625
|
-
|
|
56626
|
-
|
|
56627
|
-
|
|
56628
|
-
|
|
56629
|
-
_requiredBy: [
|
|
56630
|
-
"/csso",
|
|
56631
|
-
"/svgo"
|
|
56612
|
+
name: "css-tree",
|
|
56613
|
+
version: "1.1.3",
|
|
56614
|
+
description: "A tool set for CSS: fast detailed parser (CSS \u2192 AST), walker (AST traversal), generator (AST \u2192 CSS) and lexer (validation and matching) based on specs and browser implementations",
|
|
56615
|
+
author: "Roman Dvornov <rdvornov@gmail.com> (https://github.com/lahmatiy)",
|
|
56616
|
+
license: "MIT",
|
|
56617
|
+
repository: "csstree/csstree",
|
|
56618
|
+
keywords: [
|
|
56619
|
+
"css",
|
|
56620
|
+
"ast",
|
|
56621
|
+
"tokenizer",
|
|
56622
|
+
"parser",
|
|
56623
|
+
"walker",
|
|
56624
|
+
"lexer",
|
|
56625
|
+
"generator",
|
|
56626
|
+
"utils",
|
|
56627
|
+
"syntax",
|
|
56628
|
+
"validation"
|
|
56632
56629
|
],
|
|
56633
|
-
|
|
56634
|
-
|
|
56635
|
-
|
|
56636
|
-
|
|
56637
|
-
|
|
56638
|
-
|
|
56639
|
-
|
|
56640
|
-
|
|
56641
|
-
|
|
56642
|
-
|
|
56643
|
-
|
|
56630
|
+
main: "lib/index.js",
|
|
56631
|
+
unpkg: "dist/csstree.min.js",
|
|
56632
|
+
jsdelivr: "dist/csstree.min.js",
|
|
56633
|
+
scripts: {
|
|
56634
|
+
build: "rollup --config",
|
|
56635
|
+
lint: "eslint data lib scripts test && node scripts/review-syntax-patch --lint && node scripts/update-docs --lint",
|
|
56636
|
+
"lint-and-test": "npm run lint && npm test",
|
|
56637
|
+
"update:docs": "node scripts/update-docs",
|
|
56638
|
+
"review:syntax-patch": "node scripts/review-syntax-patch",
|
|
56639
|
+
test: "mocha --reporter progress",
|
|
56640
|
+
coverage: "nyc npm test",
|
|
56641
|
+
travis: "nyc npm run lint-and-test && npm run coveralls",
|
|
56642
|
+
coveralls: "nyc report --reporter=text-lcov | coveralls",
|
|
56643
|
+
prepublishOnly: "npm run build",
|
|
56644
|
+
hydrogen: "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/parse --stat -o /dev/null"
|
|
56644
56645
|
},
|
|
56645
|
-
bundleDependencies: false,
|
|
56646
56646
|
dependencies: {
|
|
56647
56647
|
"mdn-data": "2.0.14",
|
|
56648
56648
|
"source-map": "^0.6.1"
|
|
56649
56649
|
},
|
|
56650
|
-
deprecated: false,
|
|
56651
|
-
description: "A tool set for CSS: fast detailed parser (CSS \u2192 AST), walker (AST traversal), generator (AST \u2192 CSS) and lexer (validation and matching) based on specs and browser implementations",
|
|
56652
56650
|
devDependencies: {
|
|
56653
56651
|
"@rollup/plugin-commonjs": "^11.0.2",
|
|
56654
56652
|
"@rollup/plugin-json": "^4.0.2",
|
|
@@ -56668,43 +56666,7 @@ var require_package = __commonJS({
|
|
|
56668
56666
|
"data",
|
|
56669
56667
|
"dist",
|
|
56670
56668
|
"lib"
|
|
56671
|
-
]
|
|
56672
|
-
homepage: "https://github.com/csstree/csstree#readme",
|
|
56673
|
-
jsdelivr: "dist/csstree.min.js",
|
|
56674
|
-
keywords: [
|
|
56675
|
-
"css",
|
|
56676
|
-
"ast",
|
|
56677
|
-
"tokenizer",
|
|
56678
|
-
"parser",
|
|
56679
|
-
"walker",
|
|
56680
|
-
"lexer",
|
|
56681
|
-
"generator",
|
|
56682
|
-
"utils",
|
|
56683
|
-
"syntax",
|
|
56684
|
-
"validation"
|
|
56685
|
-
],
|
|
56686
|
-
license: "MIT",
|
|
56687
|
-
main: "lib/index.js",
|
|
56688
|
-
name: "css-tree",
|
|
56689
|
-
repository: {
|
|
56690
|
-
type: "git",
|
|
56691
|
-
url: "git+https://github.com/csstree/csstree.git"
|
|
56692
|
-
},
|
|
56693
|
-
scripts: {
|
|
56694
|
-
build: "rollup --config",
|
|
56695
|
-
coverage: "nyc npm test",
|
|
56696
|
-
coveralls: "nyc report --reporter=text-lcov | coveralls",
|
|
56697
|
-
hydrogen: "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/parse --stat -o /dev/null",
|
|
56698
|
-
lint: "eslint data lib scripts test && node scripts/review-syntax-patch --lint && node scripts/update-docs --lint",
|
|
56699
|
-
"lint-and-test": "npm run lint && npm test",
|
|
56700
|
-
prepublishOnly: "npm run build",
|
|
56701
|
-
"review:syntax-patch": "node scripts/review-syntax-patch",
|
|
56702
|
-
test: "mocha --reporter progress",
|
|
56703
|
-
travis: "nyc npm run lint-and-test && npm run coveralls",
|
|
56704
|
-
"update:docs": "node scripts/update-docs"
|
|
56705
|
-
},
|
|
56706
|
-
unpkg: "dist/csstree.min.js",
|
|
56707
|
-
version: "1.1.3"
|
|
56669
|
+
]
|
|
56708
56670
|
};
|
|
56709
56671
|
}
|
|
56710
56672
|
});
|
|
@@ -60326,47 +60288,50 @@ var require_compress = __commonJS({
|
|
|
60326
60288
|
var require_package2 = __commonJS({
|
|
60327
60289
|
"node_modules/csso/package.json"(exports2, module2) {
|
|
60328
60290
|
module2.exports = {
|
|
60329
|
-
|
|
60330
|
-
|
|
60331
|
-
|
|
60332
|
-
|
|
60333
|
-
|
|
60334
|
-
|
|
60335
|
-
|
|
60336
|
-
|
|
60337
|
-
|
|
60338
|
-
|
|
60339
|
-
|
|
60340
|
-
name: "csso",
|
|
60341
|
-
escapedName: "csso",
|
|
60342
|
-
rawSpec: "4.2.0",
|
|
60343
|
-
saveSpec: null,
|
|
60344
|
-
fetchSpec: "4.2.0"
|
|
60345
|
-
},
|
|
60346
|
-
_requiredBy: [
|
|
60347
|
-
"/svgo"
|
|
60291
|
+
name: "csso",
|
|
60292
|
+
version: "4.2.0",
|
|
60293
|
+
description: "CSS minifier with structural optimisations",
|
|
60294
|
+
homepage: "https://github.com/css/csso",
|
|
60295
|
+
author: "Sergey Kryzhanovsky <skryzhanovsky@ya.ru> (https://github.com/afelix)",
|
|
60296
|
+
maintainers: [
|
|
60297
|
+
{
|
|
60298
|
+
name: "Roman Dvornov",
|
|
60299
|
+
email: "rdvornov@gmail.com",
|
|
60300
|
+
"github-username": "lahmatiy"
|
|
60301
|
+
}
|
|
60348
60302
|
],
|
|
60349
|
-
|
|
60350
|
-
|
|
60351
|
-
_spec: "csso@4.2.0",
|
|
60352
|
-
_where: "/home/runner/work/tailwindcss/tailwindcss",
|
|
60353
|
-
author: {
|
|
60354
|
-
name: "Sergey Kryzhanovsky",
|
|
60355
|
-
email: "skryzhanovsky@ya.ru",
|
|
60356
|
-
url: "https://github.com/afelix"
|
|
60357
|
-
},
|
|
60358
|
-
browser: {
|
|
60359
|
-
"css-tree": "css-tree/dist/csstree.min.js"
|
|
60360
|
-
},
|
|
60303
|
+
license: "MIT",
|
|
60304
|
+
repository: "css/csso",
|
|
60361
60305
|
bugs: {
|
|
60362
60306
|
url: "https://github.com/css/csso/issues"
|
|
60363
60307
|
},
|
|
60364
|
-
|
|
60308
|
+
keywords: [
|
|
60309
|
+
"css",
|
|
60310
|
+
"compress",
|
|
60311
|
+
"minifier",
|
|
60312
|
+
"minify",
|
|
60313
|
+
"optimise",
|
|
60314
|
+
"optimisation",
|
|
60315
|
+
"csstree"
|
|
60316
|
+
],
|
|
60317
|
+
main: "./lib/index",
|
|
60318
|
+
scripts: {
|
|
60319
|
+
test: "mocha --reporter dot",
|
|
60320
|
+
lint: "eslint lib test",
|
|
60321
|
+
"lint-and-test": "npm run lint && npm test",
|
|
60322
|
+
build: "rollup --config && terser dist/csso.js --compress --mangle -o dist/csso.min.js",
|
|
60323
|
+
coverage: "nyc npm test",
|
|
60324
|
+
coveralls: "nyc report --reporter=text-lcov | coveralls",
|
|
60325
|
+
travis: "nyc npm run lint-and-test && npm run coveralls",
|
|
60326
|
+
hydrogen: "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/csso --stat -o /dev/null",
|
|
60327
|
+
prepublishOnly: "npm run build"
|
|
60328
|
+
},
|
|
60365
60329
|
dependencies: {
|
|
60366
60330
|
"css-tree": "^1.1.2"
|
|
60367
60331
|
},
|
|
60368
|
-
|
|
60369
|
-
|
|
60332
|
+
browser: {
|
|
60333
|
+
"css-tree": "css-tree/dist/csstree.min.js"
|
|
60334
|
+
},
|
|
60370
60335
|
devDependencies: {
|
|
60371
60336
|
"@rollup/plugin-commonjs": "^11.0.1",
|
|
60372
60337
|
"@rollup/plugin-json": "^4.0.1",
|
|
@@ -60385,42 +60350,7 @@ var require_package2 = __commonJS({
|
|
|
60385
60350
|
files: [
|
|
60386
60351
|
"dist",
|
|
60387
60352
|
"lib"
|
|
60388
|
-
]
|
|
60389
|
-
homepage: "https://github.com/css/csso",
|
|
60390
|
-
keywords: [
|
|
60391
|
-
"css",
|
|
60392
|
-
"compress",
|
|
60393
|
-
"minifier",
|
|
60394
|
-
"minify",
|
|
60395
|
-
"optimise",
|
|
60396
|
-
"optimisation",
|
|
60397
|
-
"csstree"
|
|
60398
|
-
],
|
|
60399
|
-
license: "MIT",
|
|
60400
|
-
main: "./lib/index",
|
|
60401
|
-
maintainers: [
|
|
60402
|
-
{
|
|
60403
|
-
name: "Roman Dvornov",
|
|
60404
|
-
email: "rdvornov@gmail.com"
|
|
60405
|
-
}
|
|
60406
|
-
],
|
|
60407
|
-
name: "csso",
|
|
60408
|
-
repository: {
|
|
60409
|
-
type: "git",
|
|
60410
|
-
url: "git+https://github.com/css/csso.git"
|
|
60411
|
-
},
|
|
60412
|
-
scripts: {
|
|
60413
|
-
build: "rollup --config && terser dist/csso.js --compress --mangle -o dist/csso.min.js",
|
|
60414
|
-
coverage: "nyc npm test",
|
|
60415
|
-
coveralls: "nyc report --reporter=text-lcov | coveralls",
|
|
60416
|
-
hydrogen: "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/csso --stat -o /dev/null",
|
|
60417
|
-
lint: "eslint lib test",
|
|
60418
|
-
"lint-and-test": "npm run lint && npm test",
|
|
60419
|
-
prepublishOnly: "npm run build",
|
|
60420
|
-
test: "mocha --reporter dot",
|
|
60421
|
-
travis: "nyc npm run lint-and-test && npm run coveralls"
|
|
60422
|
-
},
|
|
60423
|
-
version: "4.2.0"
|
|
60353
|
+
]
|
|
60424
60354
|
};
|
|
60425
60355
|
}
|
|
60426
60356
|
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
let fs = require('fs')
|
|
2
|
+
let path = require('path')
|
|
3
|
+
|
|
4
|
+
let engines = {
|
|
5
|
+
stable: {
|
|
6
|
+
files: [
|
|
7
|
+
path.resolve(__dirname, '..', 'package.stable.json'),
|
|
8
|
+
path.resolve(__dirname, '..', 'package-lock.stable.json'),
|
|
9
|
+
],
|
|
10
|
+
},
|
|
11
|
+
oxide: {
|
|
12
|
+
files: [
|
|
13
|
+
path.resolve(__dirname, '..', 'package.oxide.json'),
|
|
14
|
+
path.resolve(__dirname, '..', 'package-lock.oxide.json'),
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Find out what the current engine is that we are using:
|
|
20
|
+
let [otherEngine, info] = Object.entries(engines).find(([, info]) =>
|
|
21
|
+
info.files.every((file) => fs.existsSync(file))
|
|
22
|
+
)
|
|
23
|
+
let currentEngine = otherEngine === 'oxide' ? 'stable' : 'oxide'
|
|
24
|
+
|
|
25
|
+
console.log(`Current engine: \`${currentEngine}\`, swapping to \`${otherEngine}\``)
|
|
26
|
+
|
|
27
|
+
// Swap the engines
|
|
28
|
+
for (let file of info.files) {
|
|
29
|
+
fs.renameSync(
|
|
30
|
+
file.replace(`.${otherEngine}`, ''),
|
|
31
|
+
file.replace(`.${otherEngine}`, `.${currentEngine}`)
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
for (let file of engines[otherEngine].files) {
|
|
35
|
+
fs.renameSync(file, file.replace(`.${otherEngine}`, ''))
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
console.log(
|
|
39
|
+
'Engines have been swapped. Make sure to run `npm install` to update your dependencies.'
|
|
40
|
+
)
|
package/src/cli/build/plugin.js
CHANGED
|
@@ -10,7 +10,7 @@ import loadOptions from 'postcss-load-config/src/options' // Little bit scary, l
|
|
|
10
10
|
import tailwind from '../../processTailwindFeatures'
|
|
11
11
|
import { loadAutoprefixer, loadCssNano, loadPostcss, loadPostcssImport } from './deps'
|
|
12
12
|
import { formatNodes, drainStdin, outputFile } from './utils'
|
|
13
|
-
import { env } from '
|
|
13
|
+
import { env } from '../../lib/sharedState'
|
|
14
14
|
import resolveConfig from '../../../resolveConfig.js'
|
|
15
15
|
import getModuleDependencies from '../../lib/getModuleDependencies.js'
|
|
16
16
|
import { parseCandidateFiles } from '../../lib/content.js'
|