Skip to content

Commit ff9ff85

Browse files
author
faridevnz
committed
feat: add support to css files copy
1 parent d29ad16 commit ff9ff85

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: src/commands/build.ts

+6
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ export const build = async (): Promise<void> => {
138138
["ts", "tsx"],
139139
configuration.exclude.extensions
140140
);
141+
// Get the list of css files
142+
const cssFiles = getFilesRecursive(srcDir, ["css"], []);
141143
// Configure the TypeScript program
142144
const program = ts.createProgram(files, compilerOptions);
143145

@@ -173,6 +175,10 @@ export const build = async (): Promise<void> => {
173175
}
174176

175177
// Copy files to the output directory
178+
cssFiles.forEach(cssFile => {
179+
const path = cssFile.replace(/^(\.\/)?src\//, "");
180+
configuration.files[cssFile] = `${path}`;
181+
});
176182
for (const source of Object.keys(configuration.files)) {
177183
if (!fs.existsSync(source)) {
178184
throw new Error(`🧨⚠️💣 Source ${source} does not exist`);

0 commit comments

Comments
 (0)