Package Exports
- neutrino-preset-pragmatic-react
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (neutrino-preset-pragmatic-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
neutrino-preset-pragmatic-react
Requirements
- Node.js v6.9+
- Yarn or npm client
- Neutrino v5
Installation
Yarn
⯠yarn add --dev neutrino
⯠yarn add --dev https://github.com/pragmaticcoders/neutrino-preset-pragmatic-react.git#v1.2.0
⯠yarn add react react-dom prop-types
npm
⯠npm install --save-dev neutrino
⯠npm install --save-dev https://github.com/pragmaticcoders/neutrino-preset-pragmatic-react.git#v1.2.0
⯠npm install --save react react-dom prop-types
Quickstart
⯠mkdir {test,src}
⯠cat > src/index.js <<EOL
import React from 'react';
import { render } from 'react-dom';
render(<h1>Hello world!</h1>, document.getElementById('root'));
EOL
Now edit your project's package.json to add commands for starting and building the application:
{
...
"neutrino": {
"use": [
"neutrino-preset-pragmatic-react"
]
},
"scripts": {
"start": "neutrino start",
"build": "neutrino build",
"test": "neutrino test",
"test-watch": "neutrino test --watch"
},
...
}
Start the app, then open a browser to the address in the console:
Yarn
⯠yarn start
â Development server running on: http://localhost:5000
â Build completed
Npm
⯠npm start
â Development server running on: http://localhost:5000
â Build completed
TODO
- example project
- tests
- https://www.npmjs.com/