Skip to content

Commit 5e1aadb

Browse files
author
Anthony Du Pont
committed
🔥 Clean up Webpack and Modules
1 parent 5cc4af3 commit 5e1aadb

File tree

23 files changed

+119
-245
lines changed

23 files changed

+119
-245
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["env"]
3+
}

dist/highway.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ class Renderer {
282282
});
283283
}
284284
}
285+
285286
// CONCATENATED MODULE: ./src/helpers.js
286287
/**
287288
* @file Highway helper methods used all acrosse the script.
@@ -432,6 +433,7 @@ class helpers_Helpers {
432433
return transitions[slug];
433434
}
434435
}
436+
435437
// CONCATENATED MODULE: ./src/core.js
436438
/**
437439
* @file Highway core that handle all history stuffs.
@@ -524,7 +526,7 @@ class core_Core extends tiny_emitter_default.a {
524526
// Use the bubbling principle from document to all children and catch
525527
// only the link elements without target and that are not pointing to an anchor
526528
// on the page.
527-
document.addEventListener('click', event => {
529+
document.addEventListener('click', (event) => {
528530
if (event.target.tagName === 'A') {
529531
// We get the anchor and the pathname of the link that the user clicked
530532
// in order to compare it with the current state and handle the `click`
@@ -540,6 +542,7 @@ class core_Core extends tiny_emitter_default.a {
540542
if (!this.navigating && pathname !== this.state.pathname) {
541543
// Now push the state!
542544
this.pushState(event);
545+
543546
} else {
544547
// If the pathnames are the same there might be an anchor appended to
545548
// it so we need to check it and reload the page to use the default
@@ -679,6 +682,7 @@ class core_Core extends tiny_emitter_default.a {
679682
this.From = this.To;
680683
}
681684
}
685+
682686
// CONCATENATED MODULE: ./src/transition.js
683687
/**
684688
* @file Highway default transition that handle DOM animations.
@@ -729,6 +733,7 @@ class Transition {
729733
});
730734
}
731735
}
736+
732737
// CONCATENATED MODULE: ./src/index.js
733738
/**
734739
* @file Highway object containing all parts of the script.
@@ -746,6 +751,7 @@ class Transition {
746751
Transition: Transition
747752
});
748753

754+
749755
/***/ })
750756
/******/ ]);
751757
});

examples/basic-anchor/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
"test": "echo \"Error: no test specified\" && exit 1"
1010
},
1111
"devDependencies": {
12-
"babel-core": "^6.26.0",
13-
"babel-loader": "^7.1.4",
1412
"webpack": "^4.1.1",
1513
"webpack-cli": "^2.0.12"
1614
}

examples/basic-anchor/webpack.config.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@ module.exports = {
1212
path: path.resolve(__dirname, 'dist'),
1313
filename: 'index.js'
1414
},
15-
module: {
16-
rules: [
17-
{
18-
test: /\.js$/,
19-
exclude: /node_modules/,
20-
use: {
21-
loader: 'babel-loader'
22-
}
23-
}
24-
]
25-
},
2615
resolve: {
2716
modules: ['.', 'node_modules'],
2817
extensions: ['.js']

examples/basic-anchor/yarn.lock

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -367,14 +367,6 @@ babel-helpers@^6.24.1:
367367
babel-runtime "^6.22.0"
368368
babel-template "^6.24.1"
369369

370-
babel-loader@^7.1.4:
371-
version "7.1.4"
372-
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.4.tgz#e3463938bd4e6d55d1c174c5485d406a188ed015"
373-
dependencies:
374-
find-cache-dir "^1.0.0"
375-
loader-utils "^1.0.2"
376-
mkdirp "^0.5.1"
377-
378370
babel-messages@^6.23.0:
379371
version "6.23.0"
380372
resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
@@ -2669,7 +2661,7 @@ loader-runner@^2.3.0:
26692661
version "2.3.0"
26702662
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"
26712663

2672-
loader-utils@^1.0.2, loader-utils@^1.1.0:
2664+
loader-utils@^1.1.0:
26732665
version "1.1.0"
26742666
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd"
26752667
dependencies:
@@ -3483,15 +3475,15 @@ read-pkg@^3.0.0:
34833475
path-type "^3.0.0"
34843476

34853477
"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5:
3486-
version "2.3.5"
3487-
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.5.tgz#b4f85003a938cbb6ecbce2a124fb1012bd1a838d"
3478+
version "2.3.6"
3479+
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
34883480
dependencies:
34893481
core-util-is "~1.0.0"
34903482
inherits "~2.0.3"
34913483
isarray "~1.0.0"
34923484
process-nextick-args "~2.0.0"
34933485
safe-buffer "~5.1.1"
3494-
string_decoder "~1.0.3"
3486+
string_decoder "~1.1.1"
34953487
util-deprecate "~1.0.1"
34963488

34973489
readdirp@^2.0.0:
@@ -4015,18 +4007,12 @@ string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1:
40154007
is-fullwidth-code-point "^2.0.0"
40164008
strip-ansi "^4.0.0"
40174009

4018-
string_decoder@^1.0.0:
4010+
string_decoder@^1.0.0, string_decoder@~1.1.1:
40194011
version "1.1.1"
40204012
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
40214013
dependencies:
40224014
safe-buffer "~5.1.0"
40234015

4024-
string_decoder@~1.0.3:
4025-
version "1.0.3"
4026-
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab"
4027-
dependencies:
4028-
safe-buffer "~5.1.0"
4029-
40304016
stringstream@~0.0.4:
40314017
version "0.0.5"
40324018
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"

examples/basic-css-transition/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
"test": "echo \"Error: no test specified\" && exit 1"
1010
},
1111
"devDependencies": {
12-
"babel-core": "^6.26.0",
13-
"babel-loader": "^7.1.4",
1412
"webpack": "^4.1.1",
1513
"webpack-cli": "^2.0.12"
1614
}

