Skip to content

Commit

Permalink
feat: add markers snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Mar 13, 2019
1 parent 5526463 commit 8ba7c31
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 16 deletions.
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
"title": "Generate Index"
}
],
"snippets": [
{
"path": "./dist/markers.code-snippets"
}
],
"configuration": {
"title": "Generate Index",
"properties": {
Expand All @@ -48,7 +53,7 @@
},
"scripts": {
"vscode:prepublish": "yarn run compile",
"compile": "bili",
"compile": "bili && cpy src/markers.code-snippets dist/",
"watch": "bili --watch",
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "yarn run compile && node ./node_modules/vscode/bin/test",
Expand Down Expand Up @@ -76,6 +81,7 @@
"@types/mocha": "^2.2.42",
"@types/node": "^10.12.21",
"bili": "^4.4.0",
"cpy-cli": "^2.0.0",
"eslint": "^5.15.1",
"eslint-config-io": "^0.1.1",
"standard-version": "^5.0.1",
Expand Down
16 changes: 16 additions & 0 deletions src/markers.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"@index": {
"prefix": "@index",
"body": [
"@index('./*', (pp, cc) => `export { default as ${pp.name} } from '${pp.path}'`)"
],
"description": "@index marker"
},
"@endindex": {
"prefix": "@endindex",
"body": [
"@endindex"
],
"description": "@endindex marker"
}
}
73 changes: 58 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -600,16 +600,6 @@
"@types/minimatch" "*"
"@types/node" "*"

"@types/lodash-es@^4.17.3":
version "4.17.3"
resolved "https://registry.yarnpkg.com/@types/lodash-es/-/lodash-es-4.17.3.tgz#87eb0b3673b076b8ee655f1890260a136af09a2d"
dependencies:
"@types/lodash" "*"

"@types/lodash@*":
version "4.14.123"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.123.tgz#39be5d211478c8dd3bdae98ee75bb7efe4abfe4d"

"@types/minimatch@*":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
Expand Down Expand Up @@ -1455,6 +1445,32 @@ cosmiconfig@^5.0.0:
lodash.get "^4.4.2"
parse-json "^4.0.0"

cp-file@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/cp-file/-/cp-file-6.1.0.tgz#b48d2d80577d4c5025c68eb597a38093c1dc9ccf"
dependencies:
graceful-fs "^4.1.2"
make-dir "^2.0.0"
nested-error-stacks "^2.0.0"
pify "^4.0.1"
safe-buffer "^5.0.1"

cpy-cli@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/cpy-cli/-/cpy-cli-2.0.0.tgz#13f1528a231605c52ee7b7f74848e4be82253274"
dependencies:
cpy "^7.0.0"
meow "^5.0.0"

cpy@^7.0.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/cpy/-/cpy-7.1.0.tgz#085aa6077b28d211d585521ad7d8f3d05234a31d"
dependencies:
arrify "^1.0.1"
cp-file "^6.1.0"
globby "^9.1.0"
nested-error-stacks "^2.0.0"

cross-spawn@^6.0.0, cross-spawn@^6.0.5:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
Expand Down Expand Up @@ -3131,10 +3147,6 @@ locate-path@^3.0.0:
p-locate "^3.0.0"
path-exists "^3.0.0"

lodash-es@^4.17.11:
version "4.17.11"
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.11.tgz#145ab4a7ac5c5e52a3531fb4f310255a152b4be0"

lodash._reinterpolate@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
Expand Down Expand Up @@ -3217,6 +3229,13 @@ magic-string@^0.25.1, magic-string@^0.25.2:
dependencies:
sourcemap-codec "^1.4.4"

make-dir@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
dependencies:
pify "^4.0.1"
semver "^5.6.0"

map-age-cleaner@^0.1.1:
version "0.1.3"
resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a"
Expand Down Expand Up @@ -3290,6 +3309,20 @@ meow@^4.0.0:
redent "^2.0.0"
trim-newlines "^2.0.0"

meow@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4"
dependencies:
camelcase-keys "^4.0.0"
decamelize-keys "^1.0.0"
loud-rejection "^1.0.0"
minimist-options "^3.0.1"
normalize-package-data "^2.3.4"
read-pkg-up "^3.0.0"
redent "^2.0.0"
trim-newlines "^2.0.0"
yargs-parser "^10.0.0"

merge-stream@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
Expand Down Expand Up @@ -3430,6 +3463,10 @@ natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"

nested-error-stacks@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz#0fbdcf3e13fe4994781280524f8b96b0cdff9c61"

nice-try@^1.0.4:
version "1.0.5"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
Expand Down Expand Up @@ -4629,7 +4666,7 @@ sax@~1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"

"semver@2 || 3 || 4 || 5", semver@^5.2.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1:
"semver@2 || 3 || 4 || 5", semver@^5.2.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"

Expand Down Expand Up @@ -5502,6 +5539,12 @@ write@1.0.3:
version "4.0.0"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"

yargs-parser@^10.0.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8"
dependencies:
camelcase "^4.1.0"

yargs-parser@^11.1.1:
version "11.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4"
Expand Down

0 comments on commit 8ba7c31

Please sign in to comment.