const script = `
'use strict';
'abc: def';
'Foo: Bar Baz ';
'Foo: quux';
'Empty:'
function doStuff() {
'Oof: Zab Rab';
'Foo: quux';
}
`;
const result = babel.transform(script, {plugins: [programMetadataLiteralPlugin]});
assert.deepEqual(result.metadata.programMetaDataLiterals, [
{key: 'abc', value: 'def'},
{key: 'Foo', value: 'Bar Baz'},
{key: 'Foo', value: 'quux'},
{key: 'Empty', value: ''},
{key: 'Oof', value: 'Zab Rab'},
{key: 'Foo', value: 'quux'},
]);
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
Joris-van-der-Wel/babel-plugin-program-metadata-literals
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Packages 0
No packages published