Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to convert to babel plugin #21

Closed
wants to merge 4 commits into from

Conversation

elyager
Copy link

@elyager elyager commented Feb 2, 2019

I converted this repo to a Babel Plugin, is the firs time I do something babel related, let me know any changes or improvements.

I have a identical version of this npm package working on https://www.npmjs.com/package/babel-plugin-noob. I uploaded it because I wanted to test all usage cases, hope you don't mind.

Fixes #20

@elyager elyager changed the title Convert to Babel plugin Attempt to convert to babel plugin Feb 2, 2019
@elyager
Copy link
Author

elyager commented Feb 2, 2019

Fixes #20

"test": "xo --ignore ./test/fixtures && npm run build && ava test --verbose",
"lint-fix": "xo --ignore ./test/fixtures --fix",
"test:watch": "npm run build && npm run test -- --watch",
"prepublishOnly": "npm run clean && npm run build"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no point on transpiling the module code. That just adds a lot of overhead for no gain.

"babel-cli": "^6.4.5",
"babel-core": "^6.26.3",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Babel 7

).toString();

test(`should ${caseName}`, t => {
t.is(trim(actual), trim(expected));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhm

Suggested change
t.is(trim(actual), trim(expected));
t.is(actual.trim(), expected.trim());

@sindresorhus
Copy link
Owner

Closing for lack of activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert to Babel plugin
2 participants