Qooxdoo contrib library is not being included - user-interface

Qooxdoo seems to be exactly what I want to develop my web app, but I'm running into problems trying to include a contrib library into my project. Can anyone tell me what I'm doing wrong?
Relevant part of my config.json:
"libraries" :
{
"library" :
[
{
"manifest" : "contrib://SkeletonApplication/trunk/Manifest.json"
},
{
"mainfest" : "contrib://CollapsablePanel/trunk/Manifest.json",
"uri" : "../contrib/CollapsablePanel/trunk"
}
]
}
I've tried with and without the uri entry; using contrib://, relative and absolute paths for the manifest and uri entries.
As far as I can tell, 'generate.py source-all -w' isn't even looking for the contrib library: there are a whole lot of "- including " lines output but nothing at all about "contrib".
I'm using Qooxdoo 1.3 locally on my Linux box.

The file wasn't highlighted and I didn't realise it was commented out.

Related

I am having directory issue or something I don't know

File 'd:/cypress/gitRepo3/CypressNonGit/node_modules/cypress/types' not found.
The file is in the program because:
Matched by include pattern './node_modules/cypress' in 'd:/cypress/gitRepo3/CypressNonGit/jsconfig.json'
I am trying to get autosuggestions into my cypress code, I guess (learning phase only)
I am getting this error when I include jsconfig.json whish is saying as above.
I using visual studio code 1.64.2
jsconfig.json
{
"include" :[
"./node_modules/cypress",
"cypress/**/*.js"
]
}
and this my project structure
Instead of [] user {}
like
"include" :{
"./node_modules/cypress",
"cypress/**/*.js"
}```

Small Basic & syntax highlighting in Visual Studio Code [duplicate]

Is there a way to extend the supported languages/grammars in Visual Studio Code?
I'd like to add a custom language syntax, but I've not been able to find any information on how language services are provided.
Can anybody point to any references or even examples of existing language implementations?
It's possible with the new version 0.9.0. There's an official documentation on how to add a custom language: https://github.com/microsoft/vscode-docs/blob/main/release-notes/v0_9_0.md
You need a .tmLanguage file for the language you want to add. You can find existing files e.g. on GitHub or you can define your own language file. Look here to get an idea of how to create one: http://manual.macromates.com/en/language_grammars
After finding a .tmLanguage file you have two ways to create an extension based on it.
Option 1: Using a Yeoman generator
Install node.js (if you haven't already done)
Install yo (if you haven't already done) by executing npm install -g yo
Install the Yo generator for code: npm install -g generator-code
Run yo code and select New language support
Follow the instructions (define the .tmLangauge file, define the plugin name, file extensions etc.)
The generator creates a directory for your extension with the name of the plugin in your current working directory.
Option 2: Create the directory on your own
Create a directory with the name of your plugin (only lowercase letters). Let's say we call it mylang.
Add a subfolder syntaxes and place the .tmlanguage file inside of it
Create a file package.json inside the root of the extension folder with content like this
{
"name": "mylang",
"version": "0.0.1",
"engines": {
"vscode": ">=0.9.0-pre.1"
},
"publisher": "me",
"contributes": {
"languages": [{
"id": "mylang",
"aliases": ["MyLang", "mylang"],
"extensions": [".mylang",".myl"]
}],
"grammars": [{
"language": "mylang",
"scopeName": "source.mylang",
"path": "./syntaxes/mylang.tmLanguage"
}]
}
}
Finally add your extension to Visual Studio Code
Copy the extension folder to the extension directory. This is:
on Windows %USERPROFILE%\.vscode\extensions
on Mac/Linux $HOME/.vscode/extensions
Restart Code. Now your extension will run automatically everytime you open a file with the specified file extension. You can see the name of the used plugin in the down right corner. You can change it by clicking on the name of the extension. If your extension is not the only one registered for a specific file extension then Code may chooses the wrong one.
To extend Wosi's .tmLanguage answer, using a .tmLanguage file is optional. Using a regular .json is a perfectly valid and—in my opinion—better readable alternative.
For an example, see VSCode_SQF: sqf.json
Inside the package.json, you would only need to change the path from ./syntaxes/mylang.tmLanguage to ./syntaxes/mylang.json.
Using reverse engineering you can add a new language to VSCode. You can take a look on how typescript is implemented as a JavaScript plugin and how it communicates with node.exe via pipe. But it's a hard thing since it's coming all without documentation
I'll provide a really short documentation here:
You can define a new plugin in the plugins folder C:\Users\USER\AppData\Local\Code\app-0.3.0\resources\app\plugins.
Copy the typescript plugin folder and rename mentioned file extensions and language names in all files to your new language, so that your new plugin is going to be used when a .mylang file is opened.
In typescriptServiceClient.js you see that a child process is being forked and that its stdout is coupled to a new WireProtocol.Reader. Bind your own mylanguage.exe (you'll probably need to write that exe on your own). VSCode asks that binary to get more language specific information.
In typescriptMain.js you find the feature registration for the language. Delete every call to monaco.Modes.XXXXXXSupport.register except monaco.Modes.DeclarationSupport.register.
Now open a directory in VSCode that contains .mylang files and open one of them via CTRL+P + FileName. Right click on an identifier and select Go to Definition. VSCode sends now a request like this via StdIn to your exe
{"seq":1,"type":"request","command":"definition","arguments":{"file":"d:/Projects/MyProj/Source/MyFile.mylang","line":45,"offset":9}}
VSCode expects an answer like this:
Content-Length: 251
[LINE BREAK]
{ "seq" : 1, "type" : "response", "command" : "definition", "request_seq" : 1, "success" : true, "body" : [{ "file" : "d:/Projects/MyProj/Source/MyOtherFile.mylang", "start" : { "line" : 125, "offset" : 3 }, "end" : { "line" : 145, "offset" : 11} }] }
If everything works VSCode will open MyOtherFile.mylang and set the cursor to line 124 in column 3.
Try it on your own ;-)
Simplest recipe IMHO as of 2021 Q2:
Follow Option 2 in Wosi's answer. You only need two files to get started. Just create the folder structure directly in your extensions directory.
Set "path": "./syntaxes/your_language.plist" in package.json
Use IRO to build your regexes.
Make sure that in the "Scope Information" screen, anything to do with Textmate is green. Don't worry about the other editors.
Save the contents of the "Textmate" tab into the path above, i.e., .syntaxes/your_language.plist
Reload VSCode
That's it. I also save the IRO (left pane) text into my own project.
You can read the source code of the built-in language extensions online:
https://github.com/microsoft/vscode/tree/main/extensions
You can pick an extension that is close to your language's syntax and change it as you wish. (e.g. you can do some modifications to the JavaScript extension and rebrand it for use with jQuery!)
It is important to note that this would be too much work if you choose a language that is so different from your desired language! If you didn't manage to find a language that is similar to your desired language, you may want to create a whole new extension from the ground up - https://stackoverflow.com/a/32996211/14467698 -.

Aurelias Bundling Process using TypeScript

I'm using the asp.net 5 typescript skeleton. When I bundle the application, inside the "dist" folder, I'm seeing a bunch of html and js files. According to the bundles.js file as in:
"bundles": {
"dist/app-build": {
"includes": [
"[**/*.js]",
"**/*.html!text",
"**/*.css!text"
],
If I'm thinking correctly, I should the the bundled version of those file with an app-build.html and app-build.js, yes. Instead I see all the files basically within the "src" folder.
What is working correctly though is the aurelia.js file is being generated properly from the following:
"dist/aurelia": {
"includes": [
"aurelia-framework",
"aurelia-materialize-bridge",
"aurelia-bootstrapper",
"aurelia-fetch-client",
more stuff here...
I haven't changed the skeleton at all. Just trying to get things to work.
Any ideas what may be going on?
Thank much
I'm not sure I understand your question completely and I'm not using the asp.net version of the skeleton but my Aurelia Typescript app has the following bundle config:
"dist/app-build": {
"includes": [
"[*.js]",
"*.html!text",
"[*/**/*.js]",
"*/**/*.html!text",
"*/**/*.css!text"
]
In my case index.html, app.ts (view root) and main.ts (aurelia config) are located in the 'root' folder src. The rest of my code is located in subdirectories.

Yeoman angular-fullstack ckeditor production

I'm using yeoman's angular-fullstack generator with default parameters.
I would like to use ckeditor with https://github.com/lemonde/angular-ckeditor , so I extended my bower.json with the following lines:
"ckeditor": "#full/4.4.7",
"angular-ckeditor": "~0.4.2"
It works well in development mode ( grunt serve ), but it fails in production ( grunt serve:dist ). It tries to load /config.js and /skins/moono/editor_gecko.css and the language file dynamically, but it fails.
Have anybody idea how to solve it?
Had similar issue with ACE editor. What I did is I added override in bower.json
for ace looks like this
"overrides": {
"ace-builds": {
"main": [
"src-noconflict/ace.js",
"src-noconflict/theme-monokai.js",
"src-noconflict/worker-javascript.js",
"src-noconflict/mode-javascript.js"
]
},
for you ckeditor config you can specify it in a similar way in the overrides
i.e.
"overrides": {
"ckeditor": {
"main": [
"path/to/your/ckeditor.js",
"path/to/your/ckeditor/config.js"
]
}
}
for the CSS, not sure but if you check your gruntfile you might come up with a simple solution (i.e. add one more folder to the CSS sources).
If you find a nice CSS solution please post it as it could be helpful to more people ;)

qooxdoo: Building scss using scss.py

I tried to compile scss to css by scss.py.
I finally found that I had to create the folder structure qooxdoo-3.0-sdk/tool/pylib/scss/sass/frameworks and copy qooxdoo-3.0-sdk/framework/source/resource/qx/mobile/scss/* into it.
Do I have to add some path reference?
"compile-css" :
{
"let" :
{
"SCSS_CMD" : "${PYTHON_CMD} ${QOOXDOO_PATH}/tool/bin/scss.py"
},
"shell" :
{
"command" :
[
"${SCSS_CMD} --output=${QOOXDOO_PATH}/framework/source/qx/mobile/css/ios.css ${QOOXDOO_PATH}/framework/source/resource/qx/mobile/scss/ios.scss"
]
}
}
I'm not sure what you mean with "path reference". Normally you won't have to create the sass/frameworks directory path and copy files manually. You would be working and generating files in your app directories only.
Can you provide more context and what you are trying to achieve? :)
I assume you created a mobile app (./qooxdoo-3.0-sdk/create-application.py -n myApp -t mobile). This provides you already with a watch job for scss (watch-scss) [1] in your config.json. So there you can see how we use tool/bin/scss.py [2]. This is also covered in the dedicated manual page, which you might have found already [3].
[1] http://manual.qooxdoo.org/3.0/pages/tool/generator/default_jobs_actions.html#watch-scss
[2] https://github.com/qooxdoo/qooxdoo/blob/master/component/skeleton/mobile/config.tmpl.json
[3] http://manual.qooxdoo.org/3.0/pages/mobile/theming.html

Resources