webpack-modernizr-loader
Advanced tools
Comparing version
@@ -0,3 +1,13 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
# 1.0.1 | ||
- Fixed: resolved configuration file only if file passed. | ||
# 1.0.0 | ||
Initial release. | ||
- Chore: initial public release. |
@@ -56,4 +56,4 @@ /* eslint-disable strict, import/no-commonjs */ | ||
} | ||
} else { | ||
externalConfig = resolveConfig && isJSON(resolveConfig) | ||
} else if (resolveConfig) { | ||
externalConfig = isJSON(resolveConfig) | ||
? JSON.parse(resolveConfig) | ||
@@ -63,8 +63,5 @@ : this.exec(resolveConfig, this.resource); | ||
const config = Object.assign( | ||
{}, | ||
externalConfig | ||
); | ||
const config = Object.assign({}, externalConfig); | ||
modernizr.build(config, (output) => callback(null, wrapOutput(output))); | ||
}; |
{ | ||
"name": "webpack-modernizr-loader", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Get your modernizr build bundled with webpack, use modernizr with webpack easily", | ||
@@ -28,3 +28,3 @@ "repository": { | ||
"devDependencies": { | ||
"ava": "^0.16.0", | ||
"ava": "^0.17.0", | ||
"ajv-cli": "^1.1.0", | ||
@@ -35,8 +35,8 @@ "babel-preset-es2015": "^6.14.0", | ||
"eslint": "^3.4.0", | ||
"eslint-plugin-ava": "^3.0.0", | ||
"eslint-plugin-ava": "^4.0.0", | ||
"eslint-plugin-import": "^2.0.0", | ||
"eslint-plugin-itgalaxy": "^23.0.0", | ||
"eslint-plugin-jsx-a11y": "^2.2.0", | ||
"eslint-plugin-itgalaxy": "^33.0.0", | ||
"eslint-plugin-jsx-a11y": "^3.0.2", | ||
"eslint-plugin-lodash": "^2.1.0", | ||
"eslint-plugin-node": "^2.0.0", | ||
"eslint-plugin-node": "^3.0.5", | ||
"eslint-plugin-promise": "^3.0.0", | ||
@@ -47,9 +47,10 @@ "eslint-plugin-react": "^6.2.0", | ||
"npm-run-all": "^3.0.0", | ||
"nyc": "^8.1.0", | ||
"nyc": "^10.0.0", | ||
"package-schema": "^1.0.0", | ||
"remark-cli": "^2.0.0", | ||
"remark-lint": "^5.0.0", | ||
"remark-preset-lint-itgalaxy": "^2.0.0", | ||
"remark-preset-lint-itgalaxy": "^3.0.0", | ||
"webpack": "^1.13.2", | ||
"temp": "^0.8.3" | ||
"tmp": "^0.0.31", | ||
"pify": "^2.3.0" | ||
}, | ||
@@ -56,0 +57,0 @@ "scripts": { |
@@ -60,3 +60,3 @@ # webpack-modernizr-loader | ||
```javascript | ||
```js | ||
module.exports = { | ||
@@ -81,3 +81,3 @@ module: { | ||
```javascript | ||
```js | ||
module.exports = { | ||
@@ -87,4 +87,4 @@ module: { | ||
{ | ||
loader: `figlet?config=${encodeURI(JSON.stringify(figletConfig))}`, | ||
test: /figlet$/ | ||
loader: `modernizr?config=${encodeURI(JSON.stringify(modernizrConfig))}`, | ||
test: /modernizr$/ | ||
} | ||
@@ -95,3 +95,3 @@ ] | ||
alias: { | ||
figlet$: path.resolve(__dirname, "path/to/empty-file") // You can add comment "Please do not delete this file" in this file | ||
modernizr$: path.resolve(__dirname, "path/to/empty-file") // You can add comment "Please do not delete this file" in this file | ||
} | ||
@@ -110,3 +110,3 @@ } | ||
```javscript | ||
```js | ||
import 'modernizr'; | ||
@@ -117,3 +117,3 @@ ``` | ||
```javscript | ||
```js | ||
import modernizrLoader from 'bundle?lazy!modernizr'; | ||
@@ -130,3 +130,3 @@ | ||
Don't hesitate to create a pull request. Every contribution is appreciated. | ||
Feel free to push your code if you agree with publishing under the MIT license. | ||
@@ -133,0 +133,0 @@ ## [Changelog](CHANGELOG.md) |
8821
2.67%25
4.17%52
-5.45%