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