Giter Site home page Giter Site logo

Comments (2)

azu avatar azu commented on May 24, 2024

Thanks for feedback.

@jxa/global-type's approach is same with Cypress that is a E2E framework.

There are serveral pattern of usage.

TypeScript user

If you write JXA script as TypeScript project, you just import @jxa/global-type

file.ts:

import("@jxa/global-type");

JavaScript user

If you write JXA as JavaScript, you should do following steps:

  1. Create package.json
  • $ npm init --yes
  1. Install @jxa/global-type
  • $ npm install -D @jxa/global-type
  1. Adding tsconfig.json file with the following configuration should get intelligent code completion working.

tsconfig.json:

{
  "compilerOptions": {
    "allowJs": true,
    "types": [
      "@jxa/global-type"
    ]
  },
  "include": [
    "**/*.js" // <= this scope is integrated with @jxa/global-type
  ]
}
  1. Write JXA code as JavaScript like file.js

Also, I've created starter repository for JavaScript user.

git clone https://github.com/JXA-userland/editor-integrate-example
cd editor-integrate-example
vscode .

image

from jxa.

JMichaelTX avatar JMichaelTX commented on May 24, 2024

Thanks again for all the information you have provided.
I've tried many things but still can not get autocomplete of my JXA code to work.
Would it be possible to do a screen share some time, where you could walk me through this process?
If you would do that, then I would be happy to create a YouTube video showing users like me how to get this done.

from jxa.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.