Compare commits
4 Commits
v0.1.1-dev
...
v0.1.1-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 66bc3ddb51 | |
Derrick Hammer | 60f45cb8d5 | |
Derrick Hammer | a5f166210d | |
Derrick Hammer | 7a58630cda |
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"preset": [
|
"preset": [
|
||||||
"presetter-preset-strict"
|
"presetter-preset-strict",
|
||||||
|
"presetter-preset-hybrid"
|
||||||
],
|
],
|
||||||
"config": {
|
"config": {
|
||||||
"prettier": {
|
"prettier": {
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
## [0.1.1-develop.12](https://git.lumeweb.com/LumeWeb/node-library-preset/compare/v0.1.1-develop.11...v0.1.1-develop.12) (2023-06-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* add __dirname compatibility ([60f45cb](https://git.lumeweb.com/LumeWeb/node-library-preset/commit/60f45cb8d544de3c77be90359bdce9ea98422040))
|
||||||
|
* switch to hybrid building ([7a58630](https://git.lumeweb.com/LumeWeb/node-library-preset/commit/7a58630cdaf69e9830a03ca7c2bc6fecd188a2f0))
|
||||||
|
|
||||||
## [0.1.1-develop.11](https://git.lumeweb.com/LumeWeb/node-library-preset/compare/v0.1.1-develop.10...v0.1.1-develop.11) (2023-06-25)
|
## [0.1.1-develop.11](https://git.lumeweb.com/LumeWeb/node-library-preset/compare/v0.1.1-develop.10...v0.1.1-develop.11) (2023-06-25)
|
||||||
|
|
||||||
|
|
||||||
|
|
30
lib/index.js
30
lib/index.js
|
@ -1,19 +1,28 @@
|
||||||
import { dirname, resolve } from "node:path";
|
"use strict";
|
||||||
import { fileURLToPath } from "node:url";
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const DIR = dirname(fileURLToPath(import.meta.url));
|
exports.DEFAULT_VARIABLE = void 0;
|
||||||
const TEMPLATES = resolve(DIR, "..", "templates");
|
const node_path_1 = require("node:path");
|
||||||
export const DEFAULT_VARIABLE = {
|
const node_url_1 = require("node:url");
|
||||||
|
let DIR;
|
||||||
|
if (typeof __dirname === "undefined") {
|
||||||
|
DIR = (0, node_path_1.dirname)((0, node_url_1.fileURLToPath)(import.meta.url));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
DIR = __dirname;
|
||||||
|
}
|
||||||
|
const TEMPLATES = (0, node_path_1.resolve)(DIR, "..", "templates");
|
||||||
|
exports.DEFAULT_VARIABLE = {
|
||||||
source: "src",
|
source: "src",
|
||||||
};
|
};
|
||||||
export default async function () {
|
async function default_1() {
|
||||||
return {
|
return {
|
||||||
extends: ["presetter-preset-strict"],
|
extends: ["presetter-preset-strict"],
|
||||||
template: {
|
template: {
|
||||||
".github/workflows/ci.yml": resolve(TEMPLATES, "ci.yml.raw"),
|
".github/workflows/ci.yml": (0, node_path_1.resolve)(TEMPLATES, "ci.yml.raw"),
|
||||||
".releaserc.json": resolve(TEMPLATES, ".releaserc.json"),
|
".releaserc.json": (0, node_path_1.resolve)(TEMPLATES, ".releaserc.json"),
|
||||||
},
|
},
|
||||||
noSymlinks: [".github/workflows/ci.yml"],
|
noSymlinks: [".github/workflows/ci.yml"],
|
||||||
variable: DEFAULT_VARIABLE,
|
variable: exports.DEFAULT_VARIABLE,
|
||||||
supplementaryConfig: {
|
supplementaryConfig: {
|
||||||
prettier: {
|
prettier: {
|
||||||
singleQuote: false,
|
singleQuote: false,
|
||||||
|
@ -27,4 +36,5 @@ export default async function () {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFDN0MsT0FB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DdkI7YUFDRjtTQUNGO0tBQ0YsQ0FBQztBQUNKLENBQUM7QUFyQkQsNEJBcUJDIn0=
|
|
@ -0,0 +1,36 @@
|
||||||
|
import { dirname, resolve } from "node:path";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
|
let DIR;
|
||||||
|
if (typeof `${process.platform === 'win32' ? '' : '/'}${/file:\/{2,3}(.+)\/[^/]/.exec(import.meta.url)[1]}` === "undefined") {
|
||||||
|
DIR = dirname(fileURLToPath(import.meta.url));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
DIR = `${process.platform === 'win32' ? '' : '/'}${/file:\/{2,3}(.+)\/[^/]/.exec(import.meta.url)[1]}`;
|
||||||
|
}
|
||||||
|
const TEMPLATES = resolve(DIR, "..", "templates");
|
||||||
|
export const DEFAULT_VARIABLE = {
|
||||||
|
source: "src",
|
||||||
|
};
|
||||||
|
export default async function () {
|
||||||
|
return {
|
||||||
|
extends: ["presetter-preset-strict"],
|
||||||
|
template: {
|
||||||
|
".github/workflows/ci.yml": resolve(TEMPLATES, "ci.yml.raw"),
|
||||||
|
".releaserc.json": resolve(TEMPLATES, ".releaserc.json"),
|
||||||
|
},
|
||||||
|
noSymlinks: [".github/workflows/ci.yml"],
|
||||||
|
variable: DEFAULT_VARIABLE,
|
||||||
|
supplementaryConfig: {
|
||||||
|
prettier: {
|
||||||
|
singleQuote: false,
|
||||||
|
},
|
||||||
|
gitignore: [".releaserc.json"],
|
||||||
|
tsconfig: {
|
||||||
|
compilerOptions: {
|
||||||
|
lib: ["ES2021", "dom"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFF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LEtBQUssQ0FBQztpQkFDdkI7YUFDRjtTQUNGO0tBQ0YsQ0FBQztBQUNKLENBQUMifQ==
|
|
@ -14,11 +14,9 @@
|
||||||
"@semantic-release/changelog": "^6.0.3",
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
"@semantic-release/git": "^10.0.1",
|
"@semantic-release/git": "^10.0.1",
|
||||||
"presetter": "^4.0.1",
|
"presetter": "^4.0.1",
|
||||||
|
"presetter-preset-hybrid": "^4.0.1",
|
||||||
"presetter-preset-strict": "^4.0.1",
|
"presetter-preset-strict": "^4.0.1",
|
||||||
"semantic-release": "^21.0.5"
|
"semantic-release": "^21.0.5"
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"presetter-preset-strict": "workspace:*"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ampproject/remapping": {
|
"node_modules/@ampproject/remapping": {
|
||||||
|
@ -15130,6 +15128,19 @@
|
||||||
"typescript": ">=4.7.0"
|
"typescript": ">=4.7.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/presetter-preset-hybrid": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/presetter-preset-hybrid/-/presetter-preset-hybrid-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-0GxC2QrR3cTcRQsP+PwQ+X1O2Fd/rGH2llNqI2CKePbsWZQxRT5YIsW4YsLsC82tkxhyeyrSjzjLS6hsrYf3WA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"presetter-types": "4.0.1"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"presetter": "4.0.1",
|
||||||
|
"presetter-preset-esm": "4.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/presetter-preset-strict": {
|
"node_modules/presetter-preset-strict": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/presetter-preset-strict/-/presetter-preset-strict-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/presetter-preset-strict/-/presetter-preset-strict-4.0.1.tgz",
|
||||||
|
|
11
package.json
11
package.json
|
@ -1,8 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/node-library-preset",
|
"name": "@lumeweb/node-library-preset",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"type": "module",
|
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
|
"module": "lib/index.mjs",
|
||||||
|
"types": "lib/index.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"require": "./lib/index.js",
|
||||||
|
"import": "./lib/index.mjs"
|
||||||
|
},
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "gitea@git.lumeweb.com:LumeWeb/node-library-preset.git"
|
"url": "gitea@git.lumeweb.com:LumeWeb/node-library-preset.git"
|
||||||
|
@ -11,6 +19,7 @@
|
||||||
"@semantic-release/changelog": "^6.0.3",
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
"@semantic-release/git": "^10.0.1",
|
"@semantic-release/git": "^10.0.1",
|
||||||
"presetter": "^4.0.1",
|
"presetter": "^4.0.1",
|
||||||
|
"presetter-preset-hybrid": "^4.0.1",
|
||||||
"presetter-preset-strict": "^4.0.1",
|
"presetter-preset-strict": "^4.0.1",
|
||||||
"semantic-release": "^21.0.5"
|
"semantic-release": "^21.0.5"
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,7 +3,14 @@ import { fileURLToPath } from "node:url";
|
||||||
|
|
||||||
import type { PresetAsset } from "presetter-types";
|
import type { PresetAsset } from "presetter-types";
|
||||||
|
|
||||||
const DIR = dirname(fileURLToPath(import.meta.url));
|
let DIR: string;
|
||||||
|
|
||||||
|
if (typeof __dirname === "undefined") {
|
||||||
|
// @ts-ignore
|
||||||
|
DIR = dirname(fileURLToPath(import.meta.url));
|
||||||
|
} else {
|
||||||
|
DIR = __dirname;
|
||||||
|
}
|
||||||
|
|
||||||
// paths to the template directory
|
// paths to the template directory
|
||||||
const TEMPLATES = resolve(DIR, "..", "templates");
|
const TEMPLATES = resolve(DIR, "..", "templates");
|
||||||
|
|
Loading…
Reference in New Issue