Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

Commit

Permalink
refactor: apply webpack-defaults (#41)
Browse files Browse the repository at this point in the history
 - Applies webpack-defaults upgrades
 - Converts tests over to Jest
 - Updates to es6 syntax w/ ES Modules
 - Adds a commonjs proxy to main

BREAKING CHANGE: Enforces a minimum NodeJS version of `4.3` via engines & drops support for Webpack v1.x.
  • Loading branch information
joshwiens committed May 1, 2017
1 parent 89155e1 commit c8621a1
Show file tree
Hide file tree
Showing 21 changed files with 4,925 additions and 171 deletions.
35 changes: 35 additions & 0 deletions .babelrc
@@ -0,0 +1,35 @@
{
"presets": [
[
"env",
{
"useBuiltIns": true,
"targets": {
"node": 4.3
},
"exclude": [
"transform-async-to-generator",
"transform-regenerator"
]
}
]
],
"plugins": [
[
"transform-object-rest-spread",
{
"useBuiltIns": true
}
]
],
"env": {
"test": {
"presets": [
"env"
],
"plugins": [
"transform-object-rest-spread"
]
}
}
}
15 changes: 12 additions & 3 deletions .editorconfig
@@ -1,5 +1,14 @@
# editorconfig.org
root = true

[*.js]
indent_style=tab
trim_trailing_whitespace=true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[.md]
insert_final_newline = false
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .eslintignore
@@ -0,0 +1,2 @@
/node_modules
/dist
14 changes: 14 additions & 0 deletions .eslintrc
@@ -0,0 +1,14 @@
{
"extends": "webpack",
"rules": {
"import/no-unresolved": 0,
"import/extensions": 0,
"no-plusplus": 1,
"consistent-return": 1,
"no-multi-assign": 1,
"no-param-reassign": 1,
"prefer-destructuring": 1,
"no-nested-ternary": 1,
"prefer-rest-params": 1
}
}
3 changes: 3 additions & 0 deletions .gitattributes
@@ -0,0 +1,3 @@
yarn.lock -diff
* text=auto
bin/* eol=lf
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE.md
@@ -0,0 +1,5 @@
1. Check the version of package you are using. If it's not the newest version, update and try again (see changelog while updating!).
2. If the issue is still there, write a minimal project showing the problem and expected output.
3. Link to the project and mention Node version and OS in your report.

**IMPORTANT! You should use [Stack Overflow](https://stackoverflow.com/) for support related questions.**
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,5 @@
<!--
1. [Read and sign the CLA](https://cla.js.foundation/webpack/webpack.js.org). This needs to be done only once. PRs that haven't signed it won't be accepted.
2. Check out the [development guide](https://webpack.js.org/development/) for the API and development guidelines.
3. Read through the PR diff carefully as sometimes this can reveal issues. The work will be reviewed, but this can save some effort.
-->
16 changes: 16 additions & 0 deletions .gitignore
@@ -0,0 +1,16 @@
logs
*.log
npm-debug.log*
yarn-debug.log*
.eslintcache
/coverage
/dist
/local
/reports
/node_modules
.DS_Store
Thumbs.db
.idea
.vscode
*.sublime-project
*.sublime-workspace
32 changes: 32 additions & 0 deletions .travis.yml
@@ -0,0 +1,32 @@
sudo: false
language: node_js
branches:
only:
- master
matrix:
fast_finish: true
include:
- os: linux
node_js: '7'
env: WEBPACK_VERSION="2.2.0" JOB_PART=lint
- os: linux
node_js: '4.3'
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
- os: linux
node_js: '6'
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
- os: linux
node_js: '7'
env: WEBPACK_VERSION="2.2.0" JOB_PART=coverage
before_install:
- nvm --version
- node --version
before_script:
- |-
if [ "$WEBPACK_VERSION" ]; then
yarn add webpack@^$WEBPACK_VERSION
fi
script:
- 'yarn run travis:$JOB_PART'
after_success:
- 'bash <(curl -s https://codecov.io/bash)'
11 changes: 11 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,11 @@
# Change Log

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

x.x.x / <year>-<month>-<day>
==================

* Bug fix -
* Feature -
* Chore -
* Docs -
1 change: 0 additions & 1 deletion LICENSE
@@ -1,4 +1,3 @@

Copyright JS Foundation and other contributors

Permission is hereby granted, free of charge, to any person obtaining
Expand Down
35 changes: 0 additions & 35 deletions MissingLocalizationError.js

This file was deleted.

9 changes: 8 additions & 1 deletion README.md
@@ -1,5 +1,7 @@
[![npm][npm]][npm-url]
[![deps][deps]][deps-url]
[![test][test]][test-url]
[![coverage][cover]][cover-url]
[![chat][chat]][chat-url]

<div align="center">
Expand Down Expand Up @@ -69,7 +71,6 @@ plugins: [
<tbody>
</table>


[npm]: https://img.shields.io/npm/v/i18n-webpack-plugin.svg
[npm-url]: https://npmjs.com/package/i18n-webpack-plugin

Expand All @@ -78,3 +79,9 @@ plugins: [

[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg
[chat-url]: https://gitter.im/webpack/webpack

[test]: http://img.shields.io/travis/webpack-contrib/i18n-webpack-plugin.svg
[test-url]: https://travis-ci.org/webpack-contrib/i18n-webpack-plugin

[cover]: https://codecov.io/gh/webpack-contrib/i18n-webpack-plugin/branch/master/graph/badge.svg
[cover-url]: https://codecov.io/gh/webpack-contrib/i18n-webpack-plugin
123 changes: 0 additions & 123 deletions index.js

This file was deleted.

0 comments on commit c8621a1

Please sign in to comment.