Giter VIP home page Giter VIP logo

extender's People

Contributors

klustre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

extender's Issues

Resulting code is not from Babel

The resulting Babel code is somehow transformed after the plugin ran.

I have been trying to figure out the problem but haven't found the solution yet. The relevant test ternary statement is const a = false ? false ? 1 : 2 : 3. After esbuild-plugin-babel's onLoad is called and the content is transformed, I log the results in the onLoad callback and get var a = false ? (false ? 1 : 2) : 3; for that line—which is good. I also double checked with babel.transform to make sure the extendscript preset works well.

But when I check the final esbuild output file, the brackets disappeared. I am somewhat aware that the plugins for esbuild aren't the last line of bundling process, so it probably modified the babel output and removed the brackets. I am not too familiar with what goes on in esbuild between calling the plugins and writing to output, but it would be helpful if you might know the answer.

See fusepilot/babel-preset-extendscript#15

Possible solution: evanw/esbuild#1010 (comment)

Support Windows

Follow these steps to use Extender on Windows:

  1. After running npm install run npm install cross-env -D
  2. In package.json replace line 11 and 12 with:
    "start": "cross-env NODE_ENV=development npm-run-all build",
    "release": "cross-env NODE_ENV=production run-s build jsxbin",
  3. In scripts/build.js comment out line 22 to 24
  4. In src/main.js replace line 10 with:
    const greetings = [expression]
  5. Run npm start

Object.values(obj) not being compiled

hi, I am very new with es6, why this code not work with extender?

let salaries = {
  "John": 100,
  "Pete": 3100,
  "Mary": 2150
};
function topS (obj) {
  return Object.values(obj).sort((a,b) => b-a)[0];
}
alert(topS(salaries));

reduce() not works

reduce() is compiled, but running with an error message

const array1 = [1, 2, 3, 4];

// 0 + 1 + 2 + 3 + 4
const initialValue = 0;
const sumWithInitial = array1.reduce(
  (previousValue, currentValue) => previousValue + currentValue,
  initialValue
);
alert(array1);

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.