From afa87af01c79a9baa539f2992d32154d2a4739bd Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Sat, 14 Feb 2026 14:46:37 -0800 Subject: task: delete vanilla js prototype\n\n- Removed vanilla/ directory and web/dist/vanilla directory\n- Updated Makefile, Dockerfile, and CI workflow to remove vanilla references\n- Cleaned up web/web.go to remove vanilla embed and routes\n- Verified build and tests pass\n\nCloses NK-2tcnmq --- .../node_modules/css-tree/cjs/generator/create.cjs | 102 --------------------- 1 file changed, 102 deletions(-) delete mode 100644 vanilla/node_modules/css-tree/cjs/generator/create.cjs (limited to 'vanilla/node_modules/css-tree/cjs/generator/create.cjs') diff --git a/vanilla/node_modules/css-tree/cjs/generator/create.cjs b/vanilla/node_modules/css-tree/cjs/generator/create.cjs deleted file mode 100644 index 87a54b2..0000000 --- a/vanilla/node_modules/css-tree/cjs/generator/create.cjs +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - -const index = require('../tokenizer/index.cjs'); -const sourceMap = require('./sourceMap.cjs'); -const tokenBefore = require('./token-before.cjs'); -const types = require('../tokenizer/types.cjs'); - -const REVERSESOLIDUS = 0x005c; // U+005C REVERSE SOLIDUS (\) - -function processChildren(node, delimeter) { - if (typeof delimeter === 'function') { - let prev = null; - - node.children.forEach(node => { - if (prev !== null) { - delimeter.call(this, prev); - } - - this.node(node); - prev = node; - }); - - return; - } - - node.children.forEach(this.node, this); -} - -function processChunk(chunk) { - index.tokenize(chunk, (type, start, end) => { - this.token(type, chunk.slice(start, end)); - }); -} - -function createGenerator(config) { - const types$1 = new Map(); - - for (let [name, item] of Object.entries(config.node)) { - const fn = item.generate || item; - - if (typeof fn === 'function') { - types$1.set(name, item.generate || item); - } - } - - return function(node, options) { - let buffer = ''; - let prevCode = 0; - let handlers = { - node(node) { - if (types$1.has(node.type)) { - types$1.get(node.type).call(publicApi, node); - } else { - throw new Error('Unknown node type: ' + node.type); - } - }, - tokenBefore: tokenBefore.safe, - token(type, value) { - prevCode = this.tokenBefore(prevCode, type, value); - - this.emit(value, type, false); - - if (type === types.Delim && value.charCodeAt(0) === REVERSESOLIDUS) { - this.emit('\n', types.WhiteSpace, true); - } - }, - emit(value) { - buffer += value; - }, - result() { - return buffer; - } - }; - - if (options) { - if (typeof options.decorator === 'function') { - handlers = options.decorator(handlers); - } - - if (options.sourceMap) { - handlers = sourceMap.generateSourceMap(handlers); - } - - if (options.mode in tokenBefore) { - handlers.tokenBefore = tokenBefore[options.mode]; - } - } - - const publicApi = { - node: (node) => handlers.node(node), - children: processChildren, - token: (type, value) => handlers.token(type, value), - tokenize: processChunk - }; - - handlers.node(node); - - return handlers.result(); - }; -} - -exports.createGenerator = createGenerator; -- cgit v1.2.3