Skip to content

Commit b4c287a

Browse files
author
Barthelemy Bonhomme
committed
chore: yarn setup and exports
1 parent 0a0b119 commit b4c287a

File tree

8 files changed

+3897
-3527
lines changed

8 files changed

+3897
-3527
lines changed

.eslintrc.json

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

.stylelintrc.json

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

.yarn/releases/yarn-4.6.0.cjs

Lines changed: 934 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-4.6.0.cjs

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,10 @@ What this module contains:
5454
## Sizes
5555

5656
Here are the sizes of individual modules, using terser and gzip with default options.
57-
The size increase at [bundlephobia](https://bundlephobia.com/result?p=scroll-snap-slider) between v2 and v3 is due to
58-
the entrypoint changing from 'ScrollSnapSlider' to 'index'.
5957

6058
| Item | minified (terser) | minified + gzipped |
6159
|------------------|-------------------|--------------------|
62-
| complete exports | 8462 B | 2140 B |
60+
| complete exports | 8.4 kB | 2.1 kB |
6361

6462
## Restrictions
6563

hooks/pre-commit

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,24 @@ source "$DIR/../node_modules/.bin/echolorized"
1010

1111
colored_output "$GREEN" "\n[EXECUTING PRE COMMIT HOOK]"
1212

13-
e_info "Removing Console Usage"
14-
1513
DIRECTORIES="src"
1614

17-
e_info "Linting & Fixing JS Code Style"
18-
if ! eslint --fix $(find "$DIRECTORIES" -type f -name '*.js'); then
19-
e_error "JavaScript Error in JavaScript file. Run ${YELLOW}eslint src/**/*.js${RESET} to check."
15+
if grep "console" $(find "$DIRECTORIES" -type f -name '*.ts') > /dev/null; then
16+
e_error "Remove console.log from the code."
2017
exit 1
2118
fi
2219

23-
e_info "Linting & Fixing CSS Code Style"
24-
if ! stylelint --fix $(find "$DIRECTORIES" -type f -name '*.css'); then
25-
e_error "Error in CSS file. Run ${YELLOW}stylelint *.css${RESET} to check."
26-
exit 1
27-
fi
20+
#e_info "Linting & Fixing JS Code Style"
21+
#if ! eslint --fix $(find "$DIRECTORIES" -type f -name '*.js'); then
22+
# e_error "JavaScript Error in JavaScript file. Run ${YELLOW}eslint src/**/*.js${RESET} to check."
23+
# exit 1
24+
#fi
25+
#
26+
#e_info "Linting & Fixing CSS Code Style"
27+
#if ! stylelint --fix $(find "$DIRECTORIES" -type f -name '*.css'); then
28+
# e_error "Error in CSS file. Run ${YELLOW}stylelint *.css${RESET} to check."
29+
# exit 1
30+
#fi
2831

2932
e_info "All good, staging additional changes.\n"
3033
git update-index --again

package.json

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
"module": "dist/scroll-snap-slider.mjs",
1313
"types": "dist/scroll-snap-slider.d.ts",
1414
"style": "dist/scroll-snap-slider.css",
15+
"exports": {
16+
".": {
17+
"types": "./dist/scroll-snap-slider.d.ts",
18+
"import": "./dist/scroll-snap-slider.mjs",
19+
"require": "./dist/scroll-snap-slider.js"
20+
},
21+
"./dist/scroll-snap-slider.css": "./dist/scroll-snap-slider.css"
22+
},
1523
"files": [
1624
"dist"
1725
],
@@ -22,30 +30,17 @@
2230
"repository": "https://github.com/barthy-koeln/scroll-snap-slider",
2331
"author": "Barthy Bonhomme <[email protected]>",
2432
"license": "MIT",
25-
"private": false,
2633
"devDependencies": {
27-
"@types/node": "^20.11.20",
28-
"@typescript-eslint/eslint-plugin": "^7.0.2",
29-
"@typescript-eslint/parser": "^7.0.2",
34+
"@types/node": "^22.13.8",
35+
"@typescript-eslint/eslint-plugin": "^8.25.0",
36+
"@typescript-eslint/parser": "^8.25.0",
3037
"bash-echolorized": "^1.0.1",
31-
"core-js": "^3.36.0",
32-
"eslint": "^8.57.0",
33-
"eslint-config-standard": "^17.1.0",
34-
"eslint-plugin-compat": "^4.2.0",
35-
"eslint-plugin-import": "^2.29.1",
36-
"eslint-plugin-n": "^16.6.2",
37-
"eslint-plugin-promise": "6.1.1",
38-
"postcss": "^8.4.35",
39-
"postcss-scss": "^4.0.9",
40-
"stylelint": "^16.2.1",
41-
"stylelint-config-standard": "^36.0.0",
42-
"stylelint-config-standard-scss": "^13.0.0",
43-
"stylelint-order": "^6.0.4",
44-
"terser": "^5.37.0",
45-
"typedoc": "^0.27.4",
46-
"typescript": "^5.3.3",
38+
"core-js": "^3.40.0",
39+
"terser": "^5.39.0",
40+
"typedoc": "^0.27.9",
41+
"typescript": "^5.8.2",
4742
"vite": "5.4.6",
48-
"vite-plugin-dts": "^3.7.3"
43+
"vite-plugin-dts": "^4.5.1"
4944
},
5045
"scripts": {
5146
"build:doc": "typedoc --tsconfig tsconfig.json --options ./typedoc.json src",
@@ -54,5 +49,5 @@
5449
"build:lib": "vite build --mode lib && yarn build:css",
5550
"dev": "vite dev"
5651
},
57-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
52+
"packageManager": "yarn@4.6.0"
5853
}

0 commit comments

Comments
 (0)