@navikt/aksel 2.8.16-rc.9 → 2.9.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.
|
@@ -63,6 +63,10 @@ ${imports.join("\n")}
|
|
|
63
63
|
✔︎ NPM: https://www.npmjs.com/package/postcss-import
|
|
64
64
|
✔︎ Read more here: https://aksel.nav.no/grunnleggende/kode/tailwind`);
|
|
65
65
|
}
|
|
66
|
+
if (answers.layers === "yes") {
|
|
67
|
+
console.log(chalk.bold.underline.cyan(`\nNotes on Layers 📝`));
|
|
68
|
+
console.log(`Layers is not yet supported in Safari <= 15.3. (https://caniuse.com/css-cascade-layers)`);
|
|
69
|
+
}
|
|
66
70
|
answers.output.includes("clipboard") && clipboard.writeSync(importStr);
|
|
67
71
|
});
|
|
68
72
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
2
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
3
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -40,10 +39,15 @@ export function cssImportsCommand() {
|
|
|
40
39
|
message: "Import variants:",
|
|
41
40
|
initial: 0,
|
|
42
41
|
choices: [
|
|
43
|
-
{ message: "Regular (recommended)", name: "regular" },
|
|
44
|
-
{ message: "
|
|
45
|
-
{ message: "
|
|
42
|
+
{ message: "Regular import (recommended)", name: "regular" },
|
|
43
|
+
{ message: "Partial control (global)", name: "easy" },
|
|
44
|
+
{ message: "Full control (global + components)", name: "advanced" },
|
|
46
45
|
],
|
|
46
|
+
footer() {
|
|
47
|
+
return chalk.grey(`${chalk.cyan(`\n Documentation:`)}\n Regular: https://aksel.nav.no/grunnleggende/kode/css-import
|
|
48
|
+
Partial: https://aksel.nav.no/grunnleggende/kode/css-import#h64650b1a4ad6
|
|
49
|
+
Full: https://aksel.nav.no/grunnleggende/kode/css-import#h4037598416ef\n`);
|
|
50
|
+
},
|
|
47
51
|
},
|
|
48
52
|
{
|
|
49
53
|
type: "select",
|
|
@@ -8,9 +8,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import Enquirer from "enquirer";
|
|
11
|
+
import chalk from "chalk";
|
|
11
12
|
export function inquiry(answers, questions) {
|
|
12
13
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13
|
-
return yield Enquirer.prompt(questions.map((x) => (Object.assign(Object.assign({}, x), { cancel: () => process.exit(1) }))))
|
|
14
|
+
return yield Enquirer.prompt(questions.map((x) => (Object.assign(Object.assign({}, x), { cancel: () => process.exit(1), header: `\n${chalk.gray("Command 'css-imports' will not edit your files directly!")}\n` }))))
|
|
14
15
|
.then((a) => {
|
|
15
16
|
Object.entries(a).forEach(([key, value]) => {
|
|
16
17
|
answers[key] = value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navikt/aksel",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.1",
|
|
4
4
|
"description": "Aksel command line interface. Handles css-imports, codemods (planned) and more",
|
|
5
5
|
"author": "Aksel | NAV designsystem team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,9 +19,7 @@
|
|
|
19
19
|
"build": "yarn clean && tsc -p tsconfig.json",
|
|
20
20
|
"dev": "tsc --watch -p tsconfig.json"
|
|
21
21
|
},
|
|
22
|
-
"bin":
|
|
23
|
-
"aksel": "./dist/index.js"
|
|
24
|
-
},
|
|
22
|
+
"bin": "./dist/index.js",
|
|
25
23
|
"repository": {
|
|
26
24
|
"type": "git",
|
|
27
25
|
"url": "git+https://github.com/navikt/aksel.git",
|
|
@@ -30,7 +28,7 @@
|
|
|
30
28
|
"type": "module",
|
|
31
29
|
"homepage": "https://aksel.nav.no/grunnleggende/kode/kommandolinje",
|
|
32
30
|
"dependencies": {
|
|
33
|
-
"@navikt/ds-css": "2.
|
|
31
|
+
"@navikt/ds-css": "2.9.1",
|
|
34
32
|
"axios": "1.3.6",
|
|
35
33
|
"chalk": "4.1.0",
|
|
36
34
|
"clipboardy": "^3.0.0",
|
|
@@ -49,6 +47,7 @@
|
|
|
49
47
|
"node": ">=16.0.0"
|
|
50
48
|
},
|
|
51
49
|
"publishConfig": {
|
|
52
|
-
"access": "public"
|
|
50
|
+
"access": "public",
|
|
51
|
+
"provenance": true
|
|
53
52
|
}
|
|
54
53
|
}
|