Skip to content

Instantly share code, notes, and snippets.

@mikaelbr
Created October 8, 2019 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikaelbr/421fcad5bb90e0f889ebbaa0a8c0b7fb to your computer and use it in GitHub Desktop.
Save mikaelbr/421fcad5bb90e0f889ebbaa0a8c0b7fb to your computer and use it in GitHub Desktop.
Code for blogpost "Using JSX for your own lightweight declarative library"
{
"name": "jsx-demo",
"version": "1.0.0",
"main": "index.js",
"scripts": {
// Using the babel CLI specify our single file (could be pattern)
// and output in dist directory
"build": "babel index.js -d dist"
},
"devDependencies": {
// Installing the CLI it self with core module and the JSX plugin
"@babel/cli": "^7.6.2",
"@babel/core": "^7.6.2",
"@babel/plugin-transform-react-jsx": "^7.3.0"
},
"babel": {
// Transform JSX syntax using the babel plugin
"plugins": ["@babel/plugin-transform-react-jsx"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment