Skip to content

Commit

Permalink
Add _mods.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Dec 6, 2023
1 parent ea10cb9 commit 1407b46
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:

- name: Check Type
run: |
echo "export const mods = {};" > denops/ddc/_mods.js
find denops -name "*.ts"| xargs deno test --unstable --no-run -A
- name: Check with deno lint
Expand All @@ -45,6 +44,5 @@ jobs:

- name: Test
run: |
echo "export const mods = {};" > denops/ddc/_mods.js
grep -rl Deno.test denops| xargs deno test --unstable -A
timeout-minutes: 5
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
denops/ddc/_mods.js
10 changes: 1 addition & 9 deletions autoload/ddc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,11 @@ function ddc#enable(opts = {}) abort
silent! call context_filetype#get_filetype()
endif

" Create default mods file.
const mods = [s:root_dir, 'denops', 'ddc', '_mods.js']->join(s:sep)
if !(mods->filereadable())
call writefile([
\ 'export const mods = {};',
\ ], mods)
endif

let g:ddc#_started = reltime()
let g:ddc#_context_filetype = context_filetype
let g:ddc#_skip_next_complete = 0
if !('g:ddc#_mods'->exists())
const g:ddc#_mods = mods
const g:ddc#_mods = [s:root_dir, 'denops', 'ddc', '_mods.js']->join(s:sep)
endif

" NOTE: ddc.vim must be registered manually.
Expand Down
3 changes: 3 additions & 0 deletions denops/ddc/_mods.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// NOTE: It is dummy module. The file will be overwritten by
// "ddc#set_static_import_path()".
export const mods = {};

0 comments on commit 1407b46

Please sign in to comment.