jupyterlab-makefile-file-type-extension 1.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. jupyterlab_makefile_file_type_extension-1.0.6/.claude/CLAUDE.md +1 -0
  2. jupyterlab_makefile_file_type_extension-1.0.6/.claude/JOURNAL.md +29 -0
  3. jupyterlab_makefile_file_type_extension-1.0.6/.claude/settings.local.json +21 -0
  4. jupyterlab_makefile_file_type_extension-1.0.6/.copier-answers.yml +16 -0
  5. jupyterlab_makefile_file_type_extension-1.0.6/.git +1 -0
  6. jupyterlab_makefile_file_type_extension-1.0.6/.gitignore +128 -0
  7. jupyterlab_makefile_file_type_extension-1.0.6/.prettierignore +6 -0
  8. jupyterlab_makefile_file_type_extension-1.0.6/.resources/screenshot.png +0 -0
  9. jupyterlab_makefile_file_type_extension-1.0.6/.yarnrc.yml +1 -0
  10. jupyterlab_makefile_file_type_extension-1.0.6/CHANGELOG.md +5 -0
  11. jupyterlab_makefile_file_type_extension-1.0.6/LICENSE +29 -0
  12. jupyterlab_makefile_file_type_extension-1.0.6/Makefile +120 -0
  13. jupyterlab_makefile_file_type_extension-1.0.6/PKG-INFO +180 -0
  14. jupyterlab_makefile_file_type_extension-1.0.6/README.md +125 -0
  15. jupyterlab_makefile_file_type_extension-1.0.6/RELEASE.md +80 -0
  16. jupyterlab_makefile_file_type_extension-1.0.6/babel.config.js +1 -0
  17. jupyterlab_makefile_file_type_extension-1.0.6/install.json +5 -0
  18. jupyterlab_makefile_file_type_extension-1.0.6/jest.config.js +28 -0
  19. jupyterlab_makefile_file_type_extension-1.0.6/jupyterlab_makefile_file_type_extension/__init__.py +16 -0
  20. jupyterlab_makefile_file_type_extension-1.0.6/jupyterlab_makefile_file_type_extension/_version.py +4 -0
  21. jupyterlab_makefile_file_type_extension-1.0.6/jupyterlab_makefile_file_type_extension/labextension/package.json +205 -0
  22. jupyterlab_makefile_file_type_extension-1.0.6/jupyterlab_makefile_file_type_extension/labextension/static/575.f4493e75c54f17e3b4a5.js +1 -0
  23. jupyterlab_makefile_file_type_extension-1.0.6/jupyterlab_makefile_file_type_extension/labextension/static/728.1918bf9a0180bf411ce7.js +1 -0
  24. jupyterlab_makefile_file_type_extension-1.0.6/jupyterlab_makefile_file_type_extension/labextension/static/remoteEntry.3b34b172c4b557d26b23.js +1 -0
  25. jupyterlab_makefile_file_type_extension-1.0.6/jupyterlab_makefile_file_type_extension/labextension/static/style.js +4 -0
  26. jupyterlab_makefile_file_type_extension-1.0.6/jupyterlab_makefile_file_type_extension/labextension/static/third-party-licenses.json +16 -0
  27. jupyterlab_makefile_file_type_extension-1.0.6/package-lock.json +12593 -0
  28. jupyterlab_makefile_file_type_extension-1.0.6/package.json +200 -0
  29. jupyterlab_makefile_file_type_extension-1.0.6/pyproject.toml +77 -0
  30. jupyterlab_makefile_file_type_extension-1.0.6/setup.py +1 -0
  31. jupyterlab_makefile_file_type_extension-1.0.6/src/__tests__/jupyterlab_makefile_file_type_extension.spec.ts +9 -0
  32. jupyterlab_makefile_file_type_extension-1.0.6/src/index.ts +60 -0
  33. jupyterlab_makefile_file_type_extension-1.0.6/src/makefile-mode.ts +146 -0
  34. jupyterlab_makefile_file_type_extension-1.0.6/style/base.css +5 -0
  35. jupyterlab_makefile_file_type_extension-1.0.6/style/index.css +1 -0
  36. jupyterlab_makefile_file_type_extension-1.0.6/style/index.js +1 -0
  37. jupyterlab_makefile_file_type_extension-1.0.6/tsconfig.json +25 -0
  38. jupyterlab_makefile_file_type_extension-1.0.6/tsconfig.test.json +3 -0
  39. jupyterlab_makefile_file_type_extension-1.0.6/ui-tests/README.md +167 -0
  40. jupyterlab_makefile_file_type_extension-1.0.6/ui-tests/jupyter_server_test_config.py +12 -0
  41. jupyterlab_makefile_file_type_extension-1.0.6/ui-tests/package.json +15 -0
  42. jupyterlab_makefile_file_type_extension-1.0.6/ui-tests/playwright.config.js +14 -0
  43. jupyterlab_makefile_file_type_extension-1.0.6/ui-tests/tests/jupyterlab_makefile_file_type_extension.spec.ts +21 -0
  44. jupyterlab_makefile_file_type_extension-1.0.6/ui-tests/yarn.lock +0 -0
  45. jupyterlab_makefile_file_type_extension-1.0.6/yarn.lock +9836 -0
