1.4.5 • Published 4 years ago
@adiatma2019/cilor v1.4.5
@adiatma2019/cilor
⚡️CLI to compile react project.
List Features
- support module hot replacement.
- support flow.
- support styled-components.
- support url-loader and file-loader
- support svgr/webpack loader
- support alias import.
- support eslint in develoment mode.
- support monitoring assets.
How to use?
Please install
react
andreact-dom
with@adiatma2019/cilor
.
Example.
mkdir react-project
cd react-project
Install with yarn
yarn add -D @adiatma2019/cilor
yarn add react react-dom
Install with npm
npm install --save-dev @adiatma2019/cilor
npm install react react-dom
Create file cilor.config.js
in your directory.
// cilor.config.js
const path = require('path')
module.exports = {
entry: path.resolve(__dirname, 'index.js'),
output: {
path: path.resolve(__dirname, 'output'),
},
devServer: {
contentBase: path.resolve(__dirname, 'output'),
},
htmlConfig: {
title: 'Type your title here!',
elementID: 'app', // default root
}
}
Create file index.js
.
// index.js
import React from 'react'
import ReactDOM from 'react-dom'
function App() {
return (
<div>
<h1>Hello, ReactJS</h1>
<p>Lorem ipsume sit amet dolor</p>
</div>
)
}
const mountElement = document.getElementById('app')
ReactDOM.render(<App />, mountElement)
Open your package.json
, and add this command below.
// package.json
{
"scripts": {
"start": "cilor cilor.config.js",
"build": "cilor cilor.config.js build"
}
}
And start with yarn start
or npm start
to running development server.
How to add testing environment.
Create .babelrc.js
.
const babelConfig = require('@adiatma2019/cilor/src/babel-config')
module.exports = babelConfig('__test__')
License
1.4.5
4 years ago
1.4.4
4 years ago
1.4.3
4 years ago
1.4.2
4 years ago
1.4.1
5 years ago
1.4.0
5 years ago
1.3.0
5 years ago
1.2.3
5 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.9
5 years ago
1.1.8
5 years ago
1.1.7
5 years ago
1.1.6
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago