Compare commits

..

No commits in common. "develop" and "master" have entirely different histories.

9 changed files with 1 additions and 18374 deletions

View File

@ -1,13 +0,0 @@
name: Build/Publish
on:
push:
branches:
- master
- develop
- develop-*
jobs:
main:
uses: lumeweb/github-node-deploy-workflow/.github/workflows/main.yml@master
secrets: inherit

View File

@ -1,5 +0,0 @@
{
"preset": [
"@lumeweb/node-library-preset"
]
}

View File

@ -1,42 +0,0 @@
# [0.1.0-develop.9](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/compare/v0.1.0-develop.8...v0.1.0-develop.9) (2023-07-09)
### Bug Fixes
* add npmPublish override to semantic release ([118c9a4](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/commit/118c9a435f09afea1c2cd7015f4efd2b78350147))
# [0.1.0-develop.8](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/compare/v0.1.0-develop.7...v0.1.0-develop.8) (2023-07-07)
### Bug Fixes
* set esbuild mainFields and conditions to prioritize cjs ([b1d4070](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/commit/b1d407019364186a82660b93381d46205d4c82fe))
# [0.1.0-develop.7](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/compare/v0.1.0-develop.6...v0.1.0-develop.7) (2023-07-07)
# [0.1.0-develop.6](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/compare/v0.1.0-develop.5...v0.1.0-develop.6) (2023-07-07)
# [0.1.0-develop.5](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/compare/v0.1.0-develop.4...v0.1.0-develop.5) (2023-07-07)
# [0.1.0-develop.4](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/compare/v0.1.0-develop.3...v0.1.0-develop.4) (2023-07-07)
### Bug Fixes
* index file is js not ts ([d5b4877](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/commit/d5b48773a98b0eca99bea8f03ac867bd10eeb0f7))
# [0.1.0-develop.3](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/compare/v0.1.0-develop.2...v0.1.0-develop.3) (2023-07-07)
### Bug Fixes
* variable not exported ([bdf43b3](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/commit/bdf43b3d8eb5ee484c4078de71b29ae368c36ab2))
# [0.1.0-develop.2](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/compare/v0.1.0-develop.1...v0.1.0-develop.2) (2023-07-07)
# [0.1.0-develop.1](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/compare/v0.0.1...v0.1.0-develop.1) (2023-07-07)
### Features
* initial version ([3a8855a](https://git.lumeweb.com/LumeWeb/presetter-relay-plugin-preset/commit/3a8855abe2fdd41bcc95e404baa81a11123719c4))

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2023 Hammer TechnologiesLLC Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

18177
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,32 +0,0 @@
{
"name": "@lumeweb/presetter-relay-plugin-preset",
"version": "0.1.0-develop.9",
"type": "module",
"main": "lib/index.js",
"repository": {
"type": "git",
"url": "gitea@git.lumeweb.com:LumeWeb/presetter-relay-plugin-preset.git"
},
"devDependencies": {
"presetter": "^4.0.1"
},
"readme": "ERROR: No README data found!",
"scripts": {
"prepare": "presetter bootstrap",
"build": "run build",
"semantic-release": "semantic-release"
},
"dependencies": {
"@lumeweb/node-library-preset": "^0.2.7",
"esbuild": "^0.18.11",
"read-pkg": "^8.0.0",
"semantic-release": "^21.0.7"
},
"publishConfig": {
"access": "public"
},
"files": [
"lib",
"templates"
]
}

View File

@ -1,95 +0,0 @@
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import {
loadFile,
template,
PresetAsset,
PresetContext,
resolveDirective,
} from "presetter";
import { readPackage } from "read-pkg";
const DIR = fileURLToPath(dirname(import.meta.url));
// paths to the template directory
const TEMPLATES = resolve(DIR, "..", "templates");
/** List of configurable variables */
export type Variable = {
/** the directory containing all source code (default: source) */
source: string;
/** the directory containing all the compiled files (default: lib) */
output: string;
buildSource: string;
};
export const DEFAULT_VARIABLE: Variable = {
source: "build",
output: "lib",
buildSource: "src",
};
function buildOptions(context: PresetContext) {
const opts = context.custom.config?.esbuild as any;
if (!opts) {
throw new Error("esbuild options missing!");
}
return { esbuildOptions: resolveDirective(opts, context).stringifiedConfig };
}
/**
* get the list of templates provided by this preset
* @returns list of preset templates
*/
export default async function (context: PresetContext): Promise<PresetAsset> {
let name: string = context.custom.config?.pluginName as unknown as string;
if (!name) {
const pkg = await readPackage();
name = pkg.name.split("plugin-").pop() as string;
}
return {
extends: ["@lumeweb/node-library-preset"],
template: {
"build.js": (context) => {
const content = loadFile(resolve(TEMPLATES, "build.js"), "text");
const variable = buildOptions(context);
return template(content, variable);
},
},
scripts: resolve(TEMPLATES, "scripts.yaml"),
noSymlinks: ["build.js"],
supplementaryConfig: {
"gitignore": ["build.js"],
"tsconfig": {
compilerOptions: {
moduleResolution: "nodenext",
},
},
"tsconfig.build": {
include: ["{buildSource}"],
compilerOptions: {
outDir: "{source}",
},
},
"esbuild": {
entryPoints: ["{source}/index.js"],
outfile: `{output}/${name}.js`,
format: "cjs",
bundle: true,
platform: "node",
mainFields: ["main", "module"],
conditions: ["require"],
},
"release": {
plugins: {
3: ["@semantic-release/npm", { npmPublish: false }],
},
},
},
variable: DEFAULT_VARIABLE,
};
}

View File

@ -1,3 +0,0 @@
import esbuild from "esbuild";
esbuild.buildSync({esbuildOptions});

View File

@ -1,6 +0,0 @@
# replace the `prepare` template from presetter-preset
# so that the build procedure will not be triggered upon package installation
build: cross-env NODE_ENV=production run-s clean build:typescript:* build:esbuild
build:esbuild: node build.js
develop: cross-env NODE_ENV=development run-s "build:esbuild -- --watch {@}" --
clean:buildOutput: shx rm -rf {source}