scholarsmate commented on code in PR #708:
URL: https://github.com/apache/daffodil-vscode/pull/708#discussion_r1270659065
##########
build/yarn-scripts.ts:
##########
@@ -67,19 +83,51 @@ function scalaclean() {
function watch() {
concurrently(
[
- "yarn scalawatch",
- "webpack --watch --devtool nosources-source-map --config
./build/extension.webpack.config.js",
- "yarn watch:svelte"
+ 'yarn scalawatch',
+ 'webpack --watch --devtool nosources-source-map --config
./webpack/ext-dev.webpack.config.js',
+ 'yarn watch:svelte',
],
{
killOthers: ['failure', 'success'],
}
)
}
+function package() {
+ const pkg_dir = 'dist/package'
+
+ // create .vscodeignore to not package all node_modules into the vsix
+ fs.writeFileSync(
+ path.join(pkg_dir, '.vscodeignore'),
+ `# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+**/node_modules/**/*
+!node_modules/@omega-edit/server/bin
+!node_modules/@omega-edit/server/lib
+`
+ )
+
+ execSync('yarn install', { cwd: pkg_dir })
+ execSync('yarn vsce package --out ../../', { cwd: pkg_dir })
Review Comment:
I'm not suggesting we toss the whole thing out, just avoid calling `yarn` in
this supplemental scripts file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]