Skip to content

Commit 3fdeca5

Browse files
committed
pre-compile and transpile CJS versions
1 parent 1f0a5aa commit 3fdeca5

27 files changed

Lines changed: 2001 additions & 36 deletions

Gruntfile.js

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,42 @@ module.exports = function (grunt) {
241241
},
242242
},
243243
},
244+
// transpile CommonJS output to broadly compatible ES5
245+
babel: {
246+
commonjs_es5: {
247+
options: {
248+
sourceMap: false,
249+
compact: true,
250+
// Only keep comments that explicitly include @preserve
251+
generatorOpts: {
252+
comments: false,
253+
shouldPrintComment: function (val) {
254+
return /@preserve/i.test(val);
255+
},
256+
},
257+
presets: [
258+
[
259+
'@babel/preset-env',
260+
{
261+
targets: { ie: '11' }, // broad compatibility
262+
bugfixes: true,
263+
modules: 'commonjs',
264+
loose: true,
265+
},
266+
],
267+
],
268+
},
269+
files: [
270+
{
271+
expand: true,
272+
cwd: 'dist/commonjs',
273+
src: ['**/*.js'],
274+
dest: 'dist/commonjs',
275+
ext: '.js',
276+
},
277+
],
278+
},
279+
},
244280
// create files to support the dist structure
245281
'file-creator': {
246282
'package.json ES Module': {
@@ -287,8 +323,9 @@ module.exports = function (grunt) {
287323
grunt.loadNpmTasks('grunt-contrib-concat');
288324
grunt.loadNpmTasks('grunt-file-creator');
289325
grunt.loadNpmTasks('grunt-version');
326+
grunt.loadNpmTasks('grunt-babel');
290327

291328
// Register task(s).
292-
grunt.registerTask('default', ['clean', 'cssmin', 'concat', 'file-creator']);
293-
grunt.registerTask('uglifyMain', ['clean', 'cssmin', 'concat', 'file-creator', 'uglify']);
329+
grunt.registerTask('default', ['clean', 'cssmin', 'concat', 'file-creator', 'babel']);
330+
grunt.registerTask('uglifyMain', ['clean', 'cssmin', 'concat', 'file-creator', 'babel', 'uglify']);
294331
};

assets/css/atcb-3d.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: 3D
77
*
8-
* Version: 2.13.1
8+
* Version: 2.13.2
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

assets/css/atcb-date.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Date
77
*
8-
* Version: 2.13.1
8+
* Version: 2.13.2
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

assets/css/atcb-flat.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Flat
77
*
8-
* Version: 2.13.1
8+
* Version: 2.13.2
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

assets/css/atcb-neumorphism.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Neumorphism
77
*
8-
* Version: 2.13.1
8+
* Version: 2.13.2
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

assets/css/atcb-round.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Round
77
*
8-
* Version: 2.13.1
8+
* Version: 2.13.2
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

assets/css/atcb-simple.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Simple
77
*
8-
* Version: 2.13.1
8+
* Version: 2.13.2
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

assets/css/atcb-text.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Text
77
*
8-
* Version: 2.13.1
8+
* Version: 2.13.2
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

assets/css/atcb.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Style: Default
77
*
8-
* Version: 2.13.1
8+
* Version: 2.13.2
99
* Creator: Jens Kuerschner (https://jekuer.com)
1010
* Project: https://github.com/add2cal/add-to-calendar-button
1111
* License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt)

demo/components/footer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function topFunction() {
7070
</span>
7171
<div class="mt-6 text-xs sm:mt-5 md:mt-3">
7272
<span class="font-semibold text-zinc-500 dark:text-zinc-400"> &copy; {{new Date().getFullYear()}} </span>
73-
<span class="lowercase text-zinc-400 dark:text-zinc-500"> , Current Version: 2.13.1 </span>
73+
<span class="lowercase text-zinc-400 dark:text-zinc-500"> , Current Version: 2.13.2 </span>
7474
</div>
7575
</div>
7676
<div class="hidden self-center sm:block">

0 commit comments

Comments
 (0)