mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Init rollup
This commit is contained in:
parent
7043840cbd
commit
1f83ef123e
15
packages/strapi-helper-plugin/.babelrc
Normal file
15
packages/strapi-helper-plugin/.babelrc
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"modules": false,
|
||||
"loose": true,
|
||||
"targets": {
|
||||
"browsers": ["last 1 version"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"@babel/preset-react"
|
||||
]
|
||||
}
|
||||
92
packages/strapi-helper-plugin/lib/src/index.js
Normal file
92
packages/strapi-helper-plugin/lib/src/index.js
Normal file
@ -0,0 +1,92 @@
|
||||
// CommonPropTypes
|
||||
export { default as routerPropTypes } from './commonPropTypes/router/index.js';
|
||||
|
||||
// Components
|
||||
export { default as BackHeader } from './components/BackHeader';
|
||||
export { default as BlockerComponent } from './components/BlockerComponent';
|
||||
export { default as Button } from './components/Button';
|
||||
export { default as ContainerFluid } from './components/ContainerFluid';
|
||||
export {
|
||||
default as EmptyAttributesBlock,
|
||||
} from './components/EmptyAttributesBlock';
|
||||
export { default as ErrorBoundary } from './components/ErrorBoundary';
|
||||
export { default as ExtendComponent } from './components/ExtendComponent';
|
||||
export { default as GlobalPagination } from './components/GlobalPagination';
|
||||
export { default as IcoContainer } from './components/IcoContainer';
|
||||
export { default as InputAddon } from './components/InputAddon';
|
||||
|
||||
export {
|
||||
default as InputAddonWithErrors,
|
||||
} from './components/InputAddonWithErrors';
|
||||
export { default as InputCheckbox } from './components/InputCheckbox';
|
||||
export {
|
||||
default as InputCheckboxWithErrors,
|
||||
} from './components/InputCheckboxWithErrors';
|
||||
export { default as InputDate } from './components/InputDate';
|
||||
export {
|
||||
default as InputDateWithErrors,
|
||||
} from './components/InputDateWithErrors';
|
||||
export { default as InputEmail } from './components/InputEmail';
|
||||
export {
|
||||
default as InputEmailWithErrors,
|
||||
} from './components/InputEmailWithErrors';
|
||||
export { default as InputFile } from './components/InputFile';
|
||||
export {
|
||||
default as InputFileWithErrors,
|
||||
} from './components/InputFileWithErrors';
|
||||
export { default as InputNumber } from './components/InputNumber';
|
||||
export {
|
||||
default as InputNumberWithErrors,
|
||||
} from './components/InputNumberWithErrors';
|
||||
export { default as InputPassword } from './components/InputPassword';
|
||||
export {
|
||||
default as InputPasswordWithErrors,
|
||||
} from './components/InputPasswordWithErrors';
|
||||
export { default as InputSearch } from './components/InputSearch';
|
||||
export {
|
||||
default as InputSearchWithErrors,
|
||||
} from './components/InputSearchWithErrors';
|
||||
export { default as InputSelect } from './components/InputSelect';
|
||||
export {
|
||||
default as InputSelectWithErrors,
|
||||
} from './components/InputSelectWithErrors';
|
||||
export { default as InputsIndex } from './components/InputsIndex';
|
||||
export { default as InputText } from './components/InputText';
|
||||
export {
|
||||
default as InputTextWithErrors,
|
||||
} from './components/InputTextWithErrors';
|
||||
export { default as InputTextArea } from './components/InputTextArea';
|
||||
export {
|
||||
default as InputTextAreaWithErrors,
|
||||
} from './components/InputTextAreaWithErrors';
|
||||
export { default as InputToggle } from './components/InputToggle';
|
||||
export {
|
||||
default as InputToggleWithErrors,
|
||||
} from './components/InputToggleWithErrors';
|
||||
|
||||
export { default as Label } from './components/Label';
|
||||
export { default as LiLink } from './components/LiLink';
|
||||
|
||||
export { default as LoadingBar } from './components/LoadingBar';
|
||||
export { default as LoadingIndicator } from './components/LoadingIndicator';
|
||||
export {
|
||||
default as LoadingIndicatorPage,
|
||||
} from './components/LoadingIndicatorPage';
|
||||
|
||||
export { default as NotFound } from './components/NotFound';
|
||||
export { default as OverlayBlocker } from './components/OverlayBlocker';
|
||||
export { default as PageFooter } from './components/PageFooter';
|
||||
export { default as PluginHeader } from './components/PluginHeader';
|
||||
export { default as PopUpWarning } from './components/PopUpWarning';
|
||||
|
||||
// Utils
|
||||
export { default as auth } from './utils/auth';
|
||||
export { default as cleanData } from './utils/cleanData';
|
||||
export { darken } from './utils/colors';
|
||||
export { default as getQueryParameters } from './utils/getQueryParameters';
|
||||
export { default as injectHooks } from './utils/injectHooks';
|
||||
export { default as validateInput } from './utils/inputsValidations';
|
||||
export { default as Manager } from './utils/Manager';
|
||||
export { default as request } from './utils/request';
|
||||
export { default as storeData } from './utils/storeData';
|
||||
export { default as templateObject } from './utils/templateObject';
|
||||
@ -11,6 +11,8 @@
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
},
|
||||
"main": "dist/strapi-helper-plugin.cjs.js",
|
||||
"module": "dist/strapi-helper-plugin.esm.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
@ -21,12 +23,23 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"prettier": "prettier --single-quote --trailing-comma es5 --write \"{lib,__{tests,mocks}__}/**/*.js\"",
|
||||
"build": "rollup -c",
|
||||
"test": "echo \"no tests yet\""
|
||||
},
|
||||
"pre-commit": [
|
||||
"lint:admin"
|
||||
],
|
||||
"peerDependencies": {
|
||||
"react": "^16.8.6",
|
||||
"react-dom": "^16.8.6",
|
||||
"react-intl": "^2.8.0",
|
||||
"react-router": "^5.0.0",
|
||||
"react-router-dom": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.4.3",
|
||||
"@babel/preset-env": "^7.4.3",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"chalk": "^2.1.0",
|
||||
"cross-env": "^5.0.5",
|
||||
"enzyme": "^3.8.0",
|
||||
@ -37,6 +50,10 @@
|
||||
"prettier": "^1.5.3",
|
||||
"react-test-renderer": "^16.7.0",
|
||||
"rimraf": "^2.6.1",
|
||||
"rollup": "^1.10.0",
|
||||
"rollup-plugin-babel": "^4.3.2",
|
||||
"rollup-plugin-commonjs": "^9.3.4",
|
||||
"rollup-plugin-node-resolve": "^4.2.3",
|
||||
"shelljs": "^0.7.8"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -56,4 +73,4 @@
|
||||
"styled-components": "^3.2.6",
|
||||
"whatwg-fetch": "^2.0.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
33
packages/strapi-helper-plugin/rollup.config.js
Normal file
33
packages/strapi-helper-plugin/rollup.config.js
Normal file
@ -0,0 +1,33 @@
|
||||
import babel from 'rollup-plugin-babel';
|
||||
import commonjs from 'rollup-plugin-commonjs';
|
||||
import resolve from 'rollup-plugin-node-resolve';
|
||||
import pkg from './package.json';
|
||||
|
||||
export default {
|
||||
input: 'lib/src/index.js',
|
||||
output: [
|
||||
{
|
||||
exports: 'named',
|
||||
file: pkg.main,
|
||||
format: 'cjs',
|
||||
name: 'strapi-helper-plugin',
|
||||
},
|
||||
{
|
||||
exports: 'named',
|
||||
file: pkg.module,
|
||||
format: 'es',
|
||||
name: 'strapi-helper-plugin',
|
||||
},
|
||||
],
|
||||
external: [
|
||||
...Object.keys(pkg.dependencies || {}),
|
||||
...Object.keys(pkg.peerDependencies || {}),
|
||||
],
|
||||
plugins: [
|
||||
commonjs(),
|
||||
resolve(),
|
||||
babel({
|
||||
exclude: 'node_modules/**',
|
||||
}),
|
||||
],
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user