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

refactor(package): apply webpack-defaults #340

Merged
merged 3 commits into from
Sep 1, 2018
Merged

refactor(package): apply webpack-defaults #340

merged 3 commits into from
Sep 1, 2018

Conversation

ryanclark
Copy link
Collaborator

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the new behavior?

Refactor the development scripts and update development dependencies.

  • Changes the eslint configuration to use webpack's config and update the source code so there are no eslint errors (warnings remain for another PR)
  • Update dependencies
  • Remove test:integration npm script as it doesn't work and isn't used anywhere
  • Simplify the npm scripts
  • Simplify the travis configuration

Does this PR introduce a breaking change?

  • Yes
  • No

src/index.js Outdated
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
MIT License http://www.opensource.org/licenses/mit-license.php
Copy link
Contributor

Choose a reason for hiding this comment

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

This can comment can be removed since the LICENSE file is in the repo and we are now using the JS Foundation License (MIT Variant)

.travis.yml Outdated
@@ -12,21 +12,21 @@ jobs:
- &test-latest
Copy link
Contributor

Choose a reason for hiding this comment

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

Travis CI is disabled for webpack-contrib as we switched to CircleCI a while ago, the new config is here https://github.com/webpack-contrib/webpack-defaults/tree/master/templates/.circleci. Please remove the .travis.yml and add the CircleCi Config under .circleci/config.yml

package.json Outdated
@@ -16,11 +16,7 @@
"lint": "eslint --cache src test",
"clean": "del-cli lib",
"build": "cross-env NODE_ENV=production babel src -d lib --ignore 'src/**/*.test.js' --copy-files",
"test": "mocha --compilers js:babel-register --full-trace --check-leaks test/unit",
"test:integration": "npm run build && karma start --single-run",
"travis": "npm run test && npm run test:integration",
Copy link
Contributor

Choose a reason for hiding this comment

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

For CircleCI to work you will need the following scripts

"ci:lint": "npm run lint"
"ci:test": "npm run test"

package.json Outdated
"cross-env": "^5.2.0",
"del-cli": "^1.1.0",
"eslint": "^5.4.0",
"eslint-config-webpack": "^1.2.5",
Copy link
Contributor

Choose a reason for hiding this comment

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

The latest (>= v2.0.0) config is under @webpack-contrib/eslint-config-webpack now

.babelrc Outdated
]
}
}
"presets": ["@babel/preset-env"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Does preset-env read the target from pkg.engines now? Minimium is node >= v6.0.0 in case you need it

@michael-ciniawsky michael-ciniawsky changed the title refactor: update development scripts and dependencies refactor(package): update scripts and dependencies Sep 1, 2018
@michael-ciniawsky michael-ciniawsky added this to the 4.0.0 milestone Sep 1, 2018
var sourceNode
var id = this.options.name
module.exports = function (content, map) {
this.cacheable();
Copy link
Contributor

Choose a reason for hiding this comment

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

This is no longer necessary and can be removed as loaders are cached by default since webpack >= v2.0.0

use webpack-defaults, change the tests to jest (and remove unneeded test)
README.md Outdated
@@ -1,10 +1,3 @@
[![npm][npm]][npm-url]
Copy link
Contributor

Choose a reason for hiding this comment

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

Please leave the README as is the template there is not up-to date and will change

@michael-ciniawsky
Copy link
Contributor

CircleCI is not setup up here and I can't enable it in the UI (seems missing permissions), I will check out what's going on there...

package.json Outdated
"engines": {
"node": ">= 6.9.0"
"node": ">= 6.9.0 <7.0.0 || >= 8.9.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Relax this to "node": ">= 6" please

@michael-ciniawsky michael-ciniawsky changed the title refactor(package): update scripts and dependencies refactor(package): apply webpack-defaults Sep 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants