Assets Exporter (JS/TS/Less/Sass/Css/Minifier)
Marketplace · Repository

Are you tired of wiring external tools just to build a few CSS or JavaScript assets? Maybe the project is legacy, maybe it cannot carry its own build setup, or maybe a full pipeline is more setup than the asset deserves.
Assets Exporter is for that gap: register the files that should be compiled, bundled, minified, and mapped, then use a small VS Code button/menu whenever you want to build them. Configure once, click Assets, and keep working inside the editor.
The extension exports workspace CSS, Less, Sass/SCSS, JavaScript, and TypeScript source files from configured source/target pairs. It supports transforms, bundling, minified outputs, source maps, dependency-aware watch mode, persisted logs, diagnostics, and a Webview editor for managing asset entries.
Preview
1. Commands
Show the Assets Exporter: commands available from the VS Code Command Palette.

2. Entries editor

3. Asset window

User Guide
Installation
Install from the Visual Studio Marketplace:
code --install-extension ITEM-PIXEL.assets-exporter-ts-js-less-sass-vscode
Or install from VS Code:
- Open Extensions with
Ctrl+Shift+X.
- Search for
Assets Exporter or ITEM-PIXEL.assets-exporter-ts-js-less-sass-vscode.
- Click
Install.
You can also open the Marketplace page directly:
https://marketplace.visualstudio.com/items?itemName=ITEM-PIXEL.assets-exporter-ts-js-less-sass-vscode
Extension identifier:
ITEM-PIXEL.assets-exporter-ts-js-less-sass-vscode
Setup
- Open a workspace folder in VS Code.
- Run
Assets Exporter: Manage Asset Entries from the Command Palette, or click the Assets status bar item and select Manage Asset Entries.
- Add entries from the supported project files list, using
All, CSS, Less, Sass, JS, or TS filters when needed.
- Set each entry source, target, type, watch, source map, minify, and target browser options.
- Click
Save.
- Run
Assets Exporter: Export All Assets, or enable Watch Assets.
Commands
| Command title |
Command id |
Behavior |
Assets Exporter: Export Assets |
assetsExporter.openMenu |
Opens the main Quick Pick menu. |
Assets Exporter: Export All Assets |
assetsExporter.buildAll |
Exports every configured entry. |
Assets Exporter: Toggle Watch |
assetsExporter.toggleWatch |
Starts or stops watch mode. |
Assets Exporter: Manage Asset Entries |
assetsExporter.openEntriesEditor |
Opens the entries Webview editor. |
Assets Exporter: Open Saved Asset Logs |
assetsExporter.openLogs |
Opens a picker for trace/error log files. |
Assets Exporter: Clear Saved Asset Logs |
assetsExporter.clearLogs |
Confirms and clears extension-owned logs. |
Status Bar
The status bar item is shown on the left side as a VS Code icon plus Assets.
| State |
UI text |
Meaning |
| Idle |
$(export) Assets |
Ready to export, watch, or manage entries. |
| Exporting |
$(loading~spin) Assets |
Export operation is running. |
| Watching |
$(eye-watch) Assets |
Watch mode is active. |
| Error |
$(warning) Assets |
Last export/watch operation reported a failure. |
| Click event |
icon plus Assets |
Opens Assets Exporter: Export Assets. |
Main Quick Pick
Open it with Assets Exporter: Export Assets or by clicking the status bar item.
| Item |
Behavior |
Export All Assets |
Runs the configured export queue. |
Watch Assets: On/Off |
Toggles watch mode for enabled entries with watch: true. |
Manage Asset Entries |
Opens the Webview editor. |
Open Assets Output |
Shows the in-memory Assets Exporter output channel. |
Open Saved Asset Logs |
Opens a picker with Trace Log and Error Log. |
Clear Saved Asset Logs |
Shows a confirmation before deleting persisted extension-owned logs. |
| Registered entry rows |
Opens the entry action Quick Pick for that entry. |
| Cancel / Escape / no choice |
Leaves the current project state unchanged. |
Entry Action Quick Pick
Selecting a registered entry from the main Quick Pick opens entry-specific actions.
| Item |
Current behavior |
Export This Entry |
Exports only the selected resolved entry. |
Enable/Disable Watch for This Entry |
Routes to the shared watch toggle workflow; the entry watch flag still applies. |
Edit Entry |
Opens the entries editor. |
Remove Entry |
Opens the entries editor so the entry can be removed from the draft and saved. |
Reveal Input File |
Opens the configured source file. |
Reveal Output File |
Opens the configured target file. |
Entries Editor
The entries editor is a VS Code Webview panel titled Assets Exporter: Entries.
| Area |
Interaction |
| Header |
Save, Export All, and Close. |
| File filters |
Radio buttons for All, CSS, Less, Sass, JS, and TS. |
| Toolbar |
Use Add Entry for inline guidance. |
| Entry cards |
Edit entry fields, remove draft entries, pick source files, choose output files. |
| File list |
Shows files matching the selected type filter and current .gitignore filter. |
.gitignore |
Checked by default below the file type filters; changes apply only to this panel. |
File Add |
Adds the discovered file as a draft entry. |
| Empty states |
Show No asset entries configured. or no-file messages when applicable. |
| Feedback region |
Shows save, validation, add, filter, export, and unsupported-message feedback. |
Entry Fields
| Field |
UI location |
Notes |
id |
Entry card text input |
Required unique entry id. |
enabled |
Entry card checkbox |
Disabled entries are skipped during export. |
workspaceFolder |
Multi-root selector |
Shown only when the workspace has more than one root folder. |
type |
Entry card select |
Supports Infer, CSS, Less, Sass, SCSS, JavaScript, TypeScript. |
input |
File Source text input |
Can be edited manually or filled through Pick. |
output |
File Target text input |
Can be edited manually or filled through Choose. |
watch |
Entry card checkbox |
Watch service uses only enabled entries with this flag enabled. |
sourceMap |
Entry card checkbox |
Controls .map generation. |
minify |
Entry card checkbox |
Controls .min.css or .min.js generation. |
targets |
Entry card text input |
Browserslist query used for CSS transforms. Defaults to defaults. |
tsconfig |
JSON setting only |
Optional TypeScript config path. |
external |
JSON setting only |
Module specifiers kept external during JS/TS bundling. |
format |
JSON setting only |
Script output format: iife, esm, or cjs. Defaults to iife. |
platform |
JSON setting only |
Script platform: browser, node, or neutral. Defaults to browser. |
| Input |
Pipeline |
Generated files when enabled |
.css |
Lightning CSS transform/minify |
.css, .css.map, .min.css, .min.css.map |
.less |
Less, then Lightning CSS |
.css, .css.map, .min.css, .min.css.map |
.sass / .scss |
sass-embedded with Sass fallback, then Lightning CSS |
.css, .css.map, .min.css, .min.css.map |
.js |
esbuild bundle, then Terser |
.js, .js.map, .min.js, .min.js.map |
.ts |
TypeScript diagnostics, esbuild bundle, then Terser |
.js, .js.map, .min.js, .min.js.map |
Generated output files are written atomically where possible, generated outputs are ignored by watch/discovery safeguards, and duplicate enabled target paths are reported as diagnostics.
File Discovery
The editor scans workspace folders for supported source files and filters them by type in the Webview. By default it:
- Uses
.gitignore rules.
- Skips generated outputs.
- Skips common generated or dependency directories such as
.git, node_modules, dist, out, playwright-report, and test-results.
- Supports multi-root workspaces through the
workspaceFolder entry field.
When Filter .gitignore is disabled, ignored supported files can appear in the current file type filter and are marked as .gitignore matches. This checkbox is not saved; reopening the editor enables it again.
Watch Mode
Watch mode resolves each enabled entry and its dependencies, creates file watchers, debounces file events, exports the affected entry, and refreshes dependency watchers after each watched export.
Generated output paths are ignored to avoid export loops. assetsExporter.watchOnStartup can start watch mode automatically when VS Code finishes activating the extension.
Logs and Diagnostics
Assets Exporter writes runtime information to:
- The
Assets Exporter output channel.
- Persisted trace and error logs under the VS Code extension log location.
- VS Code diagnostics for validation, dependency, and pipeline issues when a source or target file can be associated.
Saved logs are rotated by size and retained by count/age settings. Clear Saved Asset Logs deletes only extension-owned log files, not generated asset outputs.
Configuration
Example .vscode/settings.json:
{
"assetsExporter.entries": [
{
"id": "main-styles",
"enabled": true,
"type": "less",
"input": "src/styles/main.less",
"output": "public/css/main.css",
"watch": true,
"sourceMap": true,
"minify": true,
"targets": "defaults"
},
{
"id": "app",
"enabled": true,
"type": "typescript",
"input": "src/app/app.ts",
"output": "public/js/app.js",
"watch": true,
"sourceMap": true,
"minify": true,
"tsconfig": "tsconfig.json",
"external": [],
"format": "iife",
"platform": "browser"
}
],
"assetsExporter.watchOnStartup": false,
"assetsExporter.browserslist": "defaults",
"assetsExporter.logging.level": "trace",
"assetsExporter.logging.maxFileSizeKb": 1024,
"assetsExporter.logging.maxFiles": 5,
"assetsExporter.logging.autoClearDays": 7
}
| Setting |
Default |
Purpose |
assetsExporter.entries |
[] |
Source/target asset entry list. |
assetsExporter.watchOnStartup |
false |
Starts watch mode after extension activation. |
assetsExporter.browserslist |
defaults |
Default Browserslist query for CSS transformations. |
assetsExporter.logging.level |
trace |
Minimum persisted log level. |
assetsExporter.logging.maxFileSizeKb |
1024 |
Maximum size of each persisted log file before rotation. |
assetsExporter.logging.maxFiles |
5 |
Maximum rotated log files kept per log kind. |
assetsExporter.logging.autoClearDays |
7 |
Deletes extension-owned logs older than this many days. |
Developer Guide
This project is developed at karolva/assets-exporter-ts-js-less-sass-vscode.
Local Setup
Requirements from package.json:
- VS Code:
^1.118.0
- Node.js:
>=24.15.0
Clone, install, and validate:
git clone https://github.com/karolva/assets-exporter-ts-js-less-sass-vscode.git
cd assets-exporter-ts-js-less-sass-vscode
npm install
npm run type-check
npm run lint
npm run format:check
npm run test:ui
npm run test:all
Launch and Tasks
| VS Code launch config |
Behavior |
Run App |
Compiles and opens the Extension Development Host. |
Run Overall Tests |
Runs npm run test:all in the integrated terminal. |
Package VSIX to dist |
Runs npm run package:vsix:dist in the integrated terminal. |
| VS Code task |
Group |
Behavior |
npm: type-check |
build |
Runs TypeScript without emitting files. |
npm: compile |
build |
Bundles the extension to dist/extension.js. |
npm: test:unit |
test |
Runs unit tests. |
npm: test:all |
test |
Runs type-check and the full Playwright suite. |
npm: package:vsix:dist |
build |
Packages the VSIX under dist. |
Test Matrix
| Script |
Coverage area |
npm run type-check |
TypeScript project validation. |
npm run lint |
ESLint validation for extension source and test code. |
npm run format:check |
Prettier validation for Markdown, config, source, and valid fixtures. |
npm run test:unit |
Services, commands, config, diagnostics, logs, watch, Webview routing. |
npm run test:integration |
Build service integration coverage. |
npm run test:fixtures |
CSS/Less/Sass/JS/TS fixture pipelines and dependency discovery. |
npm run test:logs |
Logger and persisted log repository behavior. |
npm run test:webview |
Webview DOM, buttons, fields, filters, messages, and UI events. |
npm run test:extension-host |
VS Code Extension Host smoke test for activation and commands. |
npm run test:ui |
Webview UI tests plus Extension Host smoke test. |
npm run test:all |
Type-check plus the full Playwright test suite. |
Manual Test App
test/testapp is a complete sample workspace for validating real exported assets in a browser. It contains a Vite website with CSS, Less, SCSS, Sass, native JavaScript, and TypeScript source files, plus .vscode/settings.json entries that compile from assets/source into blank placeholder files under assets/dist. The test app uses assets/dist as Vite's static public directory, so it opens without missing-file errors before export and becomes styled/interactive after compilation.
Use it when you want to manually confirm that exports look and behave correctly:
cd test/testapp
npm install
Then open test/testapp as the VS Code workspace, run Assets Exporter: Export All Assets, and validate:
npm run test:outputs
npm run dev
| Test app command |
Coverage area |
npm run test:errors |
Confirms intentional broken fixtures exist and are not registered by default. |
npm run test:outputs |
Confirms generated base, minified, and source map outputs exist. |
npm run test:site |
Runs output validation, then builds the Vite site. |
npm run dev |
Starts the browser test site for visual and interaction checks. |
See test/testapp/README.md for the full browser checklist and the entry-to-output map.
Build a Local VSIX
Package to the project dist folder:
npm run package:vsix:dist
Install the generated VSIX:
code --install-extension .\dist\assets-exporter-ts-js-less-sass-vscode-0.0.1.vsix --force
Package to the project root instead:
npm run package:vsix
The extension entry point is bundled to dist/extension.js. Runtime Webview media is shipped from media/.
Packaging Notes
This extension uses runtime packages that include platform-specific binaries or native/runtime variants, including esbuild, lightningcss, and sass-embedded. Validate the packaged VSIX on the platform where it is built.
README preview images use relative paths so they render both in local Markdown preview and on the Visual Studio Marketplace package page. When changing icon.png or files under images/, keep those files included in the VSIX and push them to the repository before publishing a Marketplace release.
For a Marketplace release across win32-x64, win32-arm64, linux-x64, linux-arm64, darwin-x64, and darwin-arm64, build and smoke-test target packages on each platform or use a target-specific release pipeline.
Publishing Checklist
- Confirm
package.json.publisher is ITEM-PIXEL.
- Confirm
package.json.name is assets-exporter-ts-js-less-sass-vscode.
- Confirm README images render locally and from the packaged Marketplace page.
- Run
npm run test:all.
- Build the release VSIX with
npm run package:vsix:dist.
- Publish only from an account authorized for the configured publisher.
References