Skip to content

Commit e667370

Browse files
authored
Merge pull request #33 from lightning-js/release/v1.5.0
Release - v1.5.0
2 parents 5649d6b + 5facefa commit e667370

File tree

17 files changed

+1683
-166
lines changed

17 files changed

+1683
-166
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ backup
77
*.zip
88
.eslintcache
99
.vscode-test/**
10+
src/parsers/testParser.js
11+
./test
12+
*.test.js

.vscode/tasks.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1+
12
{
23
"version": "2.0.0",
34
"tasks": [
45
{
56
"label": "esbuild: watch",
67
"type": "shell",
7-
"command": "npx esbuild ./src/extension.js --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node --sourcemap --watch",
8+
"command": "npm run esbuild-base -- --sourcemap --watch",
89
"isBackground": true,
9-
"problemMatcher": []
10+
"problemMatcher": {
11+
"base": "$tsc-watch",
12+
"background": {
13+
"activeOnStart": true,
14+
"beginsPattern": ".+",
15+
"endsPattern": ".*"
16+
}
17+
}
1018
}
1119
]
1220
}

.vscodeignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ backup
88
*.vsix
99
*.zip
1010
.vscode-test/**
11+
src/parsers/testParser.js
1112

1213
# Source control
1314
.gitignore
@@ -34,3 +35,6 @@ yarn.lock
3435
# Build artifacts
3536
*.vsix
3637
*.vsix.zip
38+
39+
# typescript standard libs
40+
!out/lib-files/*

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publisher": "lightningjs",
44
"displayName": "Lightning Blits",
55
"description": "Template syntax highlighting and code completion for the Lightning Blits framework",
6-
"version": "1.4.1",
6+
"version": "1.5.0",
77
"repository": {
88
"type": "git",
99
"url": "https://github.com/lightning-js/blits-vscode-extension.git"
@@ -35,9 +35,10 @@
3535
"lint": "eslint .",
3636
"pretest": "npm run lint",
3737
"test": "node ./test/runTest.js",
38-
"vscode:prepublish": "npm run esbuild-base -- --minify",
39-
"esbuild-base": "esbuild ./src/extension.js --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node",
40-
"esbuild": "npm run esbuild-base -- --sourcemap",
38+
"build-lib-files": "node ./scripts/build-lib-files.js",
39+
"vscode:prepublish": "npm run esbuild-base -- --minify && npm run build-lib-files",
40+
"esbuild-base": "npm run build-lib-files && esbuild ./src/extension.js --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node",
41+
"esbuild": "npm run build-lib-files && npm run esbuild-base -- --sourcemap",
4142
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
4243
"package": "vsce package",
4344
"publish": "vsce publish"

scripts/build-lib-files.js

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
/*
2+
* Copyright 2023 Comcast Cable Communications Management, LLC
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*
15+
* SPDX-License-Identifier: Apache-2.0
16+
*/
17+
18+
const fs = require('fs')
19+
const path = require('path')
20+
21+
// Create lib files directory
22+
const libDir = path.join(__dirname, '..', 'out', 'lib-files')
23+
if (!fs.existsSync(libDir)) {
24+
fs.mkdirSync(libDir, { recursive: true })
25+
}
26+
27+
// Get the TypeScript lib directory
28+
const tsLibPath = path.dirname(require.resolve('typescript/lib/typescript.js'))
29+
30+
// List of essential lib files to copy
31+
const libFiles = [
32+
'lib.es5.d.ts',
33+
'lib.dom.d.ts',
34+
'lib.dom.iterable.d.ts',
35+
'lib.es2015.d.ts',
36+
'lib.es2015.collection.d.ts',
37+
'lib.es2015.core.d.ts',
38+
'lib.es2015.generator.d.ts',
39+
'lib.es2015.iterable.d.ts',
40+
'lib.es2015.promise.d.ts',
41+
'lib.es2015.proxy.d.ts',
42+
'lib.es2015.reflect.d.ts',
43+
'lib.es2015.symbol.d.ts',
44+
'lib.es2015.symbol.wellknown.d.ts',
45+
'lib.es2016.d.ts',
46+
'lib.es2016.array.include.d.ts',
47+
'lib.es2017.d.ts',
48+
'lib.es2017.object.d.ts',
49+
'lib.es2017.sharedmemory.d.ts',
50+
'lib.es2017.string.d.ts',
51+
'lib.es2017.intl.d.ts',
52+
'lib.es2017.typedarrays.d.ts',
53+
'lib.es2018.d.ts',
54+
'lib.es2018.asyncgenerator.d.ts',
55+
'lib.es2018.asynciterable.d.ts',
56+
'lib.es2018.intl.d.ts',
57+
'lib.es2018.promise.d.ts',
58+
'lib.es2018.regexp.d.ts',
59+
'lib.es2019.d.ts',
60+
'lib.es2019.array.d.ts',
61+
'lib.es2019.object.d.ts',
62+
'lib.es2019.string.d.ts',
63+
'lib.es2019.symbol.d.ts',
64+
'lib.es2020.d.ts',
65+
'lib.es2020.bigint.d.ts',
66+
'lib.es2020.promise.d.ts',
67+
'lib.es2020.sharedmemory.d.ts',
68+
'lib.es2020.string.d.ts',
69+
'lib.es2020.symbol.wellknown.d.ts',
70+
'lib.es2020.intl.d.ts',
71+
'lib.scripthost.d.ts',
72+
'lib.webworker.importscripts.d.ts',
73+
]
74+
75+
// Copy each lib file
76+
let copiedFiles = 0
77+
let errors = 0
78+
79+
libFiles.forEach((file) => {
80+
const sourcePath = path.join(tsLibPath, file)
81+
const destPath = path.join(libDir, file)
82+
83+
try {
84+
if (fs.existsSync(sourcePath)) {
85+
fs.copyFileSync(sourcePath, destPath)
86+
copiedFiles++
87+
} else {
88+
console.warn(`File not found: ${sourcePath}`)
89+
}
90+
} catch (error) {
91+
console.error(`Error copying ${file}: ${error.message}`)
92+
errors++
93+
}
94+
})
95+
96+
console.log(`Build complete! Copied ${copiedFiles} lib files with ${errors} errors.`)

snippets/JSFile.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
" ${1|left,right,up,down,enter,back,space,any|}(${2:e}) {",
3131
" $0",
3232
" },",
33-
" ${3|left,right,up,down,enter,back,space,any|}(${4:e}) {",
33+
" ${3|right,left,up,down,enter,back,space,any|}(${4:e}) {",
3434
" // Handle input",
3535
" }${5:,}",
3636
"}"

0 commit comments

Comments
 (0)