@gesslar/sassy 0.20.2 → 0.21.1
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 +12 -8
- package/src/BuildCommand.js +8 -9
- package/src/Cache.js +1 -0
- package/src/Colour.js +8 -2
- package/src/Command.js +93 -32
- package/src/Compiler.js +62 -36
- package/src/Data.js +26 -16
- package/src/Evaluator.js +60 -7
- package/src/File.js +14 -2
- package/src/LintCommand.js +421 -185
- package/src/ResolveCommand.js +60 -29
- package/src/Sass.js +2 -1
- package/src/Session.js +202 -36
- package/src/Term.js +7 -7
- package/src/Theme.js +394 -54
- package/src/ThemePool.js +1 -1
- package/src/ThemeToken.js +1 -0
- package/src/Type.js +11 -10
- package/src/Util.js +2 -2
- package/src/Valid.js +1 -1
- package/src/cli.js +28 -15
package/src/Util.js
CHANGED
|
@@ -102,7 +102,7 @@ export default class Util {
|
|
|
102
102
|
* Wrapper around Promise.all for consistency with other utility methods.
|
|
103
103
|
*
|
|
104
104
|
* @param {Promise[]} promises - Array of promises to await
|
|
105
|
-
* @returns {Promise<
|
|
105
|
+
* @returns {Promise<unknown[]>} Results of all promises
|
|
106
106
|
*/
|
|
107
107
|
static async awaitAll(promises) {
|
|
108
108
|
return await Promise.all(promises)
|
|
@@ -124,7 +124,7 @@ export default class Util {
|
|
|
124
124
|
* Wrapper around Promise.race for consistency with other utility methods.
|
|
125
125
|
*
|
|
126
126
|
* @param {Promise[]} promises - Array of promises to race
|
|
127
|
-
* @returns {Promise<
|
|
127
|
+
* @returns {Promise<unknown>} Result of the first settled promise
|
|
128
128
|
*/
|
|
129
129
|
static async race(promises) {
|
|
130
130
|
return await Promise.race(promises)
|
package/src/Valid.js
CHANGED
|
@@ -7,7 +7,7 @@ export default class Valid {
|
|
|
7
7
|
/**
|
|
8
8
|
* Validates a value against a type
|
|
9
9
|
*
|
|
10
|
-
* @param {
|
|
10
|
+
* @param {unknown} value - The value to validate
|
|
11
11
|
* @param {string} type - The expected type in the form of "object",
|
|
12
12
|
* "object[]", "object|object[]"
|
|
13
13
|
* @param {object} [options] - Additional options for validation.
|
package/src/cli.js
CHANGED
|
@@ -110,26 +110,39 @@ void (async function main() {
|
|
|
110
110
|
.description(pkgJson.description)
|
|
111
111
|
.version(pkgJson.version)
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
const buildCommand = new BuildCommand({cwd, packageJson: pkgJson})
|
|
115
|
-
buildCommand.cache = cache
|
|
113
|
+
const commands = [BuildCommand, ResolveCommand, LintCommand]
|
|
116
114
|
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
for(const CommandClass of commands) {
|
|
116
|
+
const command = new CommandClass({cwd, packageJson: pkgJson})
|
|
119
117
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
118
|
+
command.setCache(cache)
|
|
119
|
+
await command.buildCli(program)
|
|
120
|
+
command.addCliOptions(alwaysAvailable, false)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// // Add the build subcommand
|
|
124
|
+
// const buildCommand = new BuildCommand({cwd, packageJson: pkgJson})
|
|
125
|
+
|
|
126
|
+
// buildCommand.cache = cache
|
|
127
|
+
|
|
128
|
+
// void(await buildCommand.buildCli(program))
|
|
129
|
+
// .addCliOptions(alwaysAvailable, false)
|
|
130
|
+
|
|
131
|
+
// // Add the resolve subcommand
|
|
132
|
+
// const resolveCommand = new ResolveCommand({cwd, packageJson: pkgJson})
|
|
133
|
+
|
|
134
|
+
// resolveCommand.cache = cache
|
|
135
|
+
|
|
136
|
+
// void(await resolveCommand.buildCli(program))
|
|
137
|
+
// .addCliOptions(alwaysAvailable, false)
|
|
123
138
|
|
|
124
|
-
|
|
125
|
-
|
|
139
|
+
// // Add the lint subcommand
|
|
140
|
+
// const lintCommand = new LintCommand({cwd, packageJson: pkgJson})
|
|
126
141
|
|
|
127
|
-
//
|
|
128
|
-
const lintCommand = new LintCommand({cwd, packageJson: pkgJson})
|
|
129
|
-
lintCommand.cache = cache
|
|
142
|
+
// lintCommand.cache = cache
|
|
130
143
|
|
|
131
|
-
void(await lintCommand.buildCli(program))
|
|
132
|
-
|
|
144
|
+
// void(await lintCommand.buildCli(program))
|
|
145
|
+
// .addCliOptions(alwaysAvailable, false)
|
|
133
146
|
|
|
134
147
|
// Let'er rip, bitches! VROOM VROOM, motherfucker!!
|
|
135
148
|
await program.parseAsync()
|