Skip to content

Commit

Permalink
Initial project setup
Browse files Browse the repository at this point in the history
  • Loading branch information
darlal committed Aug 19, 2020
1 parent 9a8277e commit 9cfc249
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"electron": "8.2.5"
},
"useBuiltIns": "usage",
"corejs": 3
}
]
]
}
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
coverage/
demo/
dist/
node_modules
support/demo_template/sample.js
benchmark/extra/
29 changes: 29 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"env": {
"es6": true
},
"plugins": [
"@babel"
],
"extends": [
"airbnb-base"
],
"rules": {
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_"
}
]
}
}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
.DS_Store
yarn.lock
package-lock.json

### VisualStudioCode ###
.vscode/*
*.code-workspace
39 changes: 39 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "obsidian-switcher-plus",
"version": "0.0.1",
"description": "Enhanced Quick Switcher plugin for Obsidian.md.",
"repository": {
"type": "git",
"url": "https://github.com/darlal/obsidian-switcher-plus"
},
"main": "./src/switcher-plus-volcano.js",
"scripts": {
"build": "npm run lint && rollup -c rollup.config.js",
"lint": "eslint .",
"test": "npm run lint && mocha test"
},
"keywords": [
"obsidian",
"obsidianmd",
"obsidian-plugin"
],
"author": "darlal",
"license": "GPL-3.0-only",
"devDependencies": {
"@babel/core": "^7.11.0",
"@babel/eslint-parser": "^7.11.0",
"@babel/eslint-plugin": "^7.11.0",
"@babel/preset-env": "^7.11.0",
"@rollup/plugin-babel": "^5.2.0",
"@rollup/plugin-commonjs": "^14.0.0",
"@rollup/plugin-node-resolve": "^8.4.0",
"eslint": "^7.2.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-plugin-import": "^2.22.0",
"mocha": "^7.2.0",
"rollup": "^2.23.0"
},
"dependencies": {
"core-js": "^3.6.5"
}
}
29 changes: 29 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import commonjs from '@rollup/plugin-commonjs';
import babel from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';

const VOLCANO_PLUGINS = ['switcher-plus'];

const createVolcanoConfig = (filename) => ({
input: `src/${filename}-volcano.js`,
treeshake: false,
output: [
{
dir: 'dist/volcano',
format: 'umd',
name: filename,
},
],
plugins: [
commonjs(),
nodeResolve(),
babel({
babelHelpers: 'bundled',
exclude: 'node_modules/**',
}),
],
});

const volcanoConfigs = VOLCANO_PLUGINS.map((filename) => createVolcanoConfig(filename));

export default [...volcanoConfigs];

0 comments on commit 9cfc249

Please sign in to comment.