-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
5,591 additions
and
1,654 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
extends: require.resolve('@gera2ld/plaid/config/babelrc-base'), | ||
presets: [ | ||
'@babel/preset-typescript', | ||
], | ||
plugins: [ | ||
].filter(Boolean), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* | ||
!/src | ||
!/test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
require.resolve('@gera2ld/plaid-common-ts/eslint'), | ||
], | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
}, | ||
rules: { | ||
'@typescript-eslint/no-implied-eval': 'off', | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
out | ||
dist | ||
node_modules | ||
.vscode-test/ | ||
*.vsix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"files.exclude": { | ||
"out": false // set this to true to hide the "out" folder with the compiled JS files | ||
"dist": false // set this to true to hide the "out" folder with the compiled JS files | ||
}, | ||
"search.exclude": { | ||
"out": true // set this to false to include "out" folder in search results | ||
"dist": true // set this to false to include "out" folder in search results | ||
}, | ||
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts | ||
"typescript.tsc.autoDetect": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ vsc-extension-quickstart.md | |
**/.eslintrc.json | ||
**/*.map | ||
**/*.ts | ||
node_modules/** | ||
**/rollup.conf.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Gerald | ||
|
||
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: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
{ | ||
"name": "markmap-vscode", | ||
"displayName": "Markmap", | ||
"description": "Visualize your markdown in VSCode", | ||
"version": "0.0.2", | ||
"description": "Visualize your markdown in VSCode", | ||
"author": "Gerald <[email protected]>", | ||
"license": "MIT", | ||
"displayName": "Markmap", | ||
"publisher": "gera2ld", | ||
"icon": "assets/favicon.png", | ||
"engines": { | ||
|
@@ -19,7 +21,6 @@ | |
"activationEvents": [ | ||
"onCustomEditor:markmap-vscode.markmap" | ||
], | ||
"main": "./out/extension.js", | ||
"contributes": { | ||
"customEditors": [ | ||
{ | ||
|
@@ -35,41 +36,41 @@ | |
] | ||
}, | ||
"scripts": { | ||
"vscode:prepublish": "yarn run compile", | ||
"compile": "tsc -p ./", | ||
"lint": "eslint src --ext ts", | ||
"watch": "tsc -watch -p ./", | ||
"pretest": "yarn run compile && yarn run lint", | ||
"test": "node ./out/test/runTest.js", | ||
"transform": "locky yarn yarn" | ||
"vscode:prepublish": "yarn lint && yarn clean && yarn build", | ||
"build": "rollup -c rollup.conf.js", | ||
"lint": "eslint --ext .ts,.tsx .", | ||
"watch": "rollup -wc rollup.conf.js", | ||
"transform": "locky yarn yarn", | ||
"clean": "del dist types" | ||
}, | ||
"repository": "https://github.com/gera2ld/markmap-vscode", | ||
"main": "dist/extension.js", | ||
"files": [ | ||
"dist", | ||
"types" | ||
], | ||
"typings": "types/index.d.ts", | ||
"dependencies": { | ||
"@babel/runtime": "^7.12.1", | ||
"lodash": "^4.17.20", | ||
"markmap-lib": "^0.9.3" | ||
}, | ||
"devDependencies": { | ||
"@gera2ld/locky": "^0.1.0", | ||
"@gera2ld/plaid": "~2.1.3", | ||
"@gera2ld/plaid-common-ts": "~2.1.4", | ||
"@gera2ld/plaid-rollup": "~2.1.3", | ||
"@types/glob": "^7.1.3", | ||
"@types/lodash": "^4.14.164", | ||
"@types/mocha": "^8.0.3", | ||
"@types/node": "^14.14.6", | ||
"@types/vscode": "^1.50.0", | ||
"@typescript-eslint/eslint-plugin": "^4.6.1", | ||
"@typescript-eslint/parser": "^4.6.1", | ||
"eslint": "^7.12.1", | ||
"glob": "^7.1.6", | ||
"husky": "^4.3.0", | ||
"mocha": "^8.2.1", | ||
"typescript": "^4.0.5", | ||
"vscode-test": "^1.4.1" | ||
}, | ||
"dependencies": { | ||
"lodash": "^4.17.20", | ||
"markmap-lib": "^0.9.3" | ||
"del-cli": "^3.0.1", | ||
"husky": "^4.3.0" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "yarn transform -t", | ||
"pre-push": "yarn lint" | ||
"pre-push": "yarn lint", | ||
"pre-commit": "yarn transform -t" | ||
} | ||
}, | ||
"repository": "https://github.com/gera2ld/markmap-vscode", | ||
"author": "Gerald <[email protected]>", | ||
"license": "MIT" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
const { | ||
defaultOptions, | ||
getRollupExternal, | ||
getRollupPlugins, | ||
loadConfigSync, | ||
rollupMinify, | ||
} = require('@gera2ld/plaid'); | ||
const pkg = require('./package.json'); | ||
|
||
const DIST = defaultOptions.distDir; | ||
const FILENAME = 'extension'; | ||
const BANNER = `/*! ${pkg.name} v${pkg.version} | ${pkg.license} License */`; | ||
|
||
const external = [ | ||
'path', | ||
'vscode', | ||
]; | ||
const bundleOptions = { | ||
extend: true, | ||
esModule: false, | ||
}; | ||
const postcssConfig = loadConfigSync('postcss') || require('@gera2ld/plaid/config/postcssrc'); | ||
const postcssOptions = { | ||
...postcssConfig, | ||
inject: false, | ||
}; | ||
const rollupConfig = [ | ||
{ | ||
input: { | ||
input: 'src/extension.ts', | ||
plugins: getRollupPlugins({ | ||
extensions: defaultOptions.extensions, | ||
postcss: postcssOptions, | ||
}), | ||
external, | ||
}, | ||
output: { | ||
format: 'cjs', | ||
file: `${DIST}/${FILENAME}.js`, | ||
}, | ||
}, | ||
]; | ||
|
||
rollupConfig.forEach((item) => { | ||
item.output = { | ||
indent: false, | ||
// If set to false, circular dependencies and live bindings for external imports won't work | ||
externalLiveBindings: false, | ||
...item.output, | ||
...BANNER && { | ||
banner: BANNER, | ||
}, | ||
}; | ||
}); | ||
|
||
module.exports = rollupConfig.map(({ input, output }) => ({ | ||
...input, | ||
output, | ||
})); |
Oops, something went wrong.