mancha 0.5.4 → 0.6.0

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,22 +1,24 @@
1
- const gulp = require("gulp");
1
+ import * as fs from "fs/promises";
2
+ import ts from "gulp-typescript";
3
+ import GulpClient from "gulp";
2
4
 
3
5
  // Clean tasks
4
6
 
5
- gulp.task("clean", function (done) {
6
- const fs = require("fs/promises");
7
+ GulpClient.task("clean", function (done) {
7
8
  return fs.rm("dist", { recursive: true, force: true }).then(done);
8
9
  });
9
10
 
10
11
  // Build tasks
11
12
 
12
- gulp.task("ts", function () {
13
- const ts = require("gulp-typescript");
14
- return gulp.src("src/**/*.ts").pipe(ts.createProject("tsconfig.json")()).pipe(gulp.dest("dist"));
13
+ GulpClient.task("ts", function () {
14
+ return GulpClient.src("src/**/*.ts")
15
+ .pipe(ts.createProject("tsconfig.json")())
16
+ .pipe(GulpClient.dest("dist"));
15
17
  });
16
18
 
17
- gulp.task("fixtures", function () {
18
- return gulp.src("src/fixtures/**/*").pipe(gulp.dest("dist/fixtures"));
19
+ GulpClient.task("fixtures", function () {
20
+ return GulpClient.src("src/fixtures/**/*").pipe(GulpClient.dest("dist/fixtures"));
19
21
  });
20
22
 
21
- gulp.task("build", gulp.series("ts", "fixtures"));
22
- gulp.task("default", gulp.series("build"));
23
+ GulpClient.task("build", GulpClient.series("ts", "fixtures"));
24
+ GulpClient.task("default", GulpClient.series("build"));
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "mancha",
3
- "version": "0.5.4",
3
+ "version": "0.6.0",
4
4
  "description": "Javscript HTML rendering engine",
5
- "main": "dist/index",
6
- "typings": "dist/index",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "types": "dist/index.d.ts",
7
8
  "unpkg": "dist/mancha.js",
8
9
  "scripts": {
9
10
  "clean": "gulp clean",
@@ -33,8 +34,9 @@
33
34
  },
34
35
  "homepage": "https://gitlab.com/omtinez/mancha#README",
35
36
  "dependencies": {
37
+ "dom-serializer": "^2.0.0",
38
+ "htmlparser2": "^9.1.0",
36
39
  "jsdom": "^24.0.0",
37
- "path-browserify": "^1.0.1",
38
40
  "through2": "^4.0.2",
39
41
  "yargs": "^17.7.2"
40
42
  },
@@ -46,7 +48,7 @@
46
48
  "@types/path-browserify": "^1.0.1",
47
49
  "@types/through2": "^2.0.36",
48
50
  "@types/yargs": "^17.0.29",
49
- "gulp": "^4.0.2",
51
+ "gulp": "^5.0.0",
50
52
  "gulp-typescript": "^6.0.0-alpha.1",
51
53
  "mocha": "^10.2.0",
52
54
  "static-server": "^2.2.1",
package/tsconfig.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES2022",
4
- "module": "commonjs",
4
+ "module": "ES2022",
5
5
  "outDir": "dist",
6
6
  "rootDir": "src",
7
7
  "declaration": true,
8
8
  "noImplicitAny": true,
9
9
  "skipLibCheck": true,
10
10
  "strict": true,
11
- "stripInternal": true
11
+ "stripInternal": true,
12
+ "moduleResolution": "node",
12
13
  },
13
14
  }
package/webpack.config.js CHANGED
@@ -1,8 +1,11 @@
1
- module.exports = {
1
+ export default {
2
2
  target: "web",
3
3
  mode: "production",
4
4
  entry: "./dist/browser.js",
5
5
  output: {
6
6
  filename: "mancha.js",
7
7
  },
8
+ externals: {
9
+ htmlparser2: 'htmlparser2',
10
+ },
8
11
  };
@@ -1,6 +0,0 @@
1
- /**
2
- * Converts from an attribute name to camelCase, e.g. `foo-bar` becomes `fooBar`.
3
- * @param name attribute name
4
- * @returns camel-cased attribute name
5
- */
6
- export declare function attributeNameToCamelCase(name: string): string;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.attributeNameToCamelCase = void 0;
4
- /**
5
- * Converts from an attribute name to camelCase, e.g. `foo-bar` becomes `fooBar`.
6
- * @param name attribute name
7
- * @returns camel-cased attribute name
8
- */
9
- function attributeNameToCamelCase(name) {
10
- return name.replace(/-./g, (c) => c[1].toUpperCase());
11
- }
12
- exports.attributeNameToCamelCase = attributeNameToCamelCase;