@hodgef/js-library-boilerplate

2.7.412 • Public • Published

Javascript Library Boilerplate

Library Starter Kit for your Javascript projects

npm version latest commit Build Status Publish Status

This is a more robust library boilerplate. For a minimal alternative, check out js-library-boilerplate-basic.

⭐️ Features

  • Webpack 5
  • Babel 7
  • Hot Reloading (npm start)
  • CSS Autoprefixer
  • SASS/SCSS support
  • UMD exports, so your library works everywhere.
  • Based on CRA v5.0.0 (For Vanilla JS libs or React libs)
  • Jest unit testing
  • npm run demo To build a ready-for-deployment demo (Example)
  • Customizable file headers for your build (Example 1) (Example2)
  • Configurable postinstall message (Example)
  • Daily dependabot dependency updates

📦 Getting Started

git clone https://github.com/hodgef/js-library-boilerplate.git myLibrary
npm install

💎 Customization

Before shipping, make sure to:

  1. Edit LICENSE file
  2. Edit package.json information (These will be used to generate the headers for your built files)
  3. Edit library: "MyLibrary" with your library's export name in ./config/webpack.config.js
  4. Edit ./bin/postinstall (If you would like to display a message on package install)

🚀 Deployment

  1. npm publish
  2. Your users can include your library as usual

npm

import MyLibrary from 'my-library';
import 'my-library/build/index.css' // If you import a css file in your library

let libraryInstance = new MyLibrary();
...

self-host/cdn

<link href="build/index.css" rel="stylesheet">
<script src="build/index.js"></script>

let MyLibrary = window.MyLibrary.default;
let libraryInstance = new MyLibrary();
...

✅ Libraries built with this boilerplate

Made a library using this starter kit? Share it here by submitting a pull request!

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.7.41260latest

Version History

