Skip to content

Instantly share code, notes, and snippets.

@surister
Created January 30, 2022 15:15
Show Gist options
  • Save surister/99036b618a6231ecdc2cb55845dea072 to your computer and use it in GitHub Desktop.
Save surister/99036b618a6231ecdc2cb55845dea072 to your computer and use it in GitHub Desktop.
Simple script to automatically fix https://github.com/vuejs/vue-cli/issues/6784
#!/usr/bin/env python
__author__ = 'surister'
__author_contact__ = 'github/surister'
import pathlib
import sys
if len(sys.argv) < 2:
raise Exception('Expected one argument with ".../project/node_modules/@vue/" path')
if 'vue' not in sys.argv[1]:
raise ValueError('Hey, are you sure you are passing a @vue path?')
node_vue_path = pathlib.Path(sys.argv[1])
for folder in node_vue_path.iterdir():
(node_vue_path / folder / 'locales/').mkdir(exist_ok=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment