diff --git a/example-transformers/update-mutable-node/source.js b/example-transformers/update-mutable-node/source.js deleted file mode 100644 index 434da1d..0000000 --- a/example-transformers/update-mutable-node/source.js +++ /dev/null @@ -1 +0,0 @@ -const hello = true; diff --git a/example-transformers/update-mutable-node/source.ts b/example-transformers/update-mutable-node/source.ts deleted file mode 100644 index 434da1d..0000000 --- a/example-transformers/update-mutable-node/source.ts +++ /dev/null @@ -1 +0,0 @@ -const hello = true; diff --git a/example-transformers/update-mutable-node/transformed/source.js b/example-transformers/update-mutable-node/transformed/source.js deleted file mode 100644 index 9200be9..0000000 --- a/example-transformers/update-mutable-node/transformed/source.js +++ /dev/null @@ -1 +0,0 @@ -const hello = "mutable-world"; diff --git a/example-transformers/update-mutable-node/transformer.js b/example-transformers/update-mutable-node/transformer.js deleted file mode 100644 index 91ad983..0000000 --- a/example-transformers/update-mutable-node/transformer.js +++ /dev/null @@ -1,15 +0,0 @@ -import * as ts from 'typescript'; -const transformer = context => { - return sourceFile => { - const visitor = (node) => { - if (ts.isVariableDeclaration(node)) { - const newNode = ts.getMutableClone(node); - newNode.initializer = ts.createStringLiteral('mutable-world'); - return newNode; - } - return ts.visitEachChild(node, visitor, context); - }; - return ts.visitNode(sourceFile, visitor); - }; -}; -export default transformer; diff --git a/example-transformers/update-mutable-node/transformer.ts b/example-transformers/update-mutable-node/transformer.ts deleted file mode 100644 index 7247cf5..0000000 --- a/example-transformers/update-mutable-node/transformer.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as ts from 'typescript'; - -const transformer: ts.TransformerFactory = context => { - return sourceFile => { - const visitor = (node: ts.Node): ts.Node => { - if (ts.isVariableDeclaration(node)) { - const newNode = ts.getMutableClone(node) as ts.VariableDeclaration; - newNode.initializer = ts.createStringLiteral('mutable-world'); - return newNode; - } - - return ts.visitEachChild(node, visitor, context); - }; - - return ts.visitNode(sourceFile, visitor); - }; -}; - -export default transformer; diff --git a/example-transformers/update-mutable-node/tsconfig.json b/example-transformers/update-mutable-node/tsconfig.json deleted file mode 100644 index 96baf2a..0000000 --- a/example-transformers/update-mutable-node/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "transformed", - "plugins": [{ "transform": "./transformer.ts", "type": "raw" }] - }, - "files": ["source.ts"] -}