Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.
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
35 changes: 35 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org

[*]
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/dist
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "webpack"
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
yarn.lock -diff
* text=auto
bin/* eol=lf
18 changes: 4 additions & 14 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
<!-- Before creating an issue please make sure you are using the latest version of file-loader. -->
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.

**Do you want to request a *feature* or report a *bug*?**
<!-- Please ask questions on StackOverflow or the webpack Gitter (https://gitter.im/webpack/webpack). Questions will be closed. -->

**What is the current behavior?**

**If the current behavior is a bug, please provide the steps to reproduce.**
<!-- A great way to do this is to provide your configuration via a GitHub gist. -->

**What is the expected behavior?**

**If this is a feature request, what is motivation or use case for changing the behavior?**

**Please mention other relevant information such as your webpack version, Node.js version and Operating System.**
**IMPORTANT! You should use [Stack Overflow](https://stackoverflow.com/) for support related questions.**
23 changes: 5 additions & 18 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->

**What kind of change does this PR introduce?**
<!-- E.g. a bugfix, feature, refactoring, build related change, etc… -->

**Did you add tests for your changes?**

**If relevant, did you update the README?**

**Summary**

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
<!-- Try to link to an open issue for more information. -->

**Does this PR introduce a breaking change?**
<!-- If this PR introduces a breaking change, please describe the impact and a migration path for existing applications. -->

**Other information**
<!--
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.
-->
20 changes: 14 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# development
/node_modules
/coverage
*.log

# dotfiles
.*
!.gitignore
*~
*#*
logs
*.log
npm-debug.log*
yarn-debug.log*
.eslintcache
/dist
/local
/reports
.DS_Store
Thumbs.db
.idea
.vscode
*.sublime-project
*.sublime-workspace
25 changes: 14 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,27 @@ branches:
matrix:
fast_finish: true
include:
# - os: linux
# node_js: "7"
# env: WEBPACK_VERSION="2.2.0" JOB_PART=lint
- os: linux
node_js: "6"
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
node_js: '7'
env: WEBPACK_VERSION="2.2.0" JOB_PART=lint
- os: linux
node_js: "4.3"
node_js: '4.3'
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
- os: linux
node_js: "7"
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 npm install webpack@^$WEBPACK_VERSION; fi'
- |-
if [ "$WEBPACK_VERSION" ]; then
yarn add webpack@^$WEBPACK_VERSION
fi
script:
- npm run travis:$JOB_PART
# after_success:
# - bash <(curl -s https://codecov.io/bash)
- 'yarn run travis:$JOB_PART'
after_success:
- 'bash <(curl -s https://codecov.io/bash)'
83 changes: 0 additions & 83 deletions index.js

This file was deleted.

54 changes: 46 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,48 @@
"author": "Tobias Koppers @sokra",
"description": "file loader module for webpack",
"files": [
"index.js"
"dist"
],
"dependencies": {
"loader-utils": "^1.0.2"
},
"devDependencies": {
"should": "~4.0.4",
"babel-cli": "^6.23.0",
"babel-jest": "^19.0.0",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-polyfill": "^6.23.0",
"babel-preset-env": "^1.2.0",
"cross-env": "^3.2.3",
"del-cli": "^0.2.1",
"eslint": "^3.17.0",
"eslint-config-webpack": "^1.0.0",
"eslint-plugin-import": "^2.2.0",
"jest": "^19.0.2",
"lint-staged": "^3.3.1",
"nodemon": "^1.11.0",
"nsp": "^2.6.2",
"pre-commit": "^1.2.2",
"standard-version": "^4.0.0",
"mocha": "~1.21.3"
"webpack-defaults": "^0.4.5"
},
"scripts": {
"test": "mocha -R spec",
"travis:test": "npm run test",
"release": "standard-version"
"test": "jest",
"travis:test": "yarn run test",
"release": "yarn run standard-version",
"webpack-defaults": "webpack-defaults",
"prepublish": "yarn run build",
"prebuild": "yarn run clean:dist",
"build": "cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js'",
"clean:dist": "del-cli dist",
"start": "yarn run serve:dev src",
"serve:dev": "nodemon $2 --exec babel-node",
"lint": "eslint --cache src test",
"security": "nsp check",
"test:coverage": "jest --collectCoverageFrom='src/**/*.js' --coverage",
"travis:coverage": "yarn run test:coverage",
"travis:lint": "yarn run lint && yarn run security",
"lint-staged": "lint-staged",
"test:watch": "jest --watch"
},
"repository": {
"type": "git",
Expand All @@ -27,9 +55,19 @@
"url": "https://github.com/webpack/file-loader/issues"
},
"homepage": "https://github.com/webpack/file-loader",
"main": "index.js",
"main": "dist/cjs.js",
"directories": {
"test": "test"
},
"license": "MIT"
"license": "MIT",
"engines": {
"node": ">= 4.3 < 5.0.0 || >= 5.10"
},
"pre-commit": "lint-staged",
"lint-staged": {
"*.js": [
"eslint --fix",
"git add"
]
}
}
1 change: 1 addition & 0 deletions src/cjs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./index').default;
Loading