File tree 18 files changed +4256
-1277
lines changed
18 files changed +4256
-1277
lines changed Original file line number Diff line number Diff line change 9
9
"strict" : true ,
10
10
"noFallthroughCasesInSwitch" : true ,
11
11
"removeComments" : true ,
12
+ "outDir" : " ../out/" ,
13
+ "rootDir" : " ../"
12
14
},
15
+ "include" : [
16
+ " ../src/**/*.ts" ,
17
+ ],
13
18
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : " ./tsconfig.json" ,
3
+ "include" : [
4
+ " ../tests/**/*.ts" ,
5
+ ],
6
+ }
Original file line number Diff line number Diff line change
1
+ on :
2
+ release :
3
+ types :
4
+ - created
5
+
6
+ jobs :
7
+ build :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - name : Checkout
11
+ uses : actions/checkout@v4
12
+
13
+ - name : Install Node.js
14
+ uses : actions/setup-node@v4
15
+ with :
16
+ node-version : 22
17
+
18
+ - name : Install dependencies
19
+ run : npm install
20
+
21
+ - name : Package extension
22
+ run : npm run package-vsce
23
+
24
+ - name : Upload VSIX artifact to
25
+ if : startsWith(github.ref, 'refs/tags/')
26
+ uses : actions/upload-artifact@v4
27
+ with :
28
+ name : manim-notebook.vsix
29
+ path : manim-notebook-*.vsix
30
+ if-no-files-found : error
31
+
32
+ - name : Publish
33
+ if : startsWith(github.ref, 'refs/tags/')
34
+ run : npm run deploy
35
+ env :
36
+ VSCE_PAT : ${{ secrets.VSCE_PAT }}
Original file line number Diff line number Diff line change @@ -102,8 +102,11 @@ jobs:
102
102
if [ "$RUNNER_OS" == "Linux" ]; then
103
103
# Start an X virtual framebuffer (Xvfb) server, which emulates a
104
104
# display server without requiring a physical display.
105
- xvfb-run -a npm run testInGithubActions
105
+ xvfb-run -a npm run test-without-pre-or-posttest
106
106
else
107
- npm run testInGithubActions
107
+ npm run test-without-pre-or-posttest
108
108
fi
109
109
shell : bash
110
+
111
+ - name : Run posttest
112
+ run : npm run posttest
Original file line number Diff line number Diff line change 3
3
* .mp4
4
4
.DS_Store
5
5
out
6
+ out-test
6
7
dist
7
8
node_modules
8
9
_debug_scenes /
Original file line number Diff line number Diff line change 3
3
// for the documentation about the extensions.json format
4
4
"recommendations" : [
5
5
" dbaeumer.vscode-eslint" ,
6
- " streetsidesoftware.code-spell-checker"
6
+ " streetsidesoftware.code-spell-checker" ,
7
+ " connor4312.esbuild-problem-matchers"
7
8
]
8
9
}
Original file line number Diff line number Diff line change 13
13
" --extensionDevelopmentPath=${workspaceFolder}"
14
14
],
15
15
"outFiles" : [
16
- " ${workspaceFolder}/out/src /**/*.js"
16
+ " ${workspaceFolder}/dist /**/*.js"
17
17
],
18
- "preLaunchTask" : " Watch Files " ,
18
+ "preLaunchTask" : " Watch (Default) " ,
19
19
"sourceMaps" : true
20
20
},
21
21
{
27
27
" ${workspaceFolder}/tests/fixtures" ,
28
28
" --disable-extensions" ,
29
29
" --extensionDevelopmentPath=${workspaceFolder}" ,
30
- " --extensionTestsPath=${workspaceFolder}/out/tests/utils/testRunner.js"
30
+ " --extensionTestsPath=${workspaceFolder}/out-test /tests/utils/testRunner.js"
31
31
],
32
32
"outFiles" : [
33
- " ${workspaceFolder}/out/ test/**/*.js"
33
+ " ${workspaceFolder}/out- test/tests /**/*.js"
34
34
],
35
35
"preLaunchTask" : " Prepare For Tests" ,
36
36
"sourceMaps" : true ,
Original file line number Diff line number Diff line change 108
108
" nodenext" ,
109
109
" opengl" ,
110
110
" Pango" ,
111
+ " posttest" ,
111
112
" prerun" ,
112
113
" pycache" ,
113
114
" Pyglet" ,
Original file line number Diff line number Diff line change 4
4
"version" : " 2.0.0" ,
5
5
"tasks" : [
6
6
{
7
- "label" : " Watch Files " ,
8
- "type " : " npm " ,
9
- "script" : " watch" ,
10
- "problemMatcher" : " $tsc- watch" ,
11
- "isBackground" : true ,
7
+ "label" : " Watch (Default) " ,
8
+ "dependsOn " : [
9
+ " npm: watch:tsc " ,
10
+ " npm: watch:esbuild "
11
+ ] ,
12
12
"presentation" : {
13
13
"reveal" : " never"
14
14
},
17
17
"isDefault" : true
18
18
}
19
19
},
20
+ {
21
+ "type" : " npm" ,
22
+ "script" : " watch:tsc" ,
23
+ "group" : " build" ,
24
+ "problemMatcher" : " $tsc-watch" ,
25
+ "isBackground" : true ,
26
+ "label" : " npm: watch:tsc" ,
27
+ "presentation" : {
28
+ "group" : " watch" ,
29
+ "reveal" : " never"
30
+ }
31
+ },
32
+ {
33
+ "type" : " npm" ,
34
+ "script" : " watch:esbuild" ,
35
+ "group" : " build" ,
36
+ "problemMatcher" : " $esbuild-watch" ,
37
+ "isBackground" : true ,
38
+ "label" : " npm: watch:esbuild" ,
39
+ "presentation" : {
40
+ "group" : " watch" ,
41
+ "reveal" : " never"
42
+ }
43
+ },
44
+ {
45
+ "type" : " npm" ,
46
+ "script" : " watch:tests" ,
47
+ "group" : " build" ,
48
+ "problemMatcher" : " $tsc-watch" ,
49
+ "isBackground" : true ,
50
+ "label" : " npm: watch:tests" ,
51
+ "presentation" : {
52
+ "group" : " watch" ,
53
+ "reveal" : " never"
54
+ }
55
+ },
20
56
{
21
57
"label" : " Install Manim" ,
22
58
"type" : " npm" ,
23
59
"script" : " install-manim" ,
24
- "cwd" : " ${workspaceFolder}" ,
25
60
"presentation" : {
26
61
"reveal" : " always"
27
62
},
33
68
"label" : " Prepare For Tests" ,
34
69
"dependsOrder" : " sequence" ,
35
70
"dependsOn" : [
36
- " Watch Files" ,
71
+ " npm: watch:tsc" ,
72
+ " npm: watch:esbuild" ,
73
+ " npm: watch:tests" ,
37
74
" Install Manim"
38
- ]
39
- }
75
+ ],
76
+ "presentation" : {
77
+ "reveal" : " never"
78
+ },
79
+ "group" : {
80
+ "kind" : " build" ,
81
+ "isDefault" : true
82
+ }
83
+ },
40
84
]
41
85
}
Original file line number Diff line number Diff line change
1
+ .github /**
1
2
.config /**
2
3
.vscode /**
3
4
.vscode-test /**
4
5
src /**
5
- scripts /**
6
+ tests /**
7
+ tmp /**
8
+ out-test /**
6
9
.gitignore
7
- ** /tsconfig.json
8
10
** /eslint.config.mjs
9
11
** /* .map
10
12
** /* .ts
11
13
** /.vscode-test. *
12
14
CHANGELOG.md
13
15
CONTRIBUTING.md
14
- out /tests /**
16
+ .markdownlint.jsonc
17
+ node_modules /**
18
+ esbuild.js
Original file line number Diff line number Diff line change
1
+ // adapted from https://code.visualstudio.com/api/working-with-extensions/bundling-extension#run-esbuild
2
+ const esbuild = require ( "esbuild" ) ;
3
+
4
+ const production = process . argv . includes ( "--production" ) ;
5
+ const watch = process . argv . includes ( "--watch" ) ;
6
+
7
+ async function main ( ) {
8
+ const ctx = await esbuild . context ( {
9
+ entryPoints : [ "src/extension.ts" ] ,
10
+ bundle : true ,
11
+ format : "cjs" ,
12
+ minify : production ,
13
+ sourcemap : true ,
14
+ sourcesContent : false ,
15
+ platform : "node" ,
16
+ outfile : "dist/extension.js" ,
17
+ external : [ "vscode" ] ,
18
+ logLevel : "warning" ,
19
+ plugins : [
20
+ /* add to the end of plugins array */
21
+ esbuildProblemMatcherPlugin ,
22
+ ] ,
23
+ } ) ;
24
+ if ( watch ) {
25
+ await ctx . watch ( ) ;
26
+ } else {
27
+ await ctx . rebuild ( ) ;
28
+ await ctx . dispose ( ) ;
29
+ }
30
+ }
31
+
32
+ /**
33
+ * @type {import('esbuild').Plugin }
34
+ */
35
+ const esbuildProblemMatcherPlugin = {
36
+ name : "esbuild-problem-matcher" ,
37
+
38
+ setup ( build ) {
39
+ build . onStart ( ( ) => {
40
+ console . log ( "[watch] build started" ) ;
41
+ } ) ;
42
+ build . onEnd ( ( result ) => {
43
+ result . errors . forEach ( ( { text, location } ) => {
44
+ console . error ( `❌ [ERROR] ${ text } ` ) ;
45
+ if ( location == null ) return ;
46
+ console . error ( ` ${ location . file } :${ location . line } :${ location . column } :` ) ;
47
+ } ) ;
48
+ console . log ( "[watch] build finished" ) ;
49
+ } ) ;
50
+ } ,
51
+ } ;
52
+
53
+ main ( ) . catch ( ( e ) => {
54
+ console . error ( e ) ;
55
+ process . exit ( 1 ) ;
56
+ } ) ;
You can’t perform that action at this time.
0 commit comments