Skip to content

Commit 249e7fd

Browse files
authored
refactor: use webpack defaults (#162)
* Rename index.test.js to loader.test.js * Move test/tools/runCreateSpec.js to test/helpers/createSpec.js. * Use safer less binary path in createSpec.js * Move less and css folder into fixtures * Refactor test node_modules * Refactor createSpec and update fixtures * Remove unnecessary ignore * Add gitignore to test/output * Add webpack-defaults tooling * Update package.json and yarn.lock * Move loader files from lib into src * Fix linting errors in loader files * Update createSpec * Update tests to jest * Format .babelrc * Ignore test/fixtures/css and test/output * Simplify url-path tests * Add pretest script to travis.yml
1 parent 5777f31 commit 249e7fd

File tree

165 files changed

+4234
-29063
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+4234
-29063
lines changed

.babelrc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"presets": [
3+
[
4+
"env",
5+
{
6+
"modules": false,
7+
"useBuiltIns": true,
8+
"targets": {
9+
"node": 4.3
10+
},
11+
"exclude": [
12+
"transform-async-to-generator",
13+
"transform-regenerator"
14+
]
15+
}
16+
]
17+
],
18+
"plugins": [
19+
[
20+
"transform-object-rest-spread",
21+
{
22+
"useBuiltIns": true
23+
}
24+
]
25+
],
26+
"env": {
27+
"test": {
28+
"presets": [
29+
"env"
30+
]
31+
}
32+
}
33+
}

.editorconfig

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
# This file is for unifying the coding style for different editors and IDEs.
2-
# More information at http://EditorConfig.org
3-
4-
# No .editorconfig files above the root directory
1+
# editorconfig.org
52
root = true
63

74
[*]
8-
indent_style = space
9-
indent_size = 4
105
charset = utf-8
11-
trim_trailing_whitespace = true
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
129
insert_final_newline = true
10+
trim_trailing_whitespace = true
1311

1412
[package.json]
1513
indent_size = 2
14+
15+
[.md]
16+
insert_final_newline = false
17+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ test/output
33

44
# Fake node_modules folder for tests
55
test/node_modules
6+
7+
/node_modules
8+
/dist

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "webpack"
3+
}

.eslintrc.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
yarn.lock -diff
2+
3+
* text=auto
4+
bin/* eol=lf

.github/ISSUE_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
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+
2. If the issue is still there, write a minimal project showing the problem and expected output.
3+
3. Link to the project and mention Node version and OS in your report.
4+
5+
**IMPORTANT! You should use [Stack Overflow](https://stackoverflow.com/) for support related questions.**

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!--
2+
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.
3+
2. Check out the [development guide](https://webpack.js.org/development/) for the API and development guidelines.
4+
3. Read through the PR diff carefully as sometimes this can reveal issues. The work will be reviewed, but this can save some effort.
5+
-->

.gitignore

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,25 @@ lib-cov
66
*.out
77
*.pid
88
*.gz
9-
109
pids
1110
logs
1211
results
13-
1412
npm-debug.log
1513
/node_modules
16-
coverage
14+
/coverage
1715
.idea
1816
.nyc_output
19-
test/output
17+
npm-debug.log*
18+
yarn-debug.log*
19+
.eslintcache
20+
/coverage
21+
/dist
22+
/local
23+
/reports
24+
/test/fixtures/css
25+
/test/output
26+
.DS_Store
27+
Thumbs.db
28+
.vscode
29+
*.sublime-project
30+
*.sublime-workspace

.nycrc

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)