mirror of
https://github.com/dnlbauer/obsidian-dataview-autocompletion.git
synced 2026-07-22 05:32:56 +00:00
chore: update build config; sync version in manifest and package.json
This commit is contained in:
parent
846315c3a7
commit
97391f4256
4 changed files with 25 additions and 25 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -31,3 +31,5 @@ test-vault/.obsidian/*
|
|||
# If its import to test though, add it somewhere where other
|
||||
# people can test it too.
|
||||
test-vault/untracked/*
|
||||
|
||||
build
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "obsidian-dataview-autocompletion",
|
||||
"id": "dataview-autocompletion",
|
||||
"name": "Dataview Autocompletion",
|
||||
"version": "0.6.0",
|
||||
"version": "0.8.0",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Adds autocompletion to Dataview metadata fields",
|
||||
"author": "Daniel Bauer",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "obsidian-dataview-autocompletion",
|
||||
"version": "1.0.0",
|
||||
"version": "0.8",
|
||||
"description": "This is a plugin for Obsidian that provides autocompletion for Dataview metadata fields",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
@ -8,8 +8,7 @@
|
|||
"build": "npx rollup --config rollup.config.js --environment BUILD:production",
|
||||
"check-format": "npx prettier --check src",
|
||||
"test": "npx jest",
|
||||
"version": "node version-bump.mjs && git add manifest.json versions.json",
|
||||
"prepare": "husky"
|
||||
"version": "node ersion-bump.mjs && git add manifest.json versions.json"
|
||||
},
|
||||
"keywords": [
|
||||
"Obsidian",
|
||||
|
|
|
|||
|
|
@ -3,16 +3,31 @@ import commonjs from "@rollup/plugin-commonjs";
|
|||
import copy from "rollup-plugin-copy";
|
||||
import typescript2 from "rollup-plugin-typescript2";
|
||||
|
||||
const BASE_CONFIG = {
|
||||
const createBaseConfig = (outdir) => ({
|
||||
input: "src/main.ts",
|
||||
external: ["obsidian"],
|
||||
};
|
||||
plugins: getRollupPlugins(
|
||||
undefined,
|
||||
copy({
|
||||
targets: [
|
||||
{
|
||||
src: "manifest.json",
|
||||
dest: outdir,
|
||||
},
|
||||
{
|
||||
src: "styles.css",
|
||||
dest: outdir,
|
||||
},
|
||||
],
|
||||
}),
|
||||
),
|
||||
});
|
||||
|
||||
const getRollupPlugins = (tsconfig, ...plugins) =>
|
||||
[typescript2(tsconfig), nodeResolve({ browser: true }), commonjs()].concat(plugins);
|
||||
|
||||
const DEV_PLUGIN_CONFIG = {
|
||||
...BASE_CONFIG,
|
||||
...createBaseConfig("test-vault/.obsidian/plugins/dataview-suggester"),
|
||||
output: {
|
||||
dir: "test-vault/.obsidian/plugins/dataview-suggester",
|
||||
sourcemap: "inline",
|
||||
|
|
@ -20,25 +35,10 @@ const DEV_PLUGIN_CONFIG = {
|
|||
exports: "default",
|
||||
name: "Dataview Suggester (Development)",
|
||||
},
|
||||
plugins: getRollupPlugins(
|
||||
undefined,
|
||||
copy({
|
||||
targets: [
|
||||
{
|
||||
src: "manifest.json",
|
||||
dest: "test-vault/.obsidian/plugins/dataview-suggester/",
|
||||
},
|
||||
{
|
||||
src: "styles.css",
|
||||
dest: "test-vault/.obsidian/plugins/dataview-suggester/",
|
||||
},
|
||||
],
|
||||
}),
|
||||
),
|
||||
};
|
||||
|
||||
const PROD_PLUGIN_CONFIG = {
|
||||
...BASE_CONFIG,
|
||||
...createBaseConfig("build"),
|
||||
output: {
|
||||
dir: "build",
|
||||
sourcemap: "inline",
|
||||
|
|
@ -47,7 +47,6 @@ const PROD_PLUGIN_CONFIG = {
|
|||
exports: "default",
|
||||
name: "Dataview Suggester (Production)",
|
||||
},
|
||||
plugins: getRollupPlugins(),
|
||||
};
|
||||
|
||||
let configs = [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue