-
Notifications
You must be signed in to change notification settings - Fork 141
Move all source to ES6 #344
Conversation
Move more logic to helpers
Holy linting errors. 👼 |
😛 Maybe because it's linting the |
If linting Why shouldn't the Also from the sounds of it this changes how development will work on this from now on, so I would say this should split out the Contributing section of the README.md into a CONTRIBUTING.md and update it with the new steps. |
Whoever wants can take this PR from here on, I have a long todo list, including rewriting the linter UI and authoring a spec for a base debugger API |
I think it would be easier for us to continue working on it if it were a branch on the repo, rather than on your fork. Is there a chance you could move it to a repo branch? Edit: maybe an easy way is to make a pull request onto a new branch of the project? |
Seriously ucompiler? I know its a projet from you @steelbrain but everyone use babel and everything you do can be done with babel CLI. Any benefits for ES6 for theses files? Now we need to build the projet on releases... |
If we get a branch in this repo we can riff on, I'm happy to add the stuff I mention below: FYI, with npm run scripts you do not need to install things globally, just add build deps like eslint and babel to
Generally one does not check built files into source control at all; those files belong in npm/apm only. Building on CI isn't too tough, I do it for all my projects. The atom testing script is the only confounding factor, but shouldn't be a problem IIRC how the script works. As mentioned, happy to mess with it if we get a riff branch going. |
Just a note, this is a branch on this repo, he just named it |
Sneaky. |
@iam4x To answer your question, I am using babel, Ucompiler is just the base of it. Ucompiler is just a compiler which saves us from a different compile command for each file, if I recall correctly the babel cli only compiles one file at a time, but ucompiler allows you to create a |
About the other part of your question, If you read the PR description we had two helper files, |
nah - https://babeljs.io/docs/usage/cli/#compile-directories |
@SpainTrain that's new for me 😛 , Lets use that! |
👍 I am messing with CI stuff now and can make the switch. I do appreciate the effort to dog food your projects though =-) |
That example doesn't have a build step. We want the inferred installation for this "machine" type (node) because we need to run babel, so we do not wish to override. I also make use of |
PSA: I am about to squash and force push to this working branch. |
576e2e9
to
80675fb
Compare
Ok, so CI and build stuff is taken care of. The specs just need to be fixed now. |
* Setup CI for a lint, build, test sequence * Remove ucompiler, just use babel directly * Add command for publishing with apm (`npm run apm-publish -- <bump>`)
80675fb
to
553f454
Compare
Exactly what @SpainTrain said 👍 Should we wait on this: atom/apm#376 to be merged into apm before switching to ES6? With this we can remove the I think having compiled files on the repo is a big mistake. |
whoa, I removed the |
That would certainly be safer, but not strictly required to remove the compiled assets from source control. Another option would be to have CI perform publishing. The way this would work is that you add the following directive to a commit message (or PR merge message):
and CI would build, bump, and publish after tests ran successfully. I use this approach for my work projects because humans aren't to be trusted X-D (See https://github.com/LiveSafe/gulp-html5-lint for an example) |
Exactly, doing the same at work 👍 |
I rather like that idea, prevents somebody from accidentally releasing a version that isn't passing tests. |
Ugh, FYI I will need to change my approach. I was under the impression that apm used a repo of tarballs like npm, but it is just a repo of git pointers like bower (https://github.com/atom/apm#relation-to-npm). Barf. I will need to figure out a way to get the built assets into a release tag. I may have it:
It pollutes the git log, but keeps assets out of the repo in stable state. Any thoughts? |
Are you sure it isn't just using the auto-generated downloads from GitHub releases? |
Right, but the problem is the same, I think, since those tarballs are created from the tagged commit |
I suppose we could overwrite the files immediately after the publish occurs, but that seems dodgy. |
Oh this is ugly, but seems to be the way bower people do this: https://github.com/walmartlabs/grunt-release-component So far it's looking like waiting on atom/apm#376 is the best option if we don't want the compiled files in the repository (which we don't!). I'm really hoping I'm misunderstanding something here... |
It is unclear what atom/apm#376 buys us other than some sugar? With that feature we would build in a pre-publish hook and delete assets in a post-publish hook. Without that feature, we just do those steps in the CI config. Am I missing a feature of that PR? |
Hmmm, I assumed that let us get around the issue somehow... just looked into it and it really doesn't get us anything. |
a1371c4
to
a386c09
Compare
so I did some investigation about the overhead of IPC calls, turns out it's almost none after the first call, see https://github.com/steelbrain/benchmark-ipc#inter-process |
Also, this PR is too large, I've decided to create a branch on this repo and do stuff one-by-one to make the review easier |
Instead of having two helper files, one in ES5 and one in ES6, I decided to move all to babel and use ucompiler to compile them
How to set the new env up
How to compile the source files
EDIT
Now
npm i
in the project directory should install all needed deps.Commands
Compile:
Publish:
(publishing will always build a clean version of the assets)