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

feat: refactored to support node/browser targets using babel #1423

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
["@babel/env", {
"targets": {
"node": "8.8.1",
"browsers": [ "> 1%", "last 2 versions", "ie >= 9" ]

Choose a reason for hiding this comment

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

Nit: is there a way to use the .browserlistrc file here so we don't have duplicated config?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is not

}
}]
]
}
5 changes: 5 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Browsers that we support

> 1%
last 2 versions
ie >= 9
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"env": { "browser": true" },
"plugins": ["compat"],
"rules": { "compat/compat": "error" },
"settings": { "polyfills": [ "promises" ] }
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
build
lib-cov
coverage.html
.DS_Store
node_modules
*.sock
test.js
components
test/node/fixtures/tmp.json
.idea
superagent.js
package-lock.json
package-lock.json

Choose a reason for hiding this comment

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

Nit: while not a change you made, package-lock.json should absolutely be being committed to the codebase.

.DS_Store
*.log
.idea
node_modules
coverage
.nyc_output
lib
dist
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ examples
lib-cov
coverage.html
bower.json
.nyc_output
coverage

Choose a reason for hiding this comment

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

Nit: I don't think this file isn't being used because we already specify the files directive in package.json.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had a scenario which happened multiple times (and I reported to NPM) where despite files and being in .gitignore, NPM tarball contained these folders, so it was just a safe guard.

3 changes: 3 additions & 0 deletions .remarkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONTRIBUTING.md

Choose a reason for hiding this comment

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

Does this repo use Remark?

Copy link
Collaborator Author

@niftylettuce niftylettuce Jan 11, 2019

Choose a reason for hiding this comment

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

It is now using it (via my PR), I have to update the contributors block still, it's pretty cool - gets read from contributors in package.json and automatically added to README.md in the # Contributors section.

HISTORY.md
docs
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
sudo: false
language: node_js
node_js:
- "10"
- "8"
- "6"

- '8'
- '10'
script:
npm run test-coverage
after_success:
npm run coverage
env:
global:
- SAUCE_USERNAME='shtylman-superagent'
- SAUCE_ACCESS_KEY='39a45464-cb1d-4b8d-aa1f-83c7c04fa673'

matrix:
include:
- node_js: "9"
Expand Down
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
When submitting a PR, your chance of acceptance increases if you do the following:

* Code style is consistent with existing in the file.
* Tests are passing (client and server).
* You add a test for the failing issue you are fixing.
* Code changes are focused on the area of discussion.
* Do not rebuild the distribution files or increment version numbers.


## Contributors

| Name | Website |
| ------------------- | -------------------------- |
| **TJ Holowaychuk** | <http://tjholowaychuk.com> |
| **Kornel Lesiński** | |
| **Peter Lyons** | |
| **Hunter Loftis** | |
| **Nick Baugh** | |
7 changes: 0 additions & 7 deletions Contributing.md

This file was deleted.

Loading