@@ -0,0 +1 @@
1
+ - when committing to git make sure we have updated and committed package.json and lock files
@@ -0,0 +1,29 @@
1
+ # Claude Code Journal
2
+
3
+ This journal tracks substantive work on documents, diagrams, and documentation content.
4
+
5
+ ---
6
+
7
+ 1. **Task - Custom Makefile Syntax Highlighter**: Implemented custom CodeMirror language mode for Makefile syntax highlighting<br>
8
+ **Result**: Created `src/makefile-mode.ts` with comprehensive token recognition for targets, variable assignments, recipe lines, shell commands, and variable references. Replaced generic CMake mode with Makefile-specific parser that properly handles Make syntax constructs.
9
+
10
+ 2. **Task - Variable Reference Coloring**: Implemented distinct styling for different variable reference types<br>
11
+ **Result**: Make-style variables `$(VAR)` highlighted with strong emphasis, shell-style variables `${VAR}` highlighted as special, automatic variables `$@`, `$<`, etc. highlighted distinctly. Added recognition for Make functions like `$(shell ...)`, `$(wildcard ...)`, `$(patsubst ...)`.
12
+
13
+ 3. **Task - String Parsing Priority**: Fixed string handling to parse quoted text correctly before other tokens<br>
14
+ **Result**: Moved string detection to top of token parser flow, ensuring single and double quoted strings are properly recognized and highlighted throughout Makefile content including in variable assignments and recipe commands.
15
+
16
+ 4. **Task - Line Continuation Highlighting**: Added distinct highlighting for backslash line continuations<br>
17
+ **Result**: Implemented detection of backslash at end of line with `keyword.control escape` styling. Regular backslashes in middle of text remain unstyled, ensuring only true line continuations stand out visually.
18
+
19
+ 5. **Task - Custom File Type Icon**: Designed and implemented pale red settings/gear icon for Makefile files<br>
20
+ **Result**: Created SVG settings icon with pale red color (#ef9a9a) to represent build/make files. Added pattern field to file type registration to match `Makefile`, `makefile`, `GNUmakefile` filenames. Icon displays in JupyterLab file browser.
21
+
22
+ 6. **Task - Makefile Upgrade Target**: Extended project Makefile with upgrade target for dependency management<br>
23
+ **Result**: Added `upgrade` target dependent on `check_dependencies` that executes `npm update`, `yarn install`, and `yarn upgrade`. Updated `.PHONY` declarations and bumped Makefile version to 1.25.
24
+
25
+ 7. **Task - Icon Refinement to VS Code Style**: Replaced settings gear icon with bold capital M letter matching VS Code design<br>
26
+ **Result**: Implemented SVG text-based icon featuring bold (font-weight 900) capital letter "M" in pale red color. Initial color #ef9a9a adjusted to slightly redder #e57373 for better visibility and brand consistency with VS Code Makefile icon style.
27
+
28
+ 8. **Task - Icon Color Optimization**: Fine-tuned M icon color for improved visibility and aesthetic appeal<br>
29
+ **Result**: Progressively refined icon color from #e57373 to darker and more saturated #d84a4a, achieving better contrast and visual prominence in JupyterLab file browser while maintaining the recognizable red color scheme associated with Makefile icons. Version bumped to 1.0.2 to mark stable release.
@@ -0,0 +1,21 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(npm run build:lib:prod:*)",
5
+ "Bash(yarn install)",
6
+ "Bash(git add:*)",
7
+ "Bash(cat:*)",
8
+ "Bash(git commit:*)",
9
+ "Bash(git push)",
10
+ "Bash(curl:*)",
11
+ "Bash(git rebase:*)",
12
+ "Bash(git stash:*)",
13
+ "Bash(GIT_SEQUENCE_EDITOR=\"sed -i ''1s/^pick/reword/''\" git rebase -i --root)",
14
+ "Bash(git filter-branch:*)",
15
+ "Bash(git push:*)",
16
+ "Bash(git tag:*)"
17
+ ],
18
+ "deny": [],
19
+ "ask": []
20
+ }
21
+ }
@@ -0,0 +1,16 @@
1
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
+ _commit: v4.5.0
3
+ _src_path: https://github.com/jupyterlab/extension-template
4
+ author_email: konrad.jelen@gmail.com
5
+ author_name: Stellars Henson
6
+ has_ai_rules: false
7
+ has_binder: false
8
+ has_settings: false
9
+ kind: frontend
10
+ labextension_name: jupyterlab_makefile_file_type_extension
11
+ project_short_description: Jupyterlab extension to add handling of Makefiles and syntax
12
+ colouring support
13
+ python_name: jupyterlab_makefile_file_type_extension
14
+ repository: ''
15
+ test: true
16
+
@@ -0,0 +1 @@
1
+ gitdir: ../../../.git/modules/private/jupyterlab/jupyterlab_makefile_file_type_extension
@@ -0,0 +1,128 @@
1
+ *.bundle.*
2
+ lib/
3
+ node_modules/
4
+ *.log
5
+ .eslintcache
6
+ .stylelintcache
7
+ *.egg-info/
8
+ .ipynb_checkpoints
9
+ *.tsbuildinfo
10
+ jupyterlab_makefile_file_type_extension/labextension
11
+ # Version file is handled by hatchling
12
+ jupyterlab_makefile_file_type_extension/_version.py
13
+
14
+ # Integration tests
15
+ ui-tests/test-results/
16
+ ui-tests/playwright-report/
17
+
18
+ # Created by https://www.gitignore.io/api/python
19
+ # Edit at https://www.gitignore.io/?templates=python
20
+
21
+ ### Python ###
22
+ # Virtual environments
23
+ .venv
24
+
25
+ # Byte-compiled / optimized / DLL files
26
+ __pycache__/
27
+ *.py[cod]
28
+ *$py.class
29
+
30
+ # C extensions
31
+ *.so
32
+
33
+ # Distribution / packaging
34
+ .Python
35
+ build/
36
+ develop-eggs/
37
+ dist/
38
+ downloads/
39
+ eggs/
40
+ .eggs/
41
+ lib/
42
+ lib64/
43
+ parts/
44
+ sdist/
45
+ var/
46
+ wheels/
47
+ pip-wheel-metadata/
48
+ share/python-wheels/
49
+ .installed.cfg
50
+ *.egg
51
+ MANIFEST
52
+
53
+ # PyInstaller
54
+ # Usually these files are written by a python script from a template
55
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
56
+ *.manifest
57
+ *.spec
58
+
59
+ # Installer logs
60
+ pip-log.txt
61
+ pip-delete-this-directory.txt
62
+
63
+ # Unit test / coverage reports
64
+ htmlcov/
65
+ .tox/
66
+ .nox/
67
+ .coverage
68
+ .coverage.*
69
+ .cache
70
+ nosetests.xml
71
+ coverage/
72
+ coverage.xml
73
+ *.cover
74
+ .hypothesis/
75
+ .pytest_cache/
76
+
77
+ # Translations
78
+ *.mo
79
+ *.pot
80
+
81
+ # Scrapy stuff:
82
+ .scrapy
83
+
84
+ # Sphinx documentation
85
+ docs/_build/
86
+
87
+ # PyBuilder
88
+ target/
89
+
90
+ # pyenv
91
+ .python-version
92
+
93
+ # celery beat schedule file
94
+ celerybeat-schedule
95
+
96
+ # SageMath parsed files
97
+ *.sage.py
98
+
99
+ # Spyder project settings
100
+ .spyderproject
101
+ .spyproject
102
+
103
+ # Rope project settings
104
+ .ropeproject
105
+
106
+ # Mr Developer
107
+ .mr.developer.cfg
108
+ .project
109
+ .pydevproject
110
+
111
+ # mkdocs documentation
112
+ /site
113
+
114
+ # mypy
115
+ .mypy_cache/
116
+ .dmypy.json
117
+ dmypy.json
118
+
119
+ # Pyre type checker
120
+ .pyre/
121
+
122
+ # End of https://www.gitignore.io/api/python
123
+
124
+ # OSX files
125
+ .DS_Store
126
+
127
+ # Yarn cache
128
+ .yarn/
@@ -0,0 +1,6 @@
1
+ node_modules
2
+ **/node_modules
3
+ **/lib
4
+ **/package.json
5
+ !/package.json
6
+ jupyterlab_makefile_file_type_extension
@@ -0,0 +1 @@
1
+ nodeLinker: node-modules
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ <!-- <START NEW CHANGELOG ENTRY> -->
4
+
5
+ <!-- <END NEW CHANGELOG ENTRY> -->
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2025, Stellars Henson
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,120 @@
1
+ # Makefile for Jupyterlab extensions version 1.25
2
+ # author: Stellars Henson <konrad.jelen@gmail.com
3
+ # License: MIT Open Source License
4
+
5
+ .PHONY: build install clean uninstall publish dependencies mrproper increment_version install_dependencies check_dependencies upgrade help
6
+ .DEFAULT_GOAL := help
7
+
8
+ # Read current version from package.json (only if node is available)
9
+ VERSION := $(shell command -v node >/dev/null 2>&1 && node -p "require('./package.json').version" || echo "0.0.0")
10
+
11
+ ## increment project version
12
+ increment_version:
13
+ @echo "Current version: $(VERSION)"
14
+ @bash -c 'CURRENT_VERSION=$(VERSION); \
15
+ IFS="." read -r major minor patch <<< "$$CURRENT_VERSION"; \
16
+ NEW_PATCH=$$((patch + 1)); \
17
+ NEW_VERSION="$$major.$$minor.$$NEW_PATCH"; \
18
+ echo "New version: $$NEW_VERSION"; \
19
+ sed -i "s/\"version\": \"$$CURRENT_VERSION\"/\"version\": \"$$NEW_VERSION\"/" package.json; '
20
+
21
+ ## build packages
22
+ build: clean increment_version check_dependencies
23
+ npm install
24
+ yarn install
25
+ python -m build
26
+
27
+ ## install package
28
+ install: build
29
+ pip install dist/*.whl --force-reinstall
30
+
31
+ ## clean builds and installables
32
+ clean: uninstall check_dependencies
33
+ @command -v npm >/dev/null 2>&1 && npm run clean || true
34
+ @command -v npm >/dev/null 2>&1 && npm run clean:labextension || true
35
+ rm -rf dist lib || true
36
+
37
+ ## uninstall package
38
+ uninstall: check_dependencies
39
+ pip uninstall -y dist/*.whl 2>/dev/null || true
40
+
41
+ ## check if required dependencies are installed
42
+ check_dependencies:
43
+ @echo "Checking dependencies..."
44
+ @MISSING=""; \
45
+ command -v node >/dev/null 2>&1 || MISSING="$$MISSING node"; \
46
+ command -v npm >/dev/null 2>&1 || MISSING="$$MISSING npm"; \
47
+ command -v yarn >/dev/null 2>&1 || MISSING="$$MISSING yarn"; \
48
+ command -v twine >/dev/null 2>&1 || MISSING="$$MISSING twine"; \
49
+ if [ -n "$$MISSING" ]; then \
50
+ echo "Missing dependencies:$$MISSING"; \
51
+ echo "Installing missing dependencies..."; \
52
+ $(MAKE) install_dependencies; \
53
+ else \
54
+ echo "All dependencies are installed."; \
55
+ fi
56
+
57
+ ## publish package to public repository
58
+ publish: check_dependencies install
59
+ npm publish --access public
60
+ twine upload dist/*
61
+
62
+ ## install all required build dependencies
63
+ install_dependencies:
64
+ conda install -y nodejs yarn --update-all
65
+ pip install twine
66
+ npm install rimraf
67
+
68
+ ## upgrade all npm and yarn dependencies
69
+ upgrade: check_dependencies
70
+ npm update
71
+ yarn install
72
+ yarn upgrade
73
+
74
+ ## cleanup all build and metabuild artefacts
75
+ mrproper: clean uninstall
76
+ rm -rf node_modules .yarn || true
77
+
78
+ ## prints the list of available commands
79
+ help:
80
+ @echo ""
81
+ @echo "$$(tput bold)Available rules:$$(tput sgr0)"
82
+ @sed -n -e "/^## / { \
83
+ h; \
84
+ s/.*//; \
85
+ :doc" \
86
+ -e "H; \
87
+ n; \
88
+ s/^## //; \
89
+ t doc" \
90
+ -e "s/:.*//; \
91
+ G; \
92
+ s/\\n## /---/; \
93
+ s/\\n/ /g; \
94
+ p; \
95
+ }" ${MAKEFILE_LIST} \
96
+ | LC_ALL='C' sort --ignore-case \
97
+ | awk -F '---' \
98
+ -v ncol=$$(tput cols) \
99
+ -v indent=19 \
100
+ -v col_on="$$(tput setaf 6)" \
101
+ -v col_off="$$(tput sgr0)" \
102
+ '{ \
103
+ printf "%s%*s%s ", col_on, -indent, $$1, col_off; \
104
+ n = split($$2, words, " "); \
105
+ line_length = ncol - indent; \
106
+ for (i = 1; i <= n; i++) { \
107
+ line_length -= length(words[i]) + 1; \
108
+ if (line_length <= 0) { \
109
+ line_length = ncol - indent - length(words[i]) - 1; \
110
+ printf "\n%*s ", -indent, " "; \
111
+ } \
112
+ printf "%s ", words[i]; \
113
+ } \
114
+ printf "\n"; \
115
+ }'
116
+ @echo ""
117
+
118
+
119
+ # EOF
120
+
@@ -0,0 +1,180 @@
1
+ Metadata-Version: 2.4
2
+ Name: jupyterlab_makefile_file_type_extension
3
+ Version: 1.0.6
4
+ Summary: Jupyterlab extension to add handling of Makefiles and syntax colouring support
5
+ Project-URL: Homepage, https://github.com/stellarshenson/jupyterlab_makefile_file_type_extension
6
+ Project-URL: Bug Tracker, https://github.com/stellarshenson/jupyterlab_makefile_file_type_extension/issues
7
+ Project-URL: Repository, https://github.com/stellarshenson/jupyterlab_makefile_file_type_extension.git
8
+ Author-email: Stellars Henson <konrad.jelen@gmail.com>
9
+ License: BSD 3-Clause License
10
+
11
+ Copyright (c) 2025, Stellars Henson
12
+ All rights reserved.
13
+
14
+ Redistribution and use in source and binary forms, with or without
15
+ modification, are permitted provided that the following conditions are met:
16
+
17
+ 1. Redistributions of source code must retain the above copyright notice, this
18
+ list of conditions and the following disclaimer.
19
+
20
+ 2. Redistributions in binary form must reproduce the above copyright notice,
21
+ this list of conditions and the following disclaimer in the documentation
22
+ and/or other materials provided with the distribution.
23
+
24
+ 3. Neither the name of the copyright holder nor the names of its
25
+ contributors may be used to endorse or promote products derived from
26
+ this software without specific prior written permission.
27
+
28
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
32
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
34
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
+ License-File: LICENSE
39
+ Keywords: jupyter,jupyterlab,jupyterlab-extension
40
+ Classifier: Framework :: Jupyter
41
+ Classifier: Framework :: Jupyter :: JupyterLab
42
+ Classifier: Framework :: Jupyter :: JupyterLab :: 4
43
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
44
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
45
+ Classifier: License :: OSI Approved :: BSD License
46
+ Classifier: Programming Language :: Python
47
+ Classifier: Programming Language :: Python :: 3
48
+ Classifier: Programming Language :: Python :: 3.9
49
+ Classifier: Programming Language :: Python :: 3.10
50
+ Classifier: Programming Language :: Python :: 3.11
51
+ Classifier: Programming Language :: Python :: 3.12
52
+ Classifier: Programming Language :: Python :: 3.13
53
+ Requires-Python: >=3.9
54
+ Description-Content-Type: text/markdown
55
+
56
+ # jupyterlab_makefile_file_type_extension
57
+
58
+ [![GitHub Actions](https://github.com/stellarshenson/jupyterlab_makefile_file_type_extension/actions/workflows/build.yml/badge.svg)](https://github.com/stellarshenson/jupyterlab_makefile_file_type_extension/actions/workflows/build.yml)
59
+ [![npm version](https://img.shields.io/npm/v/jupyterlab_makefile_file_type_extension.svg)](https://www.npmjs.com/package/jupyterlab_makefile_file_type_extension)
60
+ [![PyPI version](https://img.shields.io/pypi/v/jupyterlab-makefile-file-type-extension.svg)](https://pypi.org/project/jupyterlab-makefile-file-type-extension/)
61
+ [![Total PyPI downloads](https://static.pepy.tech/badge/jupyterlab-makefile-file-type-extension)](https://pepy.tech/project/jupyterlab-makefile-file-type-extension)
62
+ [![JupyterLab 4](https://img.shields.io/badge/JupyterLab-4-orange.svg)](https://jupyterlab.readthedocs.io/en/stable/)
63
+
64
+ A JupyterLab extension providing comprehensive Makefile support with syntax highlighting and custom file type recognition.
65
+
66
+ ![Makefile Extension Screenshot](.resources/screenshot.png)
67
+
68
+ ## Features
69
+
70
+ This extension enhances the Makefile editing experience in JupyterLab with intelligent syntax highlighting and visual aids:
71
+
72
+ - **Custom syntax highlighter** - Purpose-built CodeMirror language mode for accurate Makefile token recognition
73
+ - **Target highlighting** - Build targets (`build:`, `install:`, etc.) displayed in bold with distinct keyword styling
74
+ - **Variable recognition** - Make-style `$(VAR)` and shell-style `${VAR}` variables colored differently for clarity
75
+ - **Automatic variables** - Special variables like `$@`, `$<`, `$^` highlighted distinctly
76
+ - **Function support** - Make functions (`$(shell ...)`, `$(wildcard ...)`, etc.) recognized as keywords
77
+ - **Line continuations** - Backslash line breaks (`\`) at end of lines highlighted prominently
78
+ - **String parsing** - Quoted strings in single and double quotes properly recognized throughout
79
+ - **Recipe detection** - Tab-indented command lines distinguished from regular Makefile content
80
+ - **Custom icon** - VS Code-style bold red "M" icon for easy Makefile identification in file browser
81
+ - **Pattern matching** - Recognizes `Makefile`, `makefile`, `GNUmakefile`, and `*.mk` files
82
+
83
+ ## Requirements
84
+
85
+ - JupyterLab >= 4.0.0
86
+
87
+ ## Install
88
+
89
+ To install the extension, execute:
90
+
91
+ ```bash
92
+ pip install jupyterlab_makefile_file_type_extension
93
+ ```
94
+
95
+ ## Uninstall
96
+
97
+ To remove the extension, execute:
98
+
99
+ ```bash
100
+ pip uninstall jupyterlab_makefile_file_type_extension
101
+ ```
102
+
103
+ ## Contributing
104
+
105
+ ### Development install
106
+
107
+ Note: You will need NodeJS to build the extension package.
108
+
109
+ The `jlpm` command is JupyterLab's pinned version of
110
+ [yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
111
+ `yarn` or `npm` in lieu of `jlpm` below.
112
+
113
+ ```bash
114
+ # Clone the repo to your local environment
115
+ # Change directory to the jupyterlab_makefile_file_type_extension directory
116
+
117
+ # Set up a virtual environment and install package in development mode
118
+ python -m venv .venv
119
+ source .venv/bin/activate
120
+ pip install --editable "."
121
+
122
+ # Link your development version of the extension with JupyterLab
123
+ jupyter labextension develop . --overwrite
124
+
125
+ # Rebuild extension Typescript source after making changes
126
+ # IMPORTANT: Unlike the steps above which are performed only once, do this step
127
+ # every time you make a change.
128
+ jlpm build
129
+ ```
130
+
131
+ You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
132
+
133
+ ```bash
134
+ # Watch the source directory in one terminal, automatically rebuilding when needed
135
+ jlpm watch
136
+ # Run JupyterLab in another terminal
137
+ jupyter lab
138
+ ```
139
+
140
+ With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
141
+
142
+ By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
143
+
144
+ ```bash
145
+ jupyter lab build --minimize=False
146
+ ```
147
+
148
+ ### Development uninstall
149
+
150
+ ```bash
151
+ pip uninstall jupyterlab_makefile_file_type_extension
152
+ ```
153
+
154
+ In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
155
+ command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
156
+ folder is located. Then you can remove the symlink named `jupyterlab_makefile_file_type_extension` within that folder.
157
+
158
+ ### Testing the extension
159
+
160
+ #### Frontend tests
161
+
162
+ This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
163
+
164
+ To execute them, execute:
165
+
166
+ ```sh
167
+ jlpm
168
+ jlpm test
169
+ ```
170
+
171
+ #### Integration tests
172
+
173
+ This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
174
+ More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
175
+
176
+ More information are provided within the [ui-tests](./ui-tests/README.md) README.
177
+
178
+ ### Packaging the extension
179
+
180
+ See [RELEASE](RELEASE.md)
@@ -0,0 +1,125 @@
1
+ # jupyterlab_makefile_file_type_extension
2
+
3
+ [![GitHub Actions](https://github.com/stellarshenson/jupyterlab_makefile_file_type_extension/actions/workflows/build.yml/badge.svg)](https://github.com/stellarshenson/jupyterlab_makefile_file_type_extension/actions/workflows/build.yml)
4
+ [![npm version](https://img.shields.io/npm/v/jupyterlab_makefile_file_type_extension.svg)](https://www.npmjs.com/package/jupyterlab_makefile_file_type_extension)
5
+ [![PyPI version](https://img.shields.io/pypi/v/jupyterlab-makefile-file-type-extension.svg)](https://pypi.org/project/jupyterlab-makefile-file-type-extension/)
6
+ [![Total PyPI downloads](https://static.pepy.tech/badge/jupyterlab-makefile-file-type-extension)](https://pepy.tech/project/jupyterlab-makefile-file-type-extension)
7
+ [![JupyterLab 4](https://img.shields.io/badge/JupyterLab-4-orange.svg)](https://jupyterlab.readthedocs.io/en/stable/)
8
+
9
+ A JupyterLab extension providing comprehensive Makefile support with syntax highlighting and custom file type recognition.
10
+
11
+ ![Makefile Extension Screenshot](.resources/screenshot.png)
12
+
13
+ ## Features
14
+
15
+ This extension enhances the Makefile editing experience in JupyterLab with intelligent syntax highlighting and visual aids:
16
+
17
+ - **Custom syntax highlighter** - Purpose-built CodeMirror language mode for accurate Makefile token recognition
18
+ - **Target highlighting** - Build targets (`build:`, `install:`, etc.) displayed in bold with distinct keyword styling
19
+ - **Variable recognition** - Make-style `$(VAR)` and shell-style `${VAR}` variables colored differently for clarity
20
+ - **Automatic variables** - Special variables like `$@`, `$<`, `$^` highlighted distinctly
21
+ - **Function support** - Make functions (`$(shell ...)`, `$(wildcard ...)`, etc.) recognized as keywords
22
+ - **Line continuations** - Backslash line breaks (`\`) at end of lines highlighted prominently
23
+ - **String parsing** - Quoted strings in single and double quotes properly recognized throughout
24
+ - **Recipe detection** - Tab-indented command lines distinguished from regular Makefile content
25
+ - **Custom icon** - VS Code-style bold red "M" icon for easy Makefile identification in file browser
26
+ - **Pattern matching** - Recognizes `Makefile`, `makefile`, `GNUmakefile`, and `*.mk` files
27
+
28
+ ## Requirements
29
+
30
+ - JupyterLab >= 4.0.0
31
+
32
+ ## Install
33
+
34
+ To install the extension, execute:
35
+
36
+ ```bash
37
+ pip install jupyterlab_makefile_file_type_extension
38
+ ```
39
+
40
+ ## Uninstall
41
+
42
+ To remove the extension, execute:
43
+
44
+ ```bash
45
+ pip uninstall jupyterlab_makefile_file_type_extension
46
+ ```
47
+
48
+ ## Contributing
49
+
50
+ ### Development install
51
+
52
+ Note: You will need NodeJS to build the extension package.
53
+
54
+ The `jlpm` command is JupyterLab's pinned version of
55
+ [yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
56
+ `yarn` or `npm` in lieu of `jlpm` below.
57
+
58
+ ```bash
59
+ # Clone the repo to your local environment
60
+ # Change directory to the jupyterlab_makefile_file_type_extension directory
61
+
62
+ # Set up a virtual environment and install package in development mode
63
+ python -m venv .venv
64
+ source .venv/bin/activate
65
+ pip install --editable "."
66
+
67
+ # Link your development version of the extension with JupyterLab
68
+ jupyter labextension develop . --overwrite
69
+
70
+ # Rebuild extension Typescript source after making changes
71
+ # IMPORTANT: Unlike the steps above which are performed only once, do this step
72
+ # every time you make a change.
73
+ jlpm build
74
+ ```
75
+
76
+ You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
77
+
78
+ ```bash
79
+ # Watch the source directory in one terminal, automatically rebuilding when needed
80
+ jlpm watch
81
+ # Run JupyterLab in another terminal
82
+ jupyter lab
83
+ ```
84
+
85
+ With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
86
+
87
+ By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
88
+
89
+ ```bash
90
+ jupyter lab build --minimize=False
91
+ ```
92
+
93
+ ### Development uninstall
94
+
95
+ ```bash
96
+ pip uninstall jupyterlab_makefile_file_type_extension
97
+ ```
98
+
99
+ In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
100
+ command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
101
+ folder is located. Then you can remove the symlink named `jupyterlab_makefile_file_type_extension` within that folder.
102
+
103
+ ### Testing the extension
104
+
105
+ #### Frontend tests
106
+
107
+ This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
108
+
109
+ To execute them, execute:
110
+
111
+ ```sh
112
+ jlpm
113
+ jlpm test
114
+ ```
115
+
116
+ #### Integration tests
117
+
118
+ This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
119
+ More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
120
+
121
+ More information are provided within the [ui-tests](./ui-tests/README.md) README.
122
+
123
+ ### Packaging the extension
124
+
125
+ See [RELEASE](RELEASE.md)