sdc_client 0.57.22 → 0.58.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.
Files changed (2) hide show
  1. package/gulp/gulp.jsx +18 -9
  2. package/package.json +2 -1
package/gulp/gulp.jsx CHANGED
@@ -7,10 +7,14 @@ const exec = require('gulp-exec');
7
7
  const dotenv = require("dotenv");
8
8
  const gulp = require('gulp');
9
9
 
10
- function scss() {
11
- return src('./src/*.scss', {follow: true})
12
- .pipe(sass().on('error', sass.logError))
13
- .pipe(dest('../static'));
10
+ function scss(bundle_mode=false) {
11
+ const src_path = bundle_mode ? './src/*/*.scss' : './src/*.scss';
12
+ const dest_path = bundle_mode ? './bin' : '../static';
13
+ return function scss() {
14
+ return src(src_path, {follow: true})
15
+ .pipe(sass().on('error', sass.logError))
16
+ .pipe(dest(dest_path));
17
+ }
14
18
  }
15
19
 
16
20
  /**
@@ -35,9 +39,9 @@ function pre_compile_javascript() {
35
39
  if (a) controller_name = a[1];
36
40
  }
37
41
  if (!on_init_p_name) {
38
- let fnStr = element.match(/^\s*onInit\s*\((.*)\)\s*\{/);
42
+ let fnStr = element.match(/^\s*(async)?\s*onInit\s*\((.*)\)\s*\{/);
39
43
  if (fnStr) {
40
- on_init_p_name = fnStr[1].match(/(?<=^|,\s?)[^=\s,]+/g);
44
+ on_init_p_name = fnStr[2].match(/(?<=^|,\s?)[^=\s,]+/g);
41
45
  }
42
46
  }
43
47
 
@@ -97,7 +101,7 @@ exports.sdc_watch_scss = function () {
97
101
  const watcher = gulp.watch('./src/**/*.scss', {followSymlinks: true});
98
102
  watcher.on('change', (a) => {
99
103
  console.log(`${a} has changed! SCSS is recompiling...`);
100
- scss().on('end', () => {
104
+ scss()().on('end', () => {
101
105
  console.log(`... recompiling done!`);
102
106
  });
103
107
  });
@@ -128,10 +132,15 @@ exports.sdc_watch_webpack_factory = (webpack_task) => {
128
132
  };
129
133
 
130
134
  exports.sdc_default_build_factory = (webpack_task) => {
131
- return series(link_files, parallel(scss, webpack_series_factory(webpack_task)));
135
+ return series(link_files, parallel(scss(), webpack_series_factory(webpack_task)));
136
+ };
137
+
138
+ exports.sdc_default_bundle_factory = (webpack_task) => {
139
+ return series(link_files, parallel(scss(true), webpack_series_factory(webpack_task)));
132
140
  };
133
141
 
134
- exports.sdc_scss = scss;
142
+ exports.sdc_scss = scss();
143
+ exports.sdc_bundle_scss = scss();
135
144
  exports.sdc_clean = clean;
136
145
  exports.sdc_link_files = link_files;
137
146
  exports.sdc_pre_compile_javascript = pre_compile_javascript;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdc_client",
3
- "version": "0.57.22",
3
+ "version": "0.58.1",
4
4
  "description": "Simple Dom Control",
5
5
  "main": "dist/ugly.index.js",
6
6
  "type": "module",
@@ -29,6 +29,7 @@
29
29
  "@babel/preset-react": "^7.26.3",
30
30
  "@babel/register": "^7.25.9",
31
31
  "babel-loader": "^10.0.0",
32
+ "baseline-browser-mapping": "^2.9.19",
32
33
  "dotenv": "^16.4.7",
33
34
  "glob-parent": "^6.0.2",
34
35
  "gulp": "^5.0.0",