feat: add ES module builds (#2215)
This commit is contained in:
committed by
Shawn Erquhart
parent
7672f2ae27
commit
d142b32345
@ -5,6 +5,7 @@
|
||||
"homepage": "https://www.netlifycms.org/docs/widgets/#number",
|
||||
"repository": "https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-widget-number",
|
||||
"bugs": "https://github.com/netlify/netlify-cms/issues",
|
||||
"module": "dist/esm/index.js",
|
||||
"main": "dist/netlify-cms-widget-number.js",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@ -17,7 +18,8 @@
|
||||
"scripts": {
|
||||
"watch": "webpack -w",
|
||||
"develop": "npm run watch",
|
||||
"build": "cross-env NODE_ENV=production webpack"
|
||||
"build": "cross-env NODE_ENV=production webpack",
|
||||
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore src/**/__tests__/* --root-mode upward"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"netlify-cms-ui-default": "^2.4.1-beta.0",
|
||||
|
@ -1,7 +1,12 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ValidationErrorTypes from 'netlify-cms-core/src/constants/validationErrorTypes';
|
||||
const ValidationErrorTypes = {
|
||||
PRESENCE: 'PRESENCE',
|
||||
PATTERN: 'PATTERN',
|
||||
RANGE: 'RANGE',
|
||||
CUSTOM: 'CUSTOM',
|
||||
};
|
||||
|
||||
export default class NumberControl extends React.Component {
|
||||
static propTypes = {
|
||||
|
Reference in New Issue
Block a user