@tokenami/cli 0.0.96--canary.bootstrap.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 +21 -0
- package/README.md +3 -0
- package/bin.js +2 -0
- package/dist/bin.js +181 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +176 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Jenna Smith (@jjenzz)
|
|
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
package/bin.js
ADDED
package/dist/bin.js
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { log, utils, TokenamiDiagnostics, findUsedTokens, generateSheet } from '@tokenami/node';
|
|
2
|
+
import ts from 'typescript/lib/tsserverlibrary.js';
|
|
3
|
+
import browserslist from 'browserslist';
|
|
4
|
+
import { browserslistToTargets } from 'lightningcss';
|
|
5
|
+
import cac from 'cac';
|
|
6
|
+
import inquirer from 'inquirer';
|
|
7
|
+
import * as fs from 'fs';
|
|
8
|
+
import * as chokidar from 'chokidar';
|
|
9
|
+
import * as pathe from 'pathe';
|
|
10
|
+
|
|
11
|
+
// src/bin.ts
|
|
12
|
+
|
|
13
|
+
// package.json
|
|
14
|
+
var package_default = {
|
|
15
|
+
version: "0.0.95"};
|
|
16
|
+
|
|
17
|
+
// src/index.ts
|
|
18
|
+
var questions = [
|
|
19
|
+
{
|
|
20
|
+
type: "list",
|
|
21
|
+
name: "type",
|
|
22
|
+
message: "TypeScript or JavaScript?",
|
|
23
|
+
choices: [
|
|
24
|
+
{ name: "TypeScript", value: "ts" },
|
|
25
|
+
{ name: "JavaScript", value: "js" }
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
type: "input",
|
|
30
|
+
name: "folder",
|
|
31
|
+
message: "What folder should Tokenami watch for token properties?",
|
|
32
|
+
default: "./app"
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
function run() {
|
|
36
|
+
const cli = cac("tokenami");
|
|
37
|
+
const cwd = process.cwd();
|
|
38
|
+
cli.command("init").option("-c, --config [path]", "Path to a custom config file").action(async (_, flags) => {
|
|
39
|
+
const projectConfig = getProjectConfig(cwd);
|
|
40
|
+
if (projectConfig) questions.shift();
|
|
41
|
+
const answers = await inquirer.prompt(questions);
|
|
42
|
+
const type = projectConfig?.type ?? answers.type;
|
|
43
|
+
const extensions = projectConfig?.type === "ts" ? "ts,tsx" : "js,jsx";
|
|
44
|
+
const include = `'${answers.folder}/**/*.{${extensions}}'`;
|
|
45
|
+
const configPath = utils.getConfigPath(cwd, flags?.config, type);
|
|
46
|
+
const outDir = pathe.dirname(configPath);
|
|
47
|
+
const initialConfig = utils.generateConfig(include, configPath);
|
|
48
|
+
const typeDefs = utils.generateTypeDefs(configPath);
|
|
49
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
50
|
+
fs.writeFileSync(configPath, initialConfig, { flag: "w" });
|
|
51
|
+
fs.writeFileSync(utils.getTypeDefsPath(configPath), typeDefs, { flag: "w" });
|
|
52
|
+
log.debug(`Project successfully configured in './tokenami'`);
|
|
53
|
+
});
|
|
54
|
+
cli.command("check").option("-c, --config [path]", "Path to a custom config file").action((_, flags) => {
|
|
55
|
+
const projectConfig = getProjectConfig(cwd);
|
|
56
|
+
if (!projectConfig) {
|
|
57
|
+
log.error("Could not find a valid tsconfig.json.");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (projectConfig.error) {
|
|
61
|
+
log.error(`Error reading tsconfig.json: ${projectConfig.error.messageText}`);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const parsedConfig = ts.parseJsonConfigFileContent(
|
|
65
|
+
projectConfig.config,
|
|
66
|
+
ts.sys,
|
|
67
|
+
process.cwd()
|
|
68
|
+
);
|
|
69
|
+
const program = ts.createProgram({
|
|
70
|
+
rootNames: parsedConfig.fileNames,
|
|
71
|
+
options: parsedConfig.options
|
|
72
|
+
});
|
|
73
|
+
const configPath = utils.getConfigPath(cwd, flags?.config, projectConfig.type);
|
|
74
|
+
const config = utils.getConfigAtPath(configPath);
|
|
75
|
+
const plugin = new TokenamiDiagnostics(config);
|
|
76
|
+
const formatHost = {
|
|
77
|
+
getCanonicalFileName: (path) => path,
|
|
78
|
+
getCurrentDirectory: ts.sys.getCurrentDirectory,
|
|
79
|
+
getNewLine: () => ts.sys.newLine
|
|
80
|
+
};
|
|
81
|
+
for (const sourceFile of program.getSourceFiles()) {
|
|
82
|
+
if (sourceFile.isDeclarationFile || sourceFile.fileName.includes("node_modules")) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
const diagnostics = plugin.getSemanticDiagnostics(sourceFile);
|
|
86
|
+
if (diagnostics.length > 0) {
|
|
87
|
+
console.log(ts.formatDiagnosticsWithColorAndContext(diagnostics, formatHost));
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
process.exit(0);
|
|
92
|
+
});
|
|
93
|
+
cli.command("[files]", "Include file glob").option("-c, --config [path]", "Path to a custom config file").option("-o, --output [path]", "Output file", { default: "public/tokenami.css" }).option("-w, --watch", "Watch for changes and rebuild as needed").option("--minify", "Minify CSS output").action(async (_, flags) => {
|
|
94
|
+
const startTime = startTimer();
|
|
95
|
+
const minify = flags.minify;
|
|
96
|
+
const configPath = utils.getConfigPath(cwd, flags.config);
|
|
97
|
+
const browsersConfig = browserslist(null, { env: process.env.NODE_ENV || "development" });
|
|
98
|
+
const browsers = browsersConfig.length ? browsersConfig : ["supports css-cascade-layers"];
|
|
99
|
+
const targets = browserslistToTargets(browsers);
|
|
100
|
+
let config = utils.getConfigAtPath(configPath);
|
|
101
|
+
config.include = flags.files || config.include;
|
|
102
|
+
if (!config.include.length) log.error("Provide a glob pattern to include files");
|
|
103
|
+
async function regenerateStylesheet(file, config2) {
|
|
104
|
+
const generateTime = startTimer();
|
|
105
|
+
const tokens2 = await findUsedTokens(cwd, config2);
|
|
106
|
+
generateStyles({ tokens: tokens2, cwd, out: flags.output, config: config2, minify, targets });
|
|
107
|
+
log.debug(`Generated styles from ${file} in ${generateTime()}ms.`);
|
|
108
|
+
}
|
|
109
|
+
if (flags.watch) {
|
|
110
|
+
const configWatcher = watch2(cwd, [configPath]);
|
|
111
|
+
const tokenWatcher = watch2(cwd, config.include, config.exclude);
|
|
112
|
+
log.debug(`Watching for changes to ${config.include}.`);
|
|
113
|
+
tokenWatcher.on("all", (_2, file) => regenerateStylesheet(file, config));
|
|
114
|
+
configWatcher.on("all", async (_2, file) => {
|
|
115
|
+
try {
|
|
116
|
+
config = utils.getConfigAtPath(configPath, { cache: false });
|
|
117
|
+
config.include = flags.files || config.include;
|
|
118
|
+
regenerateStylesheet(file, config);
|
|
119
|
+
} catch (e) {
|
|
120
|
+
log.debug(`Skipped change to ${file} with ${e}`);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
process.once("SIGINT", async () => {
|
|
124
|
+
await tokenWatcher.close();
|
|
125
|
+
await configWatcher.close();
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
const tokens = await findUsedTokens(cwd, config);
|
|
129
|
+
generateStyles({ tokens, cwd, out: flags.output, config, minify, targets });
|
|
130
|
+
log.debug(`Ready in ${startTime()}ms.`);
|
|
131
|
+
});
|
|
132
|
+
cli.help();
|
|
133
|
+
cli.version(package_default.version);
|
|
134
|
+
cli.parse();
|
|
135
|
+
}
|
|
136
|
+
function getProjectConfig(cwd) {
|
|
137
|
+
const tsconfigPath = ts.findConfigFile(cwd, ts.sys.fileExists, "tsconfig.json");
|
|
138
|
+
if (tsconfigPath) {
|
|
139
|
+
const config = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
|
|
140
|
+
if (config.error) return null;
|
|
141
|
+
return { type: "ts", ...config };
|
|
142
|
+
}
|
|
143
|
+
const jsconfigPath = ts.findConfigFile(cwd, ts.sys.fileExists, "jsconfig.json");
|
|
144
|
+
if (jsconfigPath) {
|
|
145
|
+
const config = ts.readConfigFile(jsconfigPath, ts.sys.readFile);
|
|
146
|
+
if (config.error) return null;
|
|
147
|
+
return { type: "js", ...config };
|
|
148
|
+
}
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
function generateStyles(params) {
|
|
152
|
+
const { cwd, out, ...generateParams } = params;
|
|
153
|
+
const outDir = pathe.join(cwd, pathe.dirname(out));
|
|
154
|
+
const outPath = pathe.join(cwd, out);
|
|
155
|
+
const output = generateSheet({ ...generateParams, output: outPath });
|
|
156
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
157
|
+
fs.writeFileSync(outPath, output, { flag: "w" });
|
|
158
|
+
}
|
|
159
|
+
function watch2(cwd, include, exclude) {
|
|
160
|
+
return chokidar.watch(include, {
|
|
161
|
+
cwd,
|
|
162
|
+
persistent: true,
|
|
163
|
+
ignoreInitial: true,
|
|
164
|
+
ignorePermissionErrors: true,
|
|
165
|
+
ignored: exclude
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
function startTimer() {
|
|
169
|
+
const start = performance.now();
|
|
170
|
+
return () => {
|
|
171
|
+
const stop = performance.now();
|
|
172
|
+
return Math.round(stop - start);
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// src/bin.ts
|
|
177
|
+
try {
|
|
178
|
+
run();
|
|
179
|
+
} catch (e) {
|
|
180
|
+
log.error(e instanceof Error ? e.message : "Unknown error occurred.");
|
|
181
|
+
}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import ts from 'typescript/lib/tsserverlibrary.js';
|
|
2
|
+
import browserslist from 'browserslist';
|
|
3
|
+
import { browserslistToTargets } from 'lightningcss';
|
|
4
|
+
import cac from 'cac';
|
|
5
|
+
import inquirer from 'inquirer';
|
|
6
|
+
import * as fs from 'fs';
|
|
7
|
+
import * as chokidar from 'chokidar';
|
|
8
|
+
import * as pathe from 'pathe';
|
|
9
|
+
import { utils, log, TokenamiDiagnostics, findUsedTokens, generateSheet } from '@tokenami/node';
|
|
10
|
+
|
|
11
|
+
// src/index.ts
|
|
12
|
+
|
|
13
|
+
// package.json
|
|
14
|
+
var package_default = {
|
|
15
|
+
version: "0.0.95"};
|
|
16
|
+
|
|
17
|
+
// src/index.ts
|
|
18
|
+
var questions = [
|
|
19
|
+
{
|
|
20
|
+
type: "list",
|
|
21
|
+
name: "type",
|
|
22
|
+
message: "TypeScript or JavaScript?",
|
|
23
|
+
choices: [
|
|
24
|
+
{ name: "TypeScript", value: "ts" },
|
|
25
|
+
{ name: "JavaScript", value: "js" }
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
type: "input",
|
|
30
|
+
name: "folder",
|
|
31
|
+
message: "What folder should Tokenami watch for token properties?",
|
|
32
|
+
default: "./app"
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
function run() {
|
|
36
|
+
const cli = cac("tokenami");
|
|
37
|
+
const cwd = process.cwd();
|
|
38
|
+
cli.command("init").option("-c, --config [path]", "Path to a custom config file").action(async (_, flags) => {
|
|
39
|
+
const projectConfig = getProjectConfig(cwd);
|
|
40
|
+
if (projectConfig) questions.shift();
|
|
41
|
+
const answers = await inquirer.prompt(questions);
|
|
42
|
+
const type = projectConfig?.type ?? answers.type;
|
|
43
|
+
const extensions = projectConfig?.type === "ts" ? "ts,tsx" : "js,jsx";
|
|
44
|
+
const include = `'${answers.folder}/**/*.{${extensions}}'`;
|
|
45
|
+
const configPath = utils.getConfigPath(cwd, flags?.config, type);
|
|
46
|
+
const outDir = pathe.dirname(configPath);
|
|
47
|
+
const initialConfig = utils.generateConfig(include, configPath);
|
|
48
|
+
const typeDefs = utils.generateTypeDefs(configPath);
|
|
49
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
50
|
+
fs.writeFileSync(configPath, initialConfig, { flag: "w" });
|
|
51
|
+
fs.writeFileSync(utils.getTypeDefsPath(configPath), typeDefs, { flag: "w" });
|
|
52
|
+
log.debug(`Project successfully configured in './tokenami'`);
|
|
53
|
+
});
|
|
54
|
+
cli.command("check").option("-c, --config [path]", "Path to a custom config file").action((_, flags) => {
|
|
55
|
+
const projectConfig = getProjectConfig(cwd);
|
|
56
|
+
if (!projectConfig) {
|
|
57
|
+
log.error("Could not find a valid tsconfig.json.");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (projectConfig.error) {
|
|
61
|
+
log.error(`Error reading tsconfig.json: ${projectConfig.error.messageText}`);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const parsedConfig = ts.parseJsonConfigFileContent(
|
|
65
|
+
projectConfig.config,
|
|
66
|
+
ts.sys,
|
|
67
|
+
process.cwd()
|
|
68
|
+
);
|
|
69
|
+
const program = ts.createProgram({
|
|
70
|
+
rootNames: parsedConfig.fileNames,
|
|
71
|
+
options: parsedConfig.options
|
|
72
|
+
});
|
|
73
|
+
const configPath = utils.getConfigPath(cwd, flags?.config, projectConfig.type);
|
|
74
|
+
const config = utils.getConfigAtPath(configPath);
|
|
75
|
+
const plugin = new TokenamiDiagnostics(config);
|
|
76
|
+
const formatHost = {
|
|
77
|
+
getCanonicalFileName: (path) => path,
|
|
78
|
+
getCurrentDirectory: ts.sys.getCurrentDirectory,
|
|
79
|
+
getNewLine: () => ts.sys.newLine
|
|
80
|
+
};
|
|
81
|
+
for (const sourceFile of program.getSourceFiles()) {
|
|
82
|
+
if (sourceFile.isDeclarationFile || sourceFile.fileName.includes("node_modules")) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
const diagnostics = plugin.getSemanticDiagnostics(sourceFile);
|
|
86
|
+
if (diagnostics.length > 0) {
|
|
87
|
+
console.log(ts.formatDiagnosticsWithColorAndContext(diagnostics, formatHost));
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
process.exit(0);
|
|
92
|
+
});
|
|
93
|
+
cli.command("[files]", "Include file glob").option("-c, --config [path]", "Path to a custom config file").option("-o, --output [path]", "Output file", { default: "public/tokenami.css" }).option("-w, --watch", "Watch for changes and rebuild as needed").option("--minify", "Minify CSS output").action(async (_, flags) => {
|
|
94
|
+
const startTime = startTimer();
|
|
95
|
+
const minify = flags.minify;
|
|
96
|
+
const configPath = utils.getConfigPath(cwd, flags.config);
|
|
97
|
+
const browsersConfig = browserslist(null, { env: process.env.NODE_ENV || "development" });
|
|
98
|
+
const browsers = browsersConfig.length ? browsersConfig : ["supports css-cascade-layers"];
|
|
99
|
+
const targets = browserslistToTargets(browsers);
|
|
100
|
+
let config = utils.getConfigAtPath(configPath);
|
|
101
|
+
config.include = flags.files || config.include;
|
|
102
|
+
if (!config.include.length) log.error("Provide a glob pattern to include files");
|
|
103
|
+
async function regenerateStylesheet(file, config2) {
|
|
104
|
+
const generateTime = startTimer();
|
|
105
|
+
const tokens2 = await findUsedTokens(cwd, config2);
|
|
106
|
+
generateStyles({ tokens: tokens2, cwd, out: flags.output, config: config2, minify, targets });
|
|
107
|
+
log.debug(`Generated styles from ${file} in ${generateTime()}ms.`);
|
|
108
|
+
}
|
|
109
|
+
if (flags.watch) {
|
|
110
|
+
const configWatcher = watch2(cwd, [configPath]);
|
|
111
|
+
const tokenWatcher = watch2(cwd, config.include, config.exclude);
|
|
112
|
+
log.debug(`Watching for changes to ${config.include}.`);
|
|
113
|
+
tokenWatcher.on("all", (_2, file) => regenerateStylesheet(file, config));
|
|
114
|
+
configWatcher.on("all", async (_2, file) => {
|
|
115
|
+
try {
|
|
116
|
+
config = utils.getConfigAtPath(configPath, { cache: false });
|
|
117
|
+
config.include = flags.files || config.include;
|
|
118
|
+
regenerateStylesheet(file, config);
|
|
119
|
+
} catch (e) {
|
|
120
|
+
log.debug(`Skipped change to ${file} with ${e}`);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
process.once("SIGINT", async () => {
|
|
124
|
+
await tokenWatcher.close();
|
|
125
|
+
await configWatcher.close();
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
const tokens = await findUsedTokens(cwd, config);
|
|
129
|
+
generateStyles({ tokens, cwd, out: flags.output, config, minify, targets });
|
|
130
|
+
log.debug(`Ready in ${startTime()}ms.`);
|
|
131
|
+
});
|
|
132
|
+
cli.help();
|
|
133
|
+
cli.version(package_default.version);
|
|
134
|
+
cli.parse();
|
|
135
|
+
}
|
|
136
|
+
function getProjectConfig(cwd) {
|
|
137
|
+
const tsconfigPath = ts.findConfigFile(cwd, ts.sys.fileExists, "tsconfig.json");
|
|
138
|
+
if (tsconfigPath) {
|
|
139
|
+
const config = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
|
|
140
|
+
if (config.error) return null;
|
|
141
|
+
return { type: "ts", ...config };
|
|
142
|
+
}
|
|
143
|
+
const jsconfigPath = ts.findConfigFile(cwd, ts.sys.fileExists, "jsconfig.json");
|
|
144
|
+
if (jsconfigPath) {
|
|
145
|
+
const config = ts.readConfigFile(jsconfigPath, ts.sys.readFile);
|
|
146
|
+
if (config.error) return null;
|
|
147
|
+
return { type: "js", ...config };
|
|
148
|
+
}
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
function generateStyles(params) {
|
|
152
|
+
const { cwd, out, ...generateParams } = params;
|
|
153
|
+
const outDir = pathe.join(cwd, pathe.dirname(out));
|
|
154
|
+
const outPath = pathe.join(cwd, out);
|
|
155
|
+
const output = generateSheet({ ...generateParams, output: outPath });
|
|
156
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
157
|
+
fs.writeFileSync(outPath, output, { flag: "w" });
|
|
158
|
+
}
|
|
159
|
+
function watch2(cwd, include, exclude) {
|
|
160
|
+
return chokidar.watch(include, {
|
|
161
|
+
cwd,
|
|
162
|
+
persistent: true,
|
|
163
|
+
ignoreInitial: true,
|
|
164
|
+
ignorePermissionErrors: true,
|
|
165
|
+
ignored: exclude
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
function startTimer() {
|
|
169
|
+
const start = performance.now();
|
|
170
|
+
return () => {
|
|
171
|
+
const stop = performance.now();
|
|
172
|
+
return Math.round(stop - start);
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export { run };
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tokenami/cli",
|
|
3
|
+
"version": "0.0.96--canary.bootstrap.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"repository": "tokenami/tokenami",
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"./bin": {
|
|
20
|
+
"import": "./dist/bin.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"bin": {
|
|
24
|
+
"tokenami": "bin.js"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=20"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"bin.js"
|
|
32
|
+
],
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"browserslist": "^4.26.3",
|
|
35
|
+
"cac": "^6.7.14",
|
|
36
|
+
"chokidar": "^3.5.3",
|
|
37
|
+
"inquirer": "^9.2.12",
|
|
38
|
+
"lightningcss": "1.29.1",
|
|
39
|
+
"pathe": "^1.1.1",
|
|
40
|
+
"typescript": "^5.1.3",
|
|
41
|
+
"@tokenami/config": "0.0.95",
|
|
42
|
+
"@tokenami/node": "0.0.96--canary.bootstrap.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/inquirer": "^9.0.7",
|
|
46
|
+
"@types/node": "^20.3.1",
|
|
47
|
+
"tsup": "^8.4.0"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsup",
|
|
51
|
+
"dev": "tsup --watch",
|
|
52
|
+
"typecheck": "tsc --noEmit"
|
|
53
|
+
}
|
|
54
|
+
}
|