mirror of
https://github.com/zhigang1992/react-content-loader.git
synced 2026-05-16 08:29:46 +08:00
Update packages (#147)
* build(dev dependencies): update packages * chore(gitignore): add yarn.lock
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -13,3 +13,5 @@ coverage
|
||||
.rpt2_cache
|
||||
settings.json
|
||||
*.code-workspace
|
||||
yarn.lock
|
||||
yarn-error.log
|
||||
|
||||
@@ -3,7 +3,7 @@ name: Props
|
||||
route: /props
|
||||
---
|
||||
|
||||
import { Playground, PropsTable } from 'docz'
|
||||
import { Playground } from 'docz'
|
||||
import ContentLoader, { Facebook, Instagram } from '../src'
|
||||
|
||||
## `animate?: boolean`
|
||||
|
||||
@@ -3,7 +3,7 @@ name: Usage
|
||||
route: /usage
|
||||
---
|
||||
|
||||
import { Playground, PropsTable } from 'docz'
|
||||
import { Playground } from 'docz'
|
||||
|
||||
import ContentLoader, {
|
||||
Facebook,
|
||||
|
||||
63
package.json
63
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "react-content-loader",
|
||||
"version": "3.4.2",
|
||||
"description": "SVG component to create placeholder loading, like Facebook cards loading.",
|
||||
"description": "SVG-Powered component to easily create placeholder loadings (like Facebook cards loading)",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/danilowoz/react-content-loader"
|
||||
@@ -41,43 +41,44 @@
|
||||
"release": "semantic-release"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.1.2",
|
||||
"@babel/polyfill": "^7.0.0",
|
||||
"@babel/preset-env": "^7.1.0",
|
||||
"@babel/core": "^7.4.4",
|
||||
"@babel/polyfill": "^7.4.4",
|
||||
"@babel/preset-env": "^7.4.4",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@babel/register": "^7.0.0",
|
||||
"@babel/runtime": "^7.0.0",
|
||||
"@commitlint/cli": "^7.5.0",
|
||||
"@commitlint/config-conventional": "^7.5.0",
|
||||
"@types/jest": "^23.3.10",
|
||||
"@types/react": "^16.7.13",
|
||||
"@types/react-dom": "^16.0.11",
|
||||
"@types/react-test-renderer": "^16.0.3",
|
||||
"@babel/register": "^7.4.4",
|
||||
"@babel/runtime": "^7.4.4",
|
||||
"@commitlint/cli": "^7.6.1",
|
||||
"@commitlint/config-conventional": "^7.6.0",
|
||||
"@types/jest": "^24.0.13",
|
||||
"@types/react": "^16.8.17",
|
||||
"@types/react-dom": "^16.8.4",
|
||||
"@types/react-test-renderer": "^16.8.1",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-jest": "^23.6.0",
|
||||
"commitizen": "^3.0.5",
|
||||
"babel-jest": "^24.8.0",
|
||||
"commitizen": "^3.1.1",
|
||||
"cz-conventional-changelog": "^2.1.0",
|
||||
"docz": "^0.13.7",
|
||||
"docz-theme-default": "^0.13.7",
|
||||
"husky": "^1.1.2",
|
||||
"jest": "^23.6.0",
|
||||
"prettier": "^1.15.3",
|
||||
"docz": "^1.2.0",
|
||||
"docz-theme-default": "^1.2.0",
|
||||
"husky": "^2.3.0",
|
||||
"jest": "^24.8.0",
|
||||
"prettier": "^1.17.1",
|
||||
"react": "^16.7.0",
|
||||
"react-dom": "^16.7.0",
|
||||
"react-test-renderer": "^16.6.3",
|
||||
"react-dom": "^16.8.6",
|
||||
"react-test-renderer": "^16.8.6",
|
||||
"remark-emoji": "^2.0.2",
|
||||
"rollup": "0.66.4",
|
||||
"rollup-plugin-replace": "^2.0.0",
|
||||
"rollup-plugin-typescript2": "^0.18.0",
|
||||
"rollup-plugin-uglify": "^6.0.0",
|
||||
"semantic-release": "^15.13.1",
|
||||
"ts-jest": "^23.10.5",
|
||||
"tslint": "^5.11.0",
|
||||
"tslint-config-prettier": "^1.17.0",
|
||||
"typescript": "^3.2.1"
|
||||
"rollup": "1.12.3",
|
||||
"rollup-plugin-analyzer": "^3.0.0",
|
||||
"rollup-plugin-replace": "^2.2.0",
|
||||
"rollup-plugin-typescript2": "^0.21.1",
|
||||
"rollup-plugin-uglify": "^6.0.2",
|
||||
"semantic-release": "^15.13.12",
|
||||
"ts-jest": "^24.0.2",
|
||||
"tslint": "^5.16.0",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"typescript": "^3.4.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^15.0.0-0 || ^16.0.0-0"
|
||||
"react": "^16.8.6"
|
||||
},
|
||||
"dependencies": {},
|
||||
"husky": {
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
import replace from "rollup-plugin-replace"
|
||||
import { uglify } from "rollup-plugin-uglify"
|
||||
import typescript from "rollup-plugin-typescript2"
|
||||
import pkg from "./package.json"
|
||||
import replace from 'rollup-plugin-replace'
|
||||
import { uglify } from 'rollup-plugin-uglify'
|
||||
import typescript from 'rollup-plugin-typescript2'
|
||||
import analyze from 'rollup-plugin-analyzer'
|
||||
import pkg from './package.json'
|
||||
|
||||
const mergeAll = objs => Object.assign({}, ...objs)
|
||||
|
||||
const commonPlugins = [
|
||||
typescript({
|
||||
typescript: require("typescript")
|
||||
})
|
||||
typescript: require('typescript'),
|
||||
}),
|
||||
]
|
||||
|
||||
const configBase = {
|
||||
input: "src/index.ts",
|
||||
input: 'src/index.ts',
|
||||
output: {
|
||||
exports: "named"
|
||||
exports: 'named',
|
||||
},
|
||||
external: [
|
||||
...Object.keys(pkg.dependencies || {}),
|
||||
...Object.keys(pkg.peerDependencies || {})
|
||||
...Object.keys(pkg.peerDependencies || {}),
|
||||
],
|
||||
plugins: commonPlugins
|
||||
plugins: commonPlugins,
|
||||
}
|
||||
|
||||
const umdConfig = mergeAll([
|
||||
@@ -30,16 +31,16 @@ const umdConfig = mergeAll([
|
||||
configBase.output,
|
||||
{
|
||||
file: `dist/${pkg.name}.js`,
|
||||
format: "umd",
|
||||
name: "ContentLoader",
|
||||
format: 'umd',
|
||||
name: 'ContentLoader',
|
||||
globals: {
|
||||
react: "React",
|
||||
"react-dom": "ReactDOM"
|
||||
}
|
||||
}
|
||||
react: 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
},
|
||||
},
|
||||
]),
|
||||
external: Object.keys(pkg.peerDependencies || {})
|
||||
}
|
||||
external: Object.keys(pkg.peerDependencies || {}),
|
||||
},
|
||||
])
|
||||
|
||||
const devUmdConfig = mergeAll([
|
||||
@@ -47,10 +48,10 @@ const devUmdConfig = mergeAll([
|
||||
{
|
||||
plugins: umdConfig.plugins.concat(
|
||||
replace({
|
||||
"process.env.NODE_ENV": JSON.stringify("development")
|
||||
'process.env.NODE_ENV': JSON.stringify('development'),
|
||||
})
|
||||
)
|
||||
}
|
||||
),
|
||||
},
|
||||
])
|
||||
|
||||
const prodUmdConfig = mergeAll([
|
||||
@@ -58,33 +59,34 @@ const prodUmdConfig = mergeAll([
|
||||
{
|
||||
output: mergeAll([
|
||||
umdConfig.output,
|
||||
{ file: umdConfig.output.file.replace(/\.js$/, ".min.js") }
|
||||
])
|
||||
{ file: umdConfig.output.file.replace(/\.js$/, '.min.js') },
|
||||
]),
|
||||
},
|
||||
{
|
||||
plugins: umdConfig.plugins.concat(
|
||||
replace({
|
||||
"process.env.NODE_ENV": JSON.stringify("production")
|
||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||
}),
|
||||
uglify({
|
||||
compress: {
|
||||
pure_getters: true,
|
||||
unsafe: true,
|
||||
unsafe_comps: true
|
||||
}
|
||||
unsafe_comps: true,
|
||||
},
|
||||
})
|
||||
)
|
||||
}
|
||||
),
|
||||
},
|
||||
])
|
||||
|
||||
const webConfig = mergeAll([
|
||||
configBase,
|
||||
{
|
||||
output: [
|
||||
mergeAll([configBase.output, { file: pkg.module, format: "es" }]),
|
||||
mergeAll([configBase.output, { file: pkg.main, format: "cjs" }])
|
||||
]
|
||||
}
|
||||
mergeAll([configBase.output, { file: pkg.module, format: 'es' }]),
|
||||
mergeAll([configBase.output, { file: pkg.main, format: 'cjs' }]),
|
||||
],
|
||||
plugins: configBase.plugins.concat(analyze()),
|
||||
},
|
||||
])
|
||||
|
||||
export default [devUmdConfig, prodUmdConfig, webConfig]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export interface IContentLoaderProps {
|
||||
animate?: boolean
|
||||
ariaLabel?: string | boolean
|
||||
ariaLabel?: string
|
||||
children?: React.ReactNode
|
||||
baseUrl?: string
|
||||
className?: string
|
||||
|
||||
Reference in New Issue
Block a user