Convert code to ES6 and add a transpile build step #109

Closed
opened 2018-01-19 01:09:05 -05:00 by BehindTheMath · 10 comments
BehindTheMath commented 2018-01-19 01:09:05 -05:00 (Migrated from github.com)

As mentioned here, I think this should wait until we finish fixing all the existing issues, so we don't cause any conflicts.

As mentioned [here](https://github.com/MoOx/pjax/pull/107#issuecomment-358875884), I think this should wait until we finish fixing all the existing issues, so we don't cause any conflicts.
robinnorth commented 2018-01-19 05:59:39 -05:00 (Migrated from github.com)

This sounds sensible, if this still ends up using Browserify with the addition of the Babelify transform, you could add the following topackage.json to allow people bundling the npm package through Browserify (my usage) to get transpiled output as well (Browserify won't transform anything under node_modules by default):

{
  "browserify": {
    "transform": ["babelify"]
  }
}
This sounds sensible, if this still ends up using Browserify with the addition of the Babelify transform, you could add the following to`package.json` to allow people bundling the npm package through Browserify (my usage) to get transpiled output as well (Browserify won't transform anything under `node_modules` by default): ```json { "browserify": { "transform": ["babelify"] } } ```
MoOx commented 2018-01-22 02:12:54 -05:00 (Migrated from github.com)

Another possibility is to include in npm package compiled files (but ignore those in git).

Another possibility is to include in npm package compiled files (but ignore those in git).
phifa commented 2018-02-06 03:44:12 -05:00 (Migrated from github.com)

Webpack?

Webpack?
BehindTheMath commented 2018-02-07 09:13:48 -05:00 (Migrated from github.com)

@phifa I believe Webpack is overkill for a library like Pjax. Webpack is more suited for a webapp with different types of assets or multiple entry points. For Pjax, Babel and Browserify should be fine.

@phifa I believe Webpack is overkill for a library like Pjax. Webpack is more suited for a webapp with different types of assets or multiple entry points. For Pjax, Babel and Browserify should be fine.
MoOx commented 2018-02-07 09:20:30 -05:00 (Migrated from github.com)

Rollup should be a good candidate.

Rollup should be a good candidate.
BehindTheMath commented 2018-02-07 09:23:03 -05:00 (Migrated from github.com)

Do we even need Rollup?

Do we even need Rollup?
MoOx commented 2018-02-07 09:23:38 -05:00 (Migrated from github.com)

I just know that Rollup is nice for library authors

I just know that Rollup is nice for library authors
BehindTheMath commented 2018-02-07 09:24:46 -05:00 (Migrated from github.com)

True. I'll have to look into the differences between Rollup and Browserify.

True. I'll have to look into the differences between Rollup and Browserify.
BehindTheMath commented 2019-03-03 12:42:30 -05:00 (Migrated from github.com)

@MoOx What browserlist settings do you think we should use for Babel?

@MoOx What browserlist settings do you think we should use for Babel?
MoOx commented 2019-03-04 01:17:10 -05:00 (Migrated from github.com)

No idea what is best to use. Keep defaults?

No idea what is best to use. Keep defaults?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#109