examples/basic-css-transition/webpack.config.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@ module.exports = {
1212
path: path.resolve(__dirname, 'dist'),
1313
filename: 'index.js'
1414
},
15-
module: {
16-
rules: [
17-
{
18-
test: /\.js$/,
19-
exclude: /node_modules/,
20-
use: {
21-
loader: 'babel-loader'
22-
}
23-
}
24-
]
25-
},
2615
resolve: {
2716
modules: ['.', 'node_modules'],
2817
extensions: ['.js']

examples/basic-css-transition/yarn.lock

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -367,14 +367,6 @@ babel-helpers@^6.24.1:
367367
babel-runtime "^6.22.0"
368368
babel-template "^6.24.1"
369369

370-
babel-loader@^7.1.4:
371-
version "7.1.4"
372-
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.4.tgz#e3463938bd4e6d55d1c174c5485d406a188ed015"
373-
dependencies:
374-
find-cache-dir "^1.0.0"
375-
loader-utils "^1.0.2"
376-
mkdirp "^0.5.1"
377-
378370
babel-messages@^6.23.0:
379371
version "6.23.0"
380372
resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
@@ -2669,7 +2661,7 @@ loader-runner@^2.3.0:
26692661
version "2.3.0"
26702662
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"
26712663

2672-
loader-utils@^1.0.2, loader-utils@^1.1.0:
2664+
loader-utils@^1.1.0:
26732665
version "1.1.0"
26742666
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd"
26752667
dependencies:
@@ -3483,15 +3475,15 @@ read-pkg@^3.0.0:
34833475
path-type "^3.0.0"
34843476

34853477
"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5:
3486-
version "2.3.5"
3487-
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.5.tgz#b4f85003a938cbb6ecbce2a124fb1012bd1a838d"
3478+
version "2.3.6"
3479+
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
34883480
dependencies:
34893481
core-util-is "~1.0.0"
34903482
inherits "~2.0.3"
34913483
isarray "~1.0.0"
34923484
process-nextick-args "~2.0.0"
34933485
safe-buffer "~5.1.1"
3494-
string_decoder "~1.0.3"
3486+
string_decoder "~1.1.1"
34953487
util-deprecate "~1.0.1"
34963488

34973489
readdirp@^2.0.0:
@@ -4015,18 +4007,12 @@ string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1:
40154007
is-fullwidth-code-point "^2.0.0"
40164008
strip-ansi "^4.0.0"
40174009

4018-
string_decoder@^1.0.0:
4010+
string_decoder@^1.0.0, string_decoder@~1.1.1:
40194011
version "1.1.1"
40204012
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
40214013
dependencies:
40224014
safe-buffer "~5.1.0"
40234015

4024-
string_decoder@~1.0.3:
4025-
version "1.0.3"
4026-
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab"
4027-
dependencies:
4028-
safe-buffer "~5.1.0"
4029-
40304016
stringstream@~0.0.4:
40314017
version "0.0.5"
40324018
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"

examples/basic-google-analytics/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
"test": "echo \"Error: no test specified\" && exit 1"
1010
},
1111
"devDependencies": {
12-
"babel-core": "^6.26.0",
13-
"babel-loader": "^7.1.4",
1412
"webpack": "^4.1.1",
1513
"webpack-cli": "^2.0.12"
1614
}

examples/basic-google-analytics/webpack.config.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@ module.exports = {
1212
path: path.resolve(__dirname, 'dist'),
1313
filename: 'index.js'
1414
},
15-
module: {
16-
rules: [
17-
{
18-
test: /\.js$/,
19-
exclude: /node_modules/,
20-
use: {
21-
loader: 'babel-loader'
22-
}
23-
}
24-
]
25-
},
2615
resolve: {
2716
modules: ['.', 'node_modules'],
2817
extensions: ['.js']

0 commit comments

Comments
 (0)