VersionDownloads (Last 7 Days)Published
2.7.41260
2.7.41169
2.7.4108
2.7.4098
2.7.4082
2.7.4070
2.7.4060
2.7.4050
2.7.4041
2.7.4031
2.7.4020
2.7.4010
2.7.4000
2.7.3990
2.7.3980
2.7.3970
2.7.3960
2.7.3950
2.7.3940
2.7.3930
2.7.3920
2.7.3910
2.7.3900
2.7.3890
2.7.3880
2.7.3870
2.7.3860
2.7.3850
2.7.3840
2.7.3830
2.7.3820
2.7.3810
2.7.3800
2.7.3790
2.7.3780
2.7.3770
2.7.3760
2.7.3750
2.7.3740
2.7.3730
2.7.3720
2.7.3710
2.7.3700
2.7.3690
2.7.3680
2.7.3670
2.7.3660
2.7.3650
2.7.3640
2.7.3630
2.7.3620
2.7.3610
2.7.3600
2.7.3590
2.7.3580
2.7.3570
2.7.3560
2.7.3550
2.7.3540
2.7.3530
2.7.3520
2.7.3510
2.7.3500
2.7.3490
2.7.3480
2.7.3470
2.7.3460
2.7.3450
2.7.3440
2.7.3430
2.7.3420
2.7.3410
2.7.3400
2.7.3390
2.7.3380
2.7.3370
2.7.3360
2.7.3350
2.7.3340
2.7.3330
2.7.3320
2.7.3310
2.7.3300
2.7.3290
2.7.3280
2.7.3270
2.7.3260
2.7.3250
2.7.3240
2.7.3230
2.7.3220
2.7.3211
2.7.3200
2.7.3190
2.7.3180
2.7.3170
2.7.3160
2.7.3150
2.7.3140
2.7.3130
2.7.3120
2.7.3110
2.7.3100
2.7.3090
2.7.3080
2.7.3070
2.7.3061
2.7.3050
2.7.3040
2.7.3030
2.7.3021
2.7.3010
2.7.3000
2.7.2990
2.7.2980
2.7.2970
2.7.2960
2.7.2950
2.7.2940
2.7.2930
2.7.2920
2.7.2910
2.7.2900
2.7.2890
2.7.2881
2.7.2870
2.7.2860
2.7.2850
2.7.2840
2.7.2830
2.7.2820
2.7.2810
2.7.2800
2.7.2791
2.7.2780
2.7.2771
2.7.2760
2.7.2750
2.7.2740
2.7.2731
2.7.2720
2.7.2711
2.7.2700
2.7.2690
2.7.2680
2.7.2671
2.7.2660
2.7.2650
2.7.2640
2.7.2630
2.7.2620
2.7.2611
2.7.2600
2.7.2590
2.7.2580
2.7.2570
2.7.2560
2.7.2550
2.7.2540
2.7.2530
2.7.2520
2.7.2510
2.7.2501
2.7.2490
2.7.2480
2.7.2470
2.7.2460
2.7.2450
2.7.2440
2.7.2430
2.7.2420
2.7.2410
2.7.2400
2.7.2390
2.7.2381
2.7.2370
2.7.2360
2.7.2350
2.7.2340
2.7.2330
2.7.2320
2.7.2310
2.7.2300
2.7.2290
2.7.2280
2.7.2270
2.7.2260
2.7.2251
2.7.2240
2.7.2230
2.7.2220
2.7.2210
2.7.2200
2.7.2190
2.7.2180
2.7.2170
2.7.2161
2.7.2150
2.7.2140
2.7.2130
2.7.2120
2.7.2110
2.7.2100
2.7.2090
2.7.2080
2.7.2071
2.7.2060
2.7.2051
2.7.2041
2.7.2030
2.7.2020
2.7.2010
2.7.2000
2.7.1990
2.7.1980
2.7.1971
2.7.1960
2.7.1950
2.7.1940
2.7.1930
2.7.1920
2.7.1910
2.7.1900
2.7.1891
2.7.1880
2.7.1870
2.7.1860
2.7.1850
2.7.1840
2.7.1830
2.7.1820
2.7.1810
2.7.1800
2.7.1791
2.7.1780
2.7.1770
2.7.1760
2.7.1750
2.7.1740
2.7.1730
2.7.1720
2.7.1710
2.7.1700
2.7.1690
2.7.1681
2.7.1670
2.7.1660
2.7.1650
2.7.1640
2.7.1630
2.7.1620
2.7.1610
2.7.1600
2.7.1590
2.7.1580
2.7.1570
2.7.1561
2.7.1550
2.7.1540
2.7.1530
2.7.1520
2.7.1510
2.7.1500
2.7.1491
2.7.1480
2.7.1470
2.7.1460
2.7.1450
2.7.1440
2.7.1431
2.7.1420
2.7.1410
2.7.1400
2.7.1391
2.7.1380
2.7.1370
2.7.1360
2.7.1350
2.7.1340
2.7.1330
2.7.1320
2.7.1311
2.7.1300
2.7.1290
2.7.1281
2.7.1270
2.7.1260
2.7.1250
2.7.1241
2.7.1230
2.7.1220
2.7.1210
2.7.1200
2.7.1190
2.7.1180
2.7.1170
2.7.1160
2.7.1150
2.7.1140
2.7.1130
2.7.1120
2.7.1110
2.7.1100
2.7.1090
2.7.1080
2.7.1070
2.7.1061
2.7.1050
2.7.1040
2.7.1030
2.7.1020
2.7.1010
2.7.1000
2.7.990
2.7.980
2.7.970
2.7.960
2.7.950
2.7.940
2.7.930
2.7.920
2.7.910
2.7.900
2.7.890
2.7.880
2.7.870
2.7.860
2.7.850
2.7.840
2.7.830
2.7.820
2.7.810
2.7.800
2.7.790
2.7.780
2.7.770
2.7.760
2.7.751
2.7.740
2.7.730
2.7.720
2.7.710
2.7.700
2.7.690
2.7.680
2.7.670
2.7.660
2.7.650
2.7.640
2.7.630
2.7.620
2.7.610
2.7.600
2.7.590
2.7.580
2.7.570
2.7.560
2.7.550
2.7.540
2.7.530
2.7.520
2.7.510
2.7.500
2.7.490
2.7.480
2.7.470
2.7.460
2.7.450
2.7.440
2.7.430
2.7.420
2.7.410
2.7.400
2.7.390
2.7.380
2.7.370
2.7.360
2.7.350
2.7.340
2.7.330
2.7.320
2.7.311
2.7.300
2.7.290
2.7.280
2.7.270
2.7.260
2.7.251
2.7.240
2.7.230
2.7.220
2.7.210
2.7.200
2.7.190
2.7.180
2.7.170
2.7.160
2.7.150
2.7.140
2.7.130
2.7.120
2.7.110
2.7.100
2.7.90
2.7.81
2.7.70
2.7.60
2.7.50
2.7.40
2.7.30
2.7.20
2.7.00
2.7.10
2.6.1120
2.6.1110
2.6.1100
2.6.1090
2.6.1080
2.6.1070
2.6.1060
2.6.1050
2.6.1041
2.6.1030
2.6.1020
2.6.1010
2.6.1000
2.6.991
2.6.980
2.6.970
2.6.960
2.6.950
2.6.940
2.6.930
2.6.920
2.6.910
2.6.900
2.6.890
2.6.880
2.6.870
2.6.860
2.6.850
2.6.840
2.6.830
2.6.820
2.6.810
2.6.800
2.6.790
2.6.780
2.6.771
2.6.760
2.6.750
2.6.740
2.6.730
2.6.720
2.6.710
2.6.700
2.6.690
2.6.680
2.6.670
2.6.660
2.6.650
2.6.640
2.6.630
2.6.620
2.6.610
2.6.600
2.6.590
2.6.580
2.6.570
2.6.560
2.6.550
2.6.541
2.6.530
2.6.520
2.6.510
2.6.500
2.6.490
2.6.480
2.6.470
2.6.460
2.6.450
2.6.440
2.6.430
2.6.420
2.6.410
2.6.401
2.6.390
2.6.380
2.6.370
2.6.360
2.6.350
2.6.340
2.6.330
2.6.321
2.6.310
2.6.300
2.6.290
2.6.280
2.6.270
2.6.260
2.6.250
2.6.240
2.6.230
2.6.220
2.6.210
2.6.200
2.6.190
2.6.180
2.6.171
2.6.160
2.6.150
2.6.140
2.6.130
2.6.120
2.6.110
2.6.100
2.6.90
2.6.80
2.6.70
2.6.60
2.6.50
2.6.41
2.6.30
2.6.20
2.6.11
2.6.00
2.5.1970
2.5.1960
2.5.1950
2.5.1940
2.5.1930
2.5.1920
2.5.1910
2.5.1901
2.5.1890
2.5.1880
2.5.1870
2.5.1860
2.5.1850
2.5.1840
2.5.1830
2.5.1820
2.5.1810
2.5.1800
2.5.1790
2.5.1781
2.5.1770
2.5.1760
2.5.1750
2.5.1741
2.5.1730
2.5.1720
2.5.1710
2.5.1700
2.5.1690
2.5.1680
2.5.1670
2.5.1660
2.5.1650
2.5.1640
2.5.1630
2.5.1620
2.5.1610
2.5.1600
2.5.1590
2.5.1580
2.5.1571
2.5.1561
2.5.1550
2.5.1540
2.5.1530
2.5.1521
2.5.1510
2.5.1500
2.5.1490
2.5.1481
2.5.1470
2.5.1460
2.5.1450
2.5.1440
2.5.1431
2.5.1420
2.5.1410
2.5.1400
2.5.1390
2.5.1380
2.5.1370
2.5.1360
2.5.1350
2.5.1340
2.5.1330
2.5.1320
2.5.1311
2.5.1300
2.5.1290
2.5.1280
2.5.1270
2.5.1260
2.5.1250
2.5.1240
2.5.1230
2.5.1220
2.5.1210
2.5.1201
2.5.1190
2.5.1181
2.5.1170
2.5.1160
2.5.1150
2.5.1140
2.5.1130
2.5.1120
2.5.1110
2.5.1100
2.5.1090
2.5.1080
2.5.1070
2.5.1060
2.5.1050
2.5.1040
2.5.1030
2.5.1020
2.5.1010
2.5.1000
2.5.990
2.5.980
2.5.970
2.5.960
2.5.950
2.5.940
2.5.930
2.5.920
2.5.910
2.5.900
2.5.891
2.5.880
2.5.870
2.5.861
2.5.850
2.5.840
2.5.830
2.5.821
2.5.810
2.5.800
2.5.790
2.5.780
2.5.770
2.5.760
2.5.750
2.5.740
2.5.730
2.5.720
2.5.710
2.5.700
2.5.690
2.5.680
2.5.670
2.5.660
2.5.650
2.5.640
2.5.630
2.5.620
2.5.610
2.5.601
2.5.590
2.5.580
2.5.570
2.5.561
2.5.550
2.5.540
2.5.530
2.5.520
2.5.510
2.5.500
2.5.491
2.5.481
2.5.470
2.5.461
2.5.450
2.5.440
2.5.430
2.5.420
2.5.410
2.5.401
2.5.390
2.5.380
2.5.370
2.5.360
2.5.350
2.5.340
2.5.331
2.5.320
2.5.310
2.5.300
2.5.290
2.5.280
2.5.270
2.5.260
2.5.250
2.5.240
2.5.230
2.5.220
2.5.211
2.5.200
2.5.190
2.5.180
2.5.170
2.5.160
2.5.150
2.5.140
2.5.130
2.5.120
2.5.110
2.5.100
2.5.90
2.5.81
2.5.70
2.5.60
2.5.50
2.5.41
2.5.30
2.5.20
2.5.10
2.4.1020
2.4.1010
2.4.1000
2.4.990
2.4.980
2.4.970
2.4.960
2.4.950
2.4.940
2.4.931
2.4.920
2.4.910
2.4.900
2.4.890
2.4.880
2.4.870
2.4.860
2.4.850
2.4.840
2.4.830
2.4.820
2.4.810
2.4.801
2.4.790
2.4.780
2.4.770
2.4.760
2.4.750
2.4.740
2.4.730
2.4.720
2.4.710
2.4.700
2.4.690
2.4.680
2.4.670
2.4.660
2.4.650
2.4.640
2.4.630
2.4.620
2.4.610
2.4.600
2.4.591
2.4.580
2.4.570
2.4.560
2.4.550
2.4.541
2.4.530
2.4.520
2.4.510
2.4.500
2.4.490
2.4.480
2.4.470
2.4.461
2.4.450
2.4.440
2.4.430
2.4.420
2.4.410
2.4.400
2.4.390
2.4.380
2.4.370
2.4.360
2.4.350
2.4.340
2.4.330
2.4.320
2.4.310
2.4.300
2.4.290
2.4.280
2.4.270
2.4.260
2.4.250
2.4.240
2.4.230
2.4.220
2.4.210
2.4.200
2.4.190
2.4.180
2.4.170
2.4.160
2.4.150
2.4.140
2.4.130
2.4.120
2.4.110
2.4.100
2.4.90
2.4.80
2.4.70
2.4.60
2.4.50
2.4.40
2.4.31
2.4.20
2.4.10
2.4.01
2.3.1110
2.3.1100
2.3.1090
2.3.1081
2.3.1070
2.3.1060
2.3.1050
2.3.1040
2.3.1030
2.3.1020
2.3.1010
2.3.1000
2.3.990
2.3.980
2.3.970
2.3.960
2.3.950
2.3.940
2.3.930
2.3.920
2.3.911
2.3.900
2.3.890
2.3.880
2.3.870
2.3.860
2.3.850
2.3.841
2.3.830
2.3.820
2.3.810
2.3.800
2.3.790
2.3.780
2.3.771
2.3.760
2.3.750
2.3.740
2.3.730
2.3.720
2.3.710
2.3.700
2.3.690
2.3.680
2.3.670
2.3.660
2.3.650
2.3.641
2.3.630
2.3.620
2.3.610
2.3.601
2.3.590
2.3.580
2.3.570
2.3.560
2.3.550
2.3.540
2.3.530
2.3.520
2.3.510
2.3.500
2.3.490
2.3.480
2.3.470
2.3.461
2.3.450
2.3.441
2.3.430
2.3.421
2.3.411
2.3.400
2.3.390
2.3.380
2.3.370
2.3.361
2.3.350
2.3.340
2.3.331
2.3.320
2.3.310
2.3.300
2.3.290
2.3.280
2.3.270
2.3.260
2.3.250
2.3.240
2.3.230
2.3.220
2.3.210
2.3.200
2.3.190
2.3.180
2.3.170
2.3.160
2.3.151
2.3.140
2.3.130
2.3.120
2.3.110
2.3.100
2.3.90
2.3.80
2.3.70
2.3.60
2.3.50
2.3.40
2.3.30
2.3.20
2.3.10
2.2.1720
2.2.1710
2.2.1700
2.2.1690
2.2.1680
2.2.1670
2.2.1660
2.2.1650
2.2.1640
2.2.1630
2.2.1620
2.2.1611
2.2.1600
2.2.1590
2.2.1580
2.2.1570
2.2.1560
2.2.1550
2.2.1540
2.2.1531
2.2.1520
2.2.1510
2.2.1500
2.2.1491
2.2.1480
2.2.1470
2.2.1460
2.2.1450
2.2.1441
2.2.1430
2.2.1420
2.2.1411
2.2.1400
2.2.1390
2.2.1380
2.2.1370
2.2.1360
2.2.1350
2.2.1340
2.2.1330
2.2.1320
2.2.1310
2.2.1300
2.2.1290
2.2.1281
2.2.1270
2.2.1260
2.2.1251
2.2.1240
2.2.1230
2.2.1220
2.2.1210
2.2.1200
2.2.1190
2.2.1180
2.2.1170
2.2.1160
2.2.1150
2.2.1140
2.2.1130
2.2.1121
2.2.1110
2.2.1100
2.2.1091
2.2.1081
2.2.1070
2.2.1060
2.2.1050
2.2.1040
2.2.1030
2.2.1020
2.2.1010
2.2.1001
2.2.990
2.2.980
2.2.970
2.2.960
2.2.950
2.2.941
2.2.930
2.2.920
2.2.910
2.2.900
2.2.890
2.2.880
2.2.870
2.2.860
2.2.850
2.2.841
2.2.830
2.2.821
2.2.810
2.2.800
2.2.790
2.2.780
2.2.771
2.2.760
2.2.750
2.2.741
2.2.730
2.2.720
2.2.710
2.2.700
2.2.690
2.2.680
2.2.670
2.2.660
2.2.650
2.2.640
2.2.630
2.2.620
2.2.610
2.2.600
2.2.591
2.2.580
2.2.570
2.2.560
2.2.550
2.2.540
2.2.530
2.2.520
2.2.510
2.2.501
2.2.490
2.2.480
2.2.470
2.2.460
2.2.450
2.2.440
2.2.430
2.2.420
2.2.410
2.2.400
2.2.390
2.2.380
2.2.370
2.2.360
2.2.350
2.2.340
2.2.330
2.2.320
2.2.310
2.2.300
2.2.290
2.2.280
2.2.270
2.2.260
2.2.251
2.2.240
2.2.230
2.2.220
2.2.210
2.2.200
2.2.190
2.2.180
2.2.170
2.2.160
2.2.150
2.2.140
2.2.130
2.2.120
2.2.110
2.2.100
2.2.90
2.2.80
2.2.70
2.2.60
2.2.50
2.2.40
2.2.30
2.2.20
2.2.10
2.1.840
2.1.831
2.1.820
2.1.810
2.1.800
2.1.790
2.1.780
2.1.771
2.1.760
2.1.750
2.1.740
2.1.730
2.1.720
2.1.710
2.1.700
2.1.691
2.1.680
2.1.670
2.1.660
2.1.650
2.1.640
2.1.630
2.1.620
2.1.610
2.1.600
2.1.591
2.1.580
2.1.570
2.1.560
2.1.550
2.1.540
2.1.530
2.1.520
2.1.510
2.1.500
2.1.490
2.1.480
2.1.470
2.1.460
2.1.450
2.1.440
2.1.430
2.1.420
2.1.410
2.1.400
2.1.390
2.1.380
2.1.370
2.1.360
2.1.351
2.1.340
2.1.330
2.1.320
2.1.310
2.1.300
2.1.290
2.1.281
2.1.270
2.1.260
2.1.250
2.1.240
2.1.230
2.1.220
2.1.210
2.1.201
2.1.190
2.1.180
2.1.170
2.1.160
2.1.150
2.1.140
2.1.130
2.1.120
2.1.110
2.1.100
2.1.90
2.1.80
2.1.70
2.1.60
2.1.50
2.1.40
2.1.20
2.1.10
2.1.00
2.0.150
2.0.140
2.0.130
2.0.120
2.0.110
2.0.100
2.0.90
2.0.80
2.0.71
2.0.61
2.0.51
2.0.40
2.0.20
2.0.10
2.0.00
1.1.80
1.1.70
1.1.60
1.1.50
1.1.40
1.1.30
1.1.10
1.1.01
1.0.180
1.0.170
1.0.140
1.0.130
1.0.120
1.0.110
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i @hodgef/js-library-boilerplate

Weekly Downloads

263

Version

2.7.412

License

MIT

Unpacked Size

18.8 kB

Total Files

11

Last publish

Collaborators

  • hodgef