Code Monkey home page Code Monkey logo

Comments (10)

jaywcjlove avatar jaywcjlove commented on May 12, 2024 1

@szymex73 example code https://github.com/TimRChen/react-cli

from ink.

FlorianWendelborn avatar FlorianWendelborn commented on May 12, 2024

Did you set the pragma to h?

from ink.

szymex73 avatar szymex73 commented on May 12, 2024

I did, I tried to run babel again and it worked like after 6 tries

from ink.

TimRChen avatar TimRChen commented on May 12, 2024

I meet the same situation..

from ink.

gailingmic avatar gailingmic commented on May 12, 2024

how exactly have you fixed this?
I can't get it to work at all with this setup

package.json

{
  "name": "inkTest",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "build": "babel index.js --out-file index.transpiled.js"
  },
  "dependencies": {
    "babel-cli": "^6.24.1",
    "babel-plugin-transform-react-jsx": "^6.24.1",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-node6": "^11.0.0",
    "ink": "^0.3.0"
  }
}

.babelrc

{
  "presets": [
    "es2015"
  ],
  "plugins": [
		[
			"transform-react-jsx",
			{
				"pragma": "h",
				"useBuiltIns": true
			}
		]
	]
}

from ink.

szymex73 avatar szymex73 commented on May 12, 2024

My NodeJS version is v7.10.0
npm install --save-dev babel-plugin-transform-h-jsx
.babelrc

{
        "plugins": ["transform-h-jsx"]
}

Hope this helps

from ink.

vadimdemedes avatar vadimdemedes commented on May 12, 2024

@TimRChen @gailingmic what error do you get?

from ink.

TimRChen avatar TimRChen commented on May 12, 2024

I run the demo successfully by using https://github.com/vadimdemedes/generator-ink-cli. Thanks for the generator. @vadimdemedes

from ink.

vadimdemedes avatar vadimdemedes commented on May 12, 2024

You're welcome, @TimRChen!

from ink.

vadimdemedes avatar vadimdemedes commented on May 12, 2024

Closing due to lack of response. Feel free to reply here or open a new issue with more details, if anyone's still experiencing problems.

from ink.

Related Issues (20)

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.