facebook

New Codemix 2.0

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #599357 Reply

    beleta1
    Participant

    I’ve just installed new CodeMix 2.0 that I found after pressing “Check for Updates” in Eclipse Help menu.

    I have a couple of comments:

    1) Installing using “Check for Updates” only installs CodeMix Essentials and not the rest of the code. You have to go to “Install New Software” and in the CodeMix reposotory og Genuitec select all the packages, the install process find some incompatibilities and you have to select the option of updating my installation and uninstalling the Webclipse plugins, all this process is not documented and not very intuitive.
    2) I have a Typescript project (non Angular) that after upgrading to CodeMix 2.0 the Typescript files included are not compiled wen validating the projects. I read something about tasks but for the moment there is not a clear way to achieve this goal. Some documentation on this scenario, a Typescript only project, would be very helpful.

    Thank you for your product however.

    #599360 Reply

    Brian Fernandes
    Moderator

    Glad you are already fully aboard CodeMix 2.0!

    1) The update process you described is by design, for this point in time.
    We are intentionally not forcing the Angular tooling from CodeMix to be installed with this update; we’re just updating the CodeMix functionality you already had installed.

    In October, our evergreen update will automatically update the Angular tooling as well. Please see https://www.genuitec.com/products/webclipse/ for more details.

    Of course, you won’t need to make any changes with the steps you’ve taken, you already have the Angular tooling by CodeMix installed.

    2) Quick tip – there should be a build icon at the bottom right of your TypeScript editor now. CodeMix should have automatically set up the tasks needed for that project (you will find them in <project_root>.vscode/tasks.json). If you click the build icon, it should start watching your project and use tsc to transpile – you will see output in the Terminal+ view.

    Detailed notes on the build pipeline can be found here: https://www.genuitec.com/docs/assembly/build-pipelines/

    If this doesn’t work for you, please send us a screenshot of your Project properties > CodeMix > Validation and Build page, as well as your tasks.json file, and let us know what icon you see at the bottom of your editor.

    Hope this helps, and thank you again for your continued support.

    #599410 Reply

    beleta1
    Participant

    I am attaching here the files you requested because It wasn’t able to compile (transpile) my Typescript files.

    I am getting an eye icon on the right bottom of my editor, that when I press it changes to a check icon but nothing happens.

    Attachments:
    You must be logged in to view attached files.
    #599413 Reply

    timwebb
    Keymaster

    Thanks for the extra details. The tasks.json you supplied can be more advanced for Build Pipeline support. For full support, you need a tsconfig.json as well. I suggest the following:

    1. Remove your current tasks.json
    2. Create a standard tsconfig.json for your project. (If needed, use the CodeMix > New Project > TypeScript wizard to make a simple one and copy it over)
    3. Right-click on the menu to the right of the build icon on the editor and choose to make a tasks.json file for TypeScript
    4. The build icon will now have a little play icon over it

    Next time you click to watch your project, the official typescript compiler will be used in watch mode and you’ll get your expected transpired output.

    #599618 Reply

    beleta1
    Participant

    Yes, that did the trick.

    The problem that I am facing now is that my TS files in Angular projects get compiled (transpiled if you prefer) when watching is active, but this in that kind of projects does not make any sense and on only serves to dirty my source folders. Can I validate but not compile at the same time?

    #599673 Reply

    Brian Fernandes
    Moderator

    Yes, this can be achieved with a modification to the tasks.json file, you’ll have to change from a “typescript” task to one which will take custom arguments. You will need to replace your watch task (likely the second task in your tasks.json file) with this:

    
            {
                "type": "shell",
                "command": "node_modules/.bin/tsc",
                "isBackground": true,
                "args": [
                  "--noEmit",
                  "--watch",
                  "-p",
                  ".",
                ],
                "problemMatcher": [
                    "$tsc-watch"
                ],
                "codemix": {
                    "lifecycle": "watch",
                    "validatedExtensions": [
                        "ts"
                    ],
                    "readyChecks": [
                        "node_modules_ready"
                    ]
                }
            }
    
    #599691 Reply

    beleta1
    Participant

    Thank you Brian.

    I tested what you said but:

    1) It does not work, my files are compiled when pressing the Build icon.
    2) Cannot activate watching because “A watch task is not present in this project”.

    I am including my tasks.json file, perhaps there is something wrong in it.

    Attachments:
    You must be logged in to view attached files.
    #599748 Reply

    support-tony
    Keymaster

    Apologies for the bad formatting on Brian’s reply. I’ve corrected it now. As you can now see, you should use double hyphens for the noEmit and watch arguments.

    Please let us know how you get on.

    #599941 Reply

    support-swapna
    Moderator

    Just checking if you tried with the double hyphens as suggested by Tony and does it help in fixing the problem?

    –Swapna
    Genuitec Support

    #599962 Reply

    beleta1
    Participant

    > Just checking if you tried with the double hyphens as suggested by Tony and does it help in fixing the problem?

    Yes, it works but you have to set also the label property in the corresponding task for things to work well.

    Perhaps it would be easier if this task were the watching task default for Angular projects.

    • This reply was modified 6 years, 1 month ago by beleta1.
Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: New Codemix 2.0

You must be logged in to post in the forum log in