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

Use babel-preset-env in 'init' #47

Merged
merged 1 commit into from
Jan 2, 2017
Merged

Use babel-preset-env in 'init' #47

merged 1 commit into from
Jan 2, 2017

Conversation

anaisbetts
Copy link
Contributor

This PR switches the default Babel preset to use babel-preset-env - this preset adjusts based on the current Electron version which Babel plugins to use. This PR also enables async/await and React by default, since these features are super common and don't have any overhead to enable if not in-use.

Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

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

In general it makes sense, and after much thought technically this isn't breaking so thats good too 👍

In general in this repo we use git-cz for commit messages so that we can generate changelogs and versions automatically. And it looks cooler in the commit history 😆

Simply do npm run commit and fill in the prompts 😄

envTarget[1].targets.electron = electronPrebuilt.version;
}

fs.writeFileSync(path.join(dir, '.compilerc'), JSON.stringify(content, null, 2), 'utf8');
Copy link
Member

Choose a reason for hiding this comment

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

To be async

await fs.writeFile(...)

@@ -50,7 +50,7 @@ describe('forge-config', () => {
});
});

describe.only('require-search', () => {
Copy link
Member

Choose a reason for hiding this comment

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

rebasing on master should pull this in

@MarshallOfSound
Copy link
Member

Also for some strange reason the CI didn't run, adding another commit should trigger those though 👍

@anaisbetts anaisbetts force-pushed the preset-env branch 2 times, most recently from 6b81148 to 77b14e7 Compare January 2, 2017 20:40
await initStarter(dir, program.template ? undefined : program.lintstyle);
await initNPM(dir, program.template ? undefined : program.lintstyle);
Copy link
Member

Choose a reason for hiding this comment

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

Was moving this call intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we have to have .compilerc laid down before we can edit it

This PR switches the default Babel preset to use babel-preset-env - this
preset adjusts based on the current Electron version which Babel plugins
to use. This PR also enables async/await and React by default, since
these features are super common and don't have any overhead to enable
when not in-use.
@anaisbetts anaisbetts merged commit 479d1c4 into master Jan 2, 2017
@anaisbetts anaisbetts deleted the preset-env branch January 2, 2017 23:07
dsanders11 pushed a commit that referenced this pull request Jan 14, 2023
More unit tests, fix "Save Fiddle"
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.

3 participants