xeaone / language-javascript-plus Goto Github PK
View Code? Open in Web Editor NEWJavaScriptPlus | Syntax Highlighting For Template Strings In Atom
License: Mozilla Public License 2.0
JavaScriptPlus | Syntax Highlighting For Template Strings In Atom
License: Mozilla Public License 2.0
In the 1.41.0 update, I get the following message in console:
:11 Failed to require the main module of 'language-javascript-plus' because it requires one or more incompatible native modules (tree-sitter-javascript).
Runapm rebuild
in the package directory and restart Atom to resolve.
...But running apm rebuild
in the .atom/packages/language-javascript-plus
directory or the Atom packages directory did not help avoid this message.
hyperHTML - a popular library for declarative and reactive Web Applications, uses a template tag literal.
// bind hyperHTML to a generic DOM container
--
| const bodyRender = hyperHTML.bind(document.body);
|
| // use it to declare any layout you needed
| bodyRender`
| <h1>${document.title}</h1>
| <ul>
| ${[
| {name: 'First item'},
| {name: 'Second item'},
| {name: 'Third item'}
| ].map(item =>
| `<li>${item.name}</li>`)}
| </ul>
| `;
It would be great if your package could support template tag literals.
When I try to install, it fails and outputs this: https://pastebin.com/1M28G631
This is a suggested enhancement for the general sentiment expressed in a comment towards the end of atom/atom#11589:
But this line of code has no business in any of my source files, because it doesn't do anything except hack my editor.
As I tried using this in my project, I realised that it took too many extra things to get it working properly. It would be fine if I was the only one contributing but since there are multiple developers with non-Atom editors, we need a non-intrusive way of tagging template literals.
I can't remember where I saw this suggested solution, but the idea was to use comment triggers as they are safely ignored if the editor doesn't have special handling for them.
I've gone ahead and submitted a PR to add comment triggers. Template literals prefixed with /* @html */
will be highlighted as HTML, and similarly for CSS.
Please consider adding this in.
Error message when I tray to install language-javascript-plus:
C:\Users\joago>apm install language-javascript-plus
Installing language-javascript-plus to C:\Users\joago.atom\packages failed
[email protected] install C:\Users\joago\AppData\Local\Temp\apm-install-dir-120115-84156-scsrkj.8qcd\node_modules\language-javascript-plus\node_modules\tree-sitter-javascript
node-gyp rebuild
C:\Users\joago\AppData\Local\Temp\apm-install-dir-120115-84156-scsrkj.8qcd\node_modules\language-javascript-plus\node_modules\tree-sitter-javascript>if not defined npm_config_node_gyp (node "C:\Users\joago\AppData\Local\atom\app-1.44.0\resources\app\apm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\joago\AppData\Local\atom\app-1.44.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\joago\AppData\Local\atom\app-1.44.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\configure.js:492:19)
gyp ERR! stack at PythonFinder. (C:\Users\joago\AppData\Local\atom\app-1.44.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\configure.js:517:16)
gyp ERR! stack at C:\Users\joago\AppData\Local\atom\app-1.44.0\resources\app\apm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:182:21)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Users\joago\AppData\Local\atom\app-1.44.0\resources\app\apm\bin\node.exe" "C:\Users\joago\AppData\Local\atom\app-1.44.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\joago\AppData\Local\Temp\apm-install-dir-120115-84156-scsrkj.8qcd\node_modules\language-javascript-plus\node_modules\tree-sitter-javascript
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\joago\AppData\Local\Temp\apm-install-dir-120115-84156-scsrkj.8qcd\package.json'
npm WARN apm-install-dir-120115-84156-scsrkj.8qcd No description
npm WARN apm-install-dir-120115-84156-scsrkj.8qcd No repository field.
npm WARN apm-install-dir-120115-84156-scsrkj.8qcd No README data
npm WARN apm-install-dir-120115-84156-scsrkj.8qcd No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\joago.atom.apm_logs\2020-02-15T15_24_23_644Z-debug.log
My configuration:
2020-02-15T15_27_45_542Z-debug.log
C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft VS Code\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\MinGW\bin;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;%NVM_HOME%;%NVM_SYMLINK%;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64;
Am getting this build error (on a Mac) when trying to install:
Installing “[email protected]” failed.Hide output…
> [email protected] install /private/var/folders/_t/4jr_jw4j7n5_yvkv7km5z2r40000gp/T/apm-install-dir-11946-93934-xsp6vj.sp46/node_modules/language-javascript-plus/node_modules/tree-sitter-javascript
> node-gyp rebuild
gyp info it worked if it ends with ok
gyp verb cli [ '/Applications/Atom.app/Contents/Resources/app/apm/bin/node',
gyp verb cli '/Applications/Atom.app/Contents/Resources/app/apm/node_modules/.bin/node-gyp',
gyp verb cli 'rebuild' ]
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "/Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh" in the PATH
gyp verb `which` succeeded /Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh /Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh
gyp verb check python version `/Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh -c "import platform; print(platform.python_version());"` returned: "2.7.10\n"
gyp verb get node dir compiling against --target node version: 2.0.18
gyp verb command install [ '2.0.18' ]
gyp verb install input version string "2.0.18"
gyp verb install installing version: iojs-2.0.18
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: iojs-2.0.18
gyp verb build dir attempting to create "build" dir: /private/var/folders/_t/4jr_jw4j7n5_yvkv7km5z2r40000gp/T/apm-install-dir-11946-93934-xsp6vj.sp46/node_modules/language-javascript-plus/node_modules/tree-sitter-javascript/build
gyp verb build dir "build" dir needed to be created? /private/var/folders/_t/4jr_jw4j7n5_yvkv7km5z2r40000gp/T/apm-install-dir-11946-93934-xsp6vj.sp46/node_modules/language-javascript-plus/node_modules/tree-sitter-javascript/build
gyp verb build/config.gypi creating config file
gyp sill build/config.gypi { target_defaults:
gyp sill build/config.gypi { cflags: [],
gyp sill build/config.gypi default_configuration: 'Release',
gyp sill build/config.gypi defines: [],
gyp sill build/config.gypi include_dirs: [],
gyp sill build/config.gypi libraries: [] },
gyp sill build/config.gypi variables:
gyp sill build/config.gypi { asan: 0,
gyp sill build/config.gypi coverage: false,
gyp sill build/config.gypi debug_devtools: 'node',
gyp sill build/config.gypi debug_http2: false,
gyp sill build/config.gypi debug_nghttp2: false,
gyp sill build/config.gypi force_dynamic_crt: 0,
gyp sill build/config.gypi host_arch: 'x64',
gyp sill build/config.gypi icu_data_file: 'icudt59l.dat',
gyp sill build/config.gypi icu_data_in: '../../deps/icu-small/source/data/in/icudt59l.dat',
gyp sill build/config.gypi icu_endianness: 'l',
gyp sill build/config.gypi icu_gyp_path: 'tools/icu/icu-generic.gyp',
gyp sill build/config.gypi icu_locales: 'en,root',
gyp sill build/config.gypi icu_path: 'deps/icu-small',
gyp sill build/config.gypi icu_small: true,
gyp sill build/config.gypi icu_ver_major: '59',
gyp sill build/config.gypi llvm_version: 0,
gyp sill build/config.gypi node_byteorder: 'little',
gyp sill build/config.gypi node_enable_d8: false,
gyp sill build/config.gypi node_enable_v8_vtunejit: false,
gyp sill build/config.gypi node_install_npm: true,
gyp sill build/config.gypi node_module_version: 57,
gyp sill build/config.gypi node_no_browser_globals: false,
gyp sill build/config.gypi node_prefix: '/',
gyp sill build/config.gypi node_release_urlbase: 'https://nodejs.org/download/release/',
gyp sill build/config.gypi node_shared: false,
gyp sill build/config.gypi node_shared_cares: false,
gyp sill build/config.gypi node_shared_http_parser: false,
gyp sill build/config.gypi node_shared_libuv: false,
gyp sill build/config.gypi node_shared_openssl: false,
gyp sill build/config.gypi node_shared_zlib: false,
gyp sill build/config.gypi node_tag: '',
gyp sill build/config.gypi node_use_bundled_v8: true,
gyp sill build/config.gypi node_use_dtrace: true,
gyp sill build/config.gypi node_use_etw: false,
gyp sill build/config.gypi node_use_lttng: false,
gyp sill build/config.gypi node_use_openssl: true,
gyp sill build/config.gypi node_use_perfctr: false,
gyp sill build/config.gypi node_use_v8_platform: true,
gyp sill build/config.gypi node_without_node_options: false,
gyp sill build/config.gypi openssl_fips: '',
gyp sill build/config.gypi openssl_no_asm: 0,
gyp sill build/config.gypi shlib_suffix: '57.dylib',
gyp sill build/config.gypi target_arch: 'x64',
gyp sill build/config.gypi uv_parent_path: '/deps/uv/',
gyp sill build/config.gypi uv_use_dtrace: true,
gyp sill build/config.gypi v8_enable_gdbjit: 0,
gyp sill build/config.gypi v8_enable_i18n_support: 1,
gyp sill build/config.gypi v8_enable_inspector: 1,
gyp sill build/config.gypi v8_no_strict_aliasing: 1,
gyp sill build/config.gypi v8_optimized_debug: 0,
gyp sill build/config.gypi v8_promise_internal_field_count: 1,
gyp sill build/config.gypi v8_random_seed: 0,
gyp sill build/config.gypi v8_trace_maps: 0,
gyp sill build/config.gypi v8_use_snapshot: true,
gyp sill build/config.gypi want_separate_host_toolset: 0,
gyp sill build/config.gypi xcode_version: '7.0',
gyp sill build/config.gypi nodedir: '/Users/brett/.atom/.node-gyp/.node-gyp/iojs-2.0.18',
gyp sill build/config.gypi copy_dev_lib: true,
gyp sill build/config.gypi standalone_static_library: 1,
gyp sill build/config.gypi dry_run: '',
gyp sill build/config.gypi legacy_bundling: '',
gyp sill build/config.gypi save_dev: '',
gyp sill build/config.gypi browser: '',
gyp sill build/config.gypi commit_hooks: 'true',
gyp sill build/config.gypi only: '',
gyp sill build/config.gypi viewer: 'man',
gyp sill build/config.gypi also: '',
gyp sill build/config.gypi rollback: 'true',
gyp sill build/config.gypi sign_git_commit: '',
gyp sill build/config.gypi audit: 'true',
gyp sill build/config.gypi usage: '',
gyp sill build/config.gypi runtime: 'electron',
gyp sill build/config.gypi globalignorefile: '/Applications/Atom.app/Contents/Resources/app/apm/etc/npmignore',
gyp sill build/config.gypi init_author_url: '',
gyp sill build/config.gypi maxsockets: '50',
gyp sill build/config.gypi shell: '/bin/bash',
gyp sill build/config.gypi metrics_registry: 'https://registry.npmjs.org/',
gyp sill build/config.gypi parseable: '',
gyp sill build/config.gypi shrinkwrap: 'true',
gyp sill build/config.gypi init_license: 'ISC',
gyp sill build/config.gypi timing: '',
gyp sill build/config.gypi if_present: '',
gyp sill build/config.gypi cache_max: 'Infinity',
gyp sill build/config.gypi init_author_email: '',
gyp sill build/config.gypi sign_git_tag: '',
gyp sill build/config.gypi dist_url: 'https://atom.io/download/electron',
gyp sill build/config.gypi cert: '',
gyp sill build/config.gypi git_tag_version: 'true',
gyp sill build/config.gypi local_address: '',
gyp sill build/config.gypi long: '',
gyp sill build/config.gypi fetch_retries: '2',
gyp sill build/config.gypi registry: 'https://registry.npmjs.org/',
gyp sill build/config.gypi no_proxy: '',
gyp sill build/config.gypi key: '',
gyp sill build/config.gypi message: '%s',
gyp sill build/config.gypi versions: '',
gyp sill build/config.gypi globalconfig: '/Users/brett/.atom/.apm/.apmrc',
gyp sill build/config.gypi always_auth: '',
gyp sill build/config.gypi logs_max: '10',
gyp sill build/config.gypi prefer_online: '',
gyp sill build/config.gypi global_style: 'true',
gyp sill build/config.gypi cache_lock_retries: '10',
gyp sill build/config.gypi update_notifier: 'true',
gyp sill build/config.gypi heading: 'npm',
gyp sill build/config.gypi fetch_retry_mintimeout: '10000',
gyp sill build/config.gypi offline: '',
gyp sill build/config.gypi read_only: '',
gyp sill build/config.gypi searchlimit: '20',
gyp sill build/config.gypi access: '',
gyp sill build/config.gypi json: '',
gyp sill build/config.gypi allow_same_version: '',
gyp sill build/config.gypi description: 'true',
gyp sill build/config.gypi engine_strict: '',
gyp sill build/config.gypi https_proxy: '',
gyp sill build/config.gypi userconfig: '/Users/brett/.atom/.apmrc',
gyp sill build/config.gypi init_module: '/Users/brett/.atom/.node-gyp/.npm-init.js',
gyp sill build/config.gypi cidr: '',
gyp sill build/config.gypi node_version: '8.9.3',
gyp sill build/config.gypi user: '502',
gyp sill build/config.gypi target: '2.0.18',
gyp sill build/config.gypi auth_type: 'legacy',
gyp sill build/config.gypi editor: 'vi',
gyp sill build/config.gypi ignore_prepublish: '',
gyp sill build/config.gypi save: 'true',
gyp sill build/config.gypi script_shell: '',
gyp sill build/config.gypi tag: 'latest',
gyp sill build/config.gypi progress: '',
gyp sill build/config.gypi global: '',
gyp sill build/config.gypi ham_it_up: '',
gyp sill build/config.gypi optional: 'true',
gyp sill build/config.gypi searchstaleness: '900',
gyp sill build/config.gypi bin_links: 'true',
gyp sill build/config.gypi force: '',
gyp sill build/config.gypi save_prod: '',
gyp sill build/config.gypi searchopts: '',
gyp sill build/config.gypi node_gyp: '/Applications/Atom.app/Contents/Resources/app/apm/bin/../node_modules/.bin/node-gyp',
gyp sill build/config.gypi depth: 'Infinity',
gyp sill build/config.gypi rebuild_bundle: 'true',
gyp sill build/config.gypi sso_poll_frequency: '500',
gyp sill build/config.gypi unicode: '',
gyp sill build/config.gypi fetch_retry_maxtimeout: '60000',
gyp sill build/config.gypi ca: '',
gyp sill build/config.gypi save_prefix: '^',
gyp sill build/config.gypi scripts_prepend_node_path: 'warn-only',
gyp sill build/config.gypi sso_type: 'oauth',
gyp sill build/config.gypi strict_ssl: 'true',
gyp sill build/config.gypi tag_version_prefix: 'v',
gyp sill build/config.gypi dev: '',
gyp sill build/config.gypi fetch_retry_factor: '10',
gyp sill build/config.gypi group: '20',
gyp sill build/config.gypi save_exact: '',
gyp sill build/config.gypi cache_lock_stale: '60000',
gyp sill build/config.gypi prefer_offline: '',
gyp sill build/config.gypi version: '',
gyp sill build/config.gypi cache_min: '10',
gyp sill build/config.gypi otp: '',
gyp sill build/config.gypi cache: '/Users/brett/.atom/.apm',
gyp sill build/config.gypi searchexclude: '',
gyp sill build/config.gypi color: 'true',
gyp sill build/config.gypi package_lock: 'true',
gyp sill build/config.gypi package_lock_only: '',
gyp sill build/config.gypi save_optional: '',
gyp sill build/config.gypi user_agent: 'npm/6.2.0 node/v8.9.3 darwin x64',
gyp sill build/config.gypi ignore_scripts: '',
gyp sill build/config.gypi cache_lock_wait: '10000',
gyp sill build/config.gypi production: 'true',
gyp sill build/config.gypi save_bundle: '',
gyp sill build/config.gypi send_metrics: '',
gyp sill build/config.gypi init_version: '1.0.0',
gyp sill build/config.gypi node_options: '',
gyp sill build/config.gypi umask: '0022',
gyp sill build/config.gypi scope: '',
gyp sill build/config.gypi git: 'git',
gyp sill build/config.gypi init_author_name: '',
gyp sill build/config.gypi onload_script: '',
gyp sill build/config.gypi tmp: '/var/folders/_t/4jr_jw4j7n5_yvkv7km5z2r40000gp/T',
gyp sill build/config.gypi unsafe_perm: 'true',
gyp sill build/config.gypi link: '',
gyp sill build/config.gypi prefix: '/Applications/Atom.app/Contents/Resources/app/apm' } }
gyp verb build/config.gypi writing out config file: /private/var/folders/_t/4jr_jw4j7n5_yvkv7km5z2r40000gp/T/apm-install-dir-11946-93934-xsp6vj.sp46/node_modules/language-javascript-plus/node_modules/tree-sitter-javascript/build/config.gypi
gyp verb config.gypi checking for gypi file: /private/var/folders/_t/4jr_jw4j7n5_yvkv7km5z2r40000gp/T/apm-install-dir-11946-93934-xsp6vj.sp46/node_modules/language-javascript-plus/node_modules/tree-sitter-javascript/config.gypi
gyp verb common.gypi checking for gypi file: /private/var/folders/_t/4jr_jw4j7n5_yvkv7km5z2r40000gp/T/apm-install-dir-11946-93934-xsp6vj.sp46/node_modules/language-javascript-plus/node_modules/tree-sitter-javascript/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh
gyp info spawn args [ '/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/private/var/folders/_t/4jr_jw4j7n5_yvkv7km5z2r40000gp/T/apm-install-dir-11946-93934-xsp6vj.sp46/node_modules/language-javascript-plus/node_modules/tree-sitter-javascript/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/brett/.atom/.node-gyp/.node-gyp/iojs-2.0.18/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/brett/.atom/.node-gyp/.node-gyp/iojs-2.0.18',
gyp info spawn args '-Dnode_gyp_dir=/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=iojs.lib',
gyp info spawn args '-Dmodule_root_dir=/private/var/folders/_t/4jr_jw4j7n5_yvkv7km5z2r40000gp/T/apm-install-dir-11946-93934-xsp6vj.sp46/node_modules/language-javascript-plus/node_modules/tree-sitter-javascript',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Traceback (most recent call last):
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
sys.exit(gyp.script_main())
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
return main(sys.argv[1:])
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
return gyp_main(args)
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2170, in GenerateOutput
part_of_all=qualified_target in needed_targets)
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 795, in Write
self.Pchify))
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1190, in WriteSources
cflags = self.xcode_settings.GetCflags(configname)
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 551, in GetCflags
archs = self.GetActiveArchs(self.configname)
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 420, in GetActiveArchs
xcode_archs_default = GetXcodeArchsDefault()
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 118, in GetXcodeArchsDefault
xcode_version, _ = XcodeVersion()
File "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1265, in XcodeVersion
version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /private/var/folders/_t/4jr_jw4j7n5_yvkv7km5z2r40000gp/T/apm-install-dir-11946-93934-xsp6vj.sp46/node_modules/language-javascript-plus/node_modules/tree-sitter-javascript
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/private/var/folders/_t/4jr_jw4j7n5_yvkv7km5z2r40000gp/T/apm-install-dir-11946-93934-xsp6vj.sp46/package.json'
npm WARN apm-install-dir-11946-93934-xsp6vj.sp46 No description
npm WARN apm-install-dir-11946-93934-xsp6vj.sp46 No repository field.
npm WARN apm-install-dir-11946-93934-xsp6vj.sp46 No README data
npm WARN apm-install-dir-11946-93934-xsp6vj.sp46 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/brett/.atom/.apm/_logs/2019-05-06T08_12_30_426Z-debug.log
Consider the following:
var variable = `this is just some html`;
var variable2 = `some more`;
The above triggers a wrong highlight for the string starting from html`
and ending at = `
. This is because of #html
rule. If you change html
→ .html
, it gets caught by #html-dot
as well.
I was able to solve it by redeclaring the rules (from atom/language-javascript) to match strings in #html, like:
"html": {
"patterns": [
{
"begin": "`",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.js"
}
},
"end": "`",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.js"
}
},
"name": "string.quoted.template.js",
"patterns": [
{
"include": "#string_escapes"
},
{
"include": "#interpolated_js"
}
]
},
{
"begin": "/\\*",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.begin.js"
}
},
"end": "\\*/",
"endCaptures": {
"0": {
"name": "punctuation.definition.comment.end.js"
}
},
"name": "comment.block.js"
},
{
"begin": "//",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.js"
}
},
"end": "$",
"name": "comment.line.double-slash.js"
},
{
"begin": "([hH][tT][mM][lL]|innerHTML)\\s*(:*\\+*=*)\\s*(`)",
"beginCaptures": {
"2": {
"name": "keyword.operator.assignment.js"
},
"3": {
"name": "punctuation.definition.string.begin.js"
}
},
"end": "`",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.js"
}
},
"patterns": [
{
"include": "text.html.basic"
}
]
}
]
},
But that feels wrong. I shouldn't have to fully redeclare rules.
This plugin works great for var
and let
but for some reason const
breaks the syntax highlighting
While language-babel already appears to do this, I'm wondering if you might similarly support a simple option to add other languages (e.g., a space-separated input box in settings) (I'm not interested in all of the other Babel features of that package).
In looking at https://github.com/vokeio/language-javascript-plus/blob/master/index.js , it seems it might not be too complicated to simply concat onto the languages
array there, using the user's extra languages?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.