mirror of
https://github.com/kevinsqi/react-circular-progressbar.git
synced 2026-01-25 16:03:15 +00:00
remove conflicting babel, eslint, webpack deps, which was causing errors with /demo app starting
This commit is contained in:
parent
db568927a2
commit
f603d35903
@ -1,44 +1,27 @@
|
||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||
# react-circular-progressbar demo site
|
||||
|
||||
## Available Scripts
|
||||
## Developing
|
||||
|
||||
In the project directory, you can run:
|
||||
In the parent react-circular-progressbar directory, run:
|
||||
|
||||
### `npm start`
|
||||
```
|
||||
yarn link
|
||||
yarn start
|
||||
```
|
||||
|
||||
Runs the app in the development mode.<br>
|
||||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
||||
In this repo, run:
|
||||
|
||||
The page will reload if you make edits.<br>
|
||||
You will also see any lint errors in the console.
|
||||
```
|
||||
yarn link react-circular-progressbar
|
||||
yarn start
|
||||
```
|
||||
|
||||
### `npm test`
|
||||
The demo site will be running at [localhost:3000](http://localhost:3000). Now, any changes that are made to react-circular-progressbar source will be live-reloaded on the demo site.
|
||||
|
||||
Launches the test runner in the interactive watch mode.<br>
|
||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
||||
## Deploying
|
||||
|
||||
### `npm run build`
|
||||
This site is hosted on github pages at https://www.kevinqi.com/react-circular-progressbar. Deploy new updates by running in this directory:
|
||||
|
||||
Builds the app for production to the `build` folder.<br>
|
||||
It correctly bundles React in production mode and optimizes the build for the best performance.
|
||||
|
||||
The build is minified and the filenames include the hashes.<br>
|
||||
Your app is ready to be deployed!
|
||||
|
||||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
||||
|
||||
### `npm run eject`
|
||||
|
||||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
||||
|
||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
|
||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||
|
||||
## Learn More
|
||||
|
||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||
|
||||
To learn React, check out the [React documentation](https://reactjs.org/).
|
||||
```
|
||||
yarn run deploy
|
||||
```
|
||||
|
||||
@ -8310,7 +8310,7 @@ react-dev-utils@^8.0.0:
|
||||
strip-ansi "5.0.0"
|
||||
text-table "0.2.0"
|
||||
|
||||
react-dom@16.8.6:
|
||||
react-dom@^16.8.6:
|
||||
version "16.8.6"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f"
|
||||
integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==
|
||||
@ -8379,7 +8379,7 @@ react-scripts@2.1.8:
|
||||
optionalDependencies:
|
||||
fsevents "1.2.4"
|
||||
|
||||
react@16.8.6:
|
||||
react@^16.8.6:
|
||||
version "16.8.6"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe"
|
||||
integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw==
|
||||
|
||||
18
package.json
18
package.json
@ -22,23 +22,13 @@
|
||||
"build:css": "mkdir -p dist && cp ./src/styles.css ./dist/styles.css",
|
||||
"build:js": "tsc",
|
||||
"clean": "rimraf dist",
|
||||
"prepare": "npm run clean && npm run build"
|
||||
"prepare": "npm run clean && npm run build",
|
||||
"start": "tsc -w"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^16.8.14",
|
||||
"babel-core": "^6.3.15",
|
||||
"babel-eslint": "^7.2.3",
|
||||
"babel-loader": "^7.0.0",
|
||||
"babel-preset-env": "^1.6.0",
|
||||
"babel-preset-react": "^6.3.13",
|
||||
"babel-register": "^6.8.0",
|
||||
"chai": "^3.5.0",
|
||||
"enzyme": "^2.3.0",
|
||||
"eslint": "^3.11.0",
|
||||
"eslint-config-airbnb": "^14.1.0",
|
||||
"eslint-plugin-import": "^2.2.0",
|
||||
"eslint-plugin-jsx-a11y": "^4.0.0",
|
||||
"eslint-plugin-react": "^6.0.0",
|
||||
"jsdom": "^9.0.0",
|
||||
"mocha": "^3.3.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
@ -46,9 +36,7 @@
|
||||
"react-addons-test-utils": "^15.0.2",
|
||||
"react-dom": "^15.4.0",
|
||||
"rimraf": "^2.3.4",
|
||||
"typescript": "^3.4.4",
|
||||
"webpack": "^2.5.1",
|
||||
"webpack-dev-server": "^2.4.5"
|
||||
"typescript": "^3.4.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"prop-types": "^15.5.10"
|
||||
|
||||
@ -1,72 +0,0 @@
|
||||
const webpack = require('webpack');
|
||||
const path = require('path');
|
||||
|
||||
const nodeEnv = process.env.NODE_ENV || 'development';
|
||||
const demoDir = 'docs';
|
||||
|
||||
const webpackConfig = {
|
||||
context: __dirname,
|
||||
entry: {
|
||||
'react-circular-progressbar': [
|
||||
path.resolve(__dirname, 'src', 'index.jsx')
|
||||
]
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname),
|
||||
filename: 'index.js',
|
||||
library: 'CircularProgressbar',
|
||||
libraryTarget: 'umd'
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.jsx'],
|
||||
modules: ['node_modules']
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
exclude: /(node_modules)/,
|
||||
loader: 'babel-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify(nodeEnv)
|
||||
}),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
debug: true
|
||||
})
|
||||
]
|
||||
};
|
||||
|
||||
if (nodeEnv === 'development') {
|
||||
webpackConfig.devtool = 'source-map';
|
||||
webpackConfig.devServer = { contentBase: path.resolve(__dirname, demoDir) };
|
||||
webpackConfig.entry['react-circular-progressbar'].unshift('webpack-dev-server/client?http://0.0.0.0:8080/');
|
||||
webpackConfig.entry['react-circular-progressbar'].push(path.resolve(__dirname, demoDir, 'demo.jsx'));
|
||||
webpackConfig.output.publicPath = '/';
|
||||
}
|
||||
|
||||
if (nodeEnv === 'demo') {
|
||||
webpackConfig.entry['react-circular-progressbar'].push(path.resolve(__dirname, demoDir, 'demo.jsx'));
|
||||
webpackConfig.output.path = path.resolve(__dirname, demoDir);
|
||||
}
|
||||
|
||||
if (nodeEnv === 'production') {
|
||||
webpackConfig.externals = {
|
||||
'react': {
|
||||
root: 'React',
|
||||
commonjs2: 'react',
|
||||
commonjs: 'react',
|
||||
amd: 'react'
|
||||
}
|
||||
};
|
||||
webpackConfig.output.path = path.resolve(__dirname, 'dist');
|
||||
webpackConfig.plugins.push(new webpack.optimize.UglifyJsPlugin({
|
||||
compress: { warnings: false },
|
||||
sourceMap: false
|
||||
}));
|
||||
}
|
||||
|
||||
module.exports = webpackConfig;
|
||||
Loading…
x
Reference in New Issue
Block a user