desy-html 8.13.1 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/gulpfile.js CHANGED
@@ -1,45 +1,50 @@
1
1
  // https://github.com/idmytro/tailwindcss-gulp-starter
2
2
  // https://gist.github.com/taylorbryant/91fc05b12472a88a8b6494f610647cd4
3
3
 
4
- const gulp = require('gulp');
5
- const { series, parallel } = require('gulp');
6
- const clean = require('gulp-clean');
7
- const nunjucksRender = require('gulp-nunjucks-render');
8
- const browserSync = require('browser-sync').create();
9
- const postcss = require('gulp-postcss');
10
- const atimport = require('postcss-import');
11
- const tailwindnesting = require('tailwindcss/nesting');
12
- const stripCssComments = require('gulp-strip-css-comments');
13
- const footer = require('gulp-footer');
14
- const tailwindcss = require('tailwindcss');
15
- const autoprefixer = require('autoprefixer');
4
+ import gulp from 'gulp';
5
+ import sourcemaps from 'gulp-sourcemaps';
6
+ import clean from 'gulp-clean';
7
+ import nunjucksRender from 'gulp-nunjucks-render';
8
+ import browserSyncPackage from 'browser-sync';
9
+ import postcss from 'gulp-postcss';
10
+ import atimport from 'postcss-import';
11
+ import stripCssComments from 'gulp-strip-css-comments';
12
+ import footer from 'gulp-footer';
13
+ import tailwindcss from 'tailwindcss';
14
+ import tailwindcssNesting from 'tailwindcss/nesting/index.js';
15
+ import autoprefixer from 'autoprefixer';
16
+ import babel from 'gulp-babel';
17
+
18
+ import { SOURCE_NUNJUCKS_GLOBALS } from './src/js/globals/index.js';
19
+ import { SOURCE_NUNJUCKS_FILTERS } from './src/js/filters/index.js';
20
+
21
+ import { series } from 'gulp';
22
+
23
+ const browserSync = browserSyncPackage.create();
16
24
 
17
25
  const TAILWIND_CONFIG = './config/tailwind.config.js';
18
26
  const SOURCE_HTML_DIR = './docs/**.html';
19
27
  const SOURCE_NUNJUCKS_PATHS = ['./src/templates/','./docs/'];
20
28
  const SOURCE_NUNJUCKS_FILES = ['./src/templates/**/*','./docs/**/*'];
21
29
  const SOURCE_NUNJUCKS_DIR = './docs/**/*.html';
22
- const SOURCE_JS_FILES = ['./src/**/**.js','!./src/js/globals/**', '!./src/js/filters/**'];
30
+ const SOURCE_JS_FILES = ['./src/**/*.js','!./src/js/globals/**', '!./src/js/filters/**'];
23
31
  const SOURCE_STYLESHEET = './src/css/styles.css';
24
32
  const SOURCE_STYLESHEET_DIR = './src/**/*.css';
25
- const SOURCE_NUNJUCKS_GLOBALS = require('./src/js/globals/index.js');
26
- const SOURCE_NUNJUCKS_FILTERS = require('./src/js/filters/index.js');
27
33
  const DESTINATION_HTML_DIR = './dist/';
28
34
  const DESTINATION_JS_DIR = './dist/';
29
35
  const DESTINATION_STYLESHEET = './dist/css/';
30
36
 
31
-
32
37
  const manageEnvironment = function(environment) {
33
38
  // Custom globals
34
39
  for (const key in SOURCE_NUNJUCKS_GLOBALS) {
35
- environment.addGlobal(key, SOURCE_NUNJUCKS_GLOBALS[key])
40
+ environment.addGlobal(key, SOURCE_NUNJUCKS_GLOBALS[key]);
36
41
  }
37
42
 
38
43
  // Custom filters
39
44
  for (const key in SOURCE_NUNJUCKS_FILTERS) {
40
- environment.addFilter(key, SOURCE_NUNJUCKS_FILTERS[key])
45
+ environment.addFilter(key, SOURCE_NUNJUCKS_FILTERS[key]);
41
46
  }
42
- }
47
+ };
43
48
 
44
49
  function bs(cb) {
45
50
  browserSync.init({
@@ -52,27 +57,24 @@ function bs(cb) {
52
57
  cb();
53
58
  }
54
59
 
55
-
56
60
  function watchFiles(cb) {
57
61
  gulp.watch([TAILWIND_CONFIG, SOURCE_STYLESHEET_DIR, SOURCE_HTML_DIR, ...SOURCE_JS_FILES, SOURCE_NUNJUCKS_DIR, ...SOURCE_NUNJUCKS_FILES], gulp.series(html, nunjucks, js, css, reload));
58
62
  cb();
59
63
  }
60
64
 
61
-
62
65
  function reload(cb) {
63
66
  browserSync.reload();
64
67
  cb();
65
68
  }
66
69
 
67
-
68
70
  function css() {
69
71
  return gulp.src(SOURCE_STYLESHEET)
70
72
  .pipe(
71
73
  postcss([
72
- atimport(),
73
- tailwindnesting(),
74
- tailwindcss(TAILWIND_CONFIG),
75
- autoprefixer()
74
+ atimport(),
75
+ tailwindcssNesting(),
76
+ tailwindcss(TAILWIND_CONFIG),
77
+ autoprefixer()
76
78
  ])
77
79
  )
78
80
  .pipe(stripCssComments({preserve: false}))
@@ -80,13 +82,11 @@ function css() {
80
82
  .pipe(gulp.dest(DESTINATION_STYLESHEET));
81
83
  }
82
84
 
83
-
84
85
  function html() {
85
86
  return gulp.src(SOURCE_HTML_DIR)
86
87
  .pipe(gulp.dest(DESTINATION_HTML_DIR));
87
88
  }
88
89
 
89
-
90
90
  function nunjucks() {
91
91
  return gulp.src(SOURCE_NUNJUCKS_DIR)
92
92
  .pipe(nunjucksRender({
@@ -102,30 +102,26 @@ function nunjucks() {
102
102
  .pipe(gulp.dest(DESTINATION_HTML_DIR));
103
103
  }
104
104
 
105
-
106
105
  function js() {
107
- return gulp.src(SOURCE_JS_FILES)
106
+ return gulp.src(SOURCE_JS_FILES, { sourcemaps: true })
107
+ .pipe(babel())
108
108
  .pipe(gulp.dest(DESTINATION_JS_DIR));
109
109
  }
110
110
 
111
-
112
111
  function version() {
113
112
  return gulp.src('./package.json')
114
113
  .pipe(gulp.dest('./dist/'));
115
114
  }
116
115
 
117
-
118
116
  function license() {
119
117
  return gulp.src('./src/EUPL-1.2.txt')
120
118
  .pipe(gulp.dest('./dist/'));
121
119
  }
122
120
 
123
-
124
121
  function cleanFolder() {
125
122
  return gulp.src(DESTINATION_HTML_DIR, {read: false, allowEmpty: true})
126
123
  .pipe(clean());
127
124
  }
128
125
 
129
-
130
- exports.default = series(cleanFolder, html, nunjucks, js, css, license, version, bs, watchFiles);
131
- exports.prod = series(cleanFolder, html, nunjucks, js, css, license, version, bs);
126
+ export default series(cleanFolder, html, nunjucks, js, css, license, version, bs, watchFiles);
127
+ export const prod = series(cleanFolder, html, nunjucks, js, css, license, version, bs);
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "desy-html",
3
- "version": "8.13.1",
3
+ "version": "9.0.1",
4
4
  "description": "desy-html contains the code you need to start building a user interface for Gobierno de Aragón government webapps.",
5
+ "type": "module",
5
6
  "author": {
6
7
  "name": "Desy (SDA Servicios Digitales de Aragón)",
7
8
  "email": "sda@aragon.es"
@@ -43,13 +44,19 @@
43
44
  "tailwindcss": "^3.4.3"
44
45
  },
45
46
  "devDependencies": {
47
+ "@babel/core": "^7.24.6",
48
+ "@babel/preset-env": "^7.24.6",
49
+ "@babel/register": "^7.24.6",
50
+ "@rollup/plugin-node-resolve": "^15.2.3",
46
51
  "browser-sync": "^2.26.13",
47
- "gulp": "^4.0.2",
52
+ "gulp": "^5.0.0",
53
+ "gulp-babel": "^8.0.0",
48
54
  "gulp-clean": "^0.4.0",
49
55
  "gulp-clean-css": "^4.3.0",
50
56
  "gulp-footer": "^2.0.2",
51
57
  "gulp-nunjucks-render": "^2.2.3",
52
58
  "gulp-postcss": "^9.0.1",
59
+ "gulp-sourcemaps": "^3.0.0",
53
60
  "gulp-strip-css-comments": "^2.0.0",
54
61
  "js-beautify": "^1.14.7",
55
62
  "outdent": "^0.8.0"
@@ -21,6 +21,7 @@
21
21
  @import "../templates/components/button-loader/_styles.button-loader.css";
22
22
  @import "../templates/components/checkboxes/_styles.checkboxes.css";
23
23
  @import "../templates/components/collapsible/_styles.collapsible.css";
24
+ @import "../templates/components/datepicker/_styles.datepicker.css";
24
25
  @import "../templates/components/dialog/_styles.dialog.css";
25
26
  @import "../templates/components/dropdown/_styles.dropdown.css";
26
27
  @import "../templates/components/footer/_styles.footer.css";