-
Notifications
You must be signed in to change notification settings - Fork 0
[WIP] Use webpacker for react #204
base: master
Are you sure you want to change the base?
Changes from all commits
fe66751
bfdbc58
dd19500
81c1940
45a379d
5ce34b3
51eb663
a986d48
0942608
87c1280
90ec902
582c8c1
814f1db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"modules": false, | ||
"targets": { | ||
"browsers": "> 1%", | ||
"uglify": true | ||
}, | ||
"useBuiltIns": true | ||
} | ||
], | ||
"react", | ||
"stage-2" | ||
], | ||
"plugins": [ | ||
"syntax-dynamic-import", | ||
[ | ||
"transform-class-properties", | ||
{ | ||
"spec": true | ||
} | ||
] | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,8 @@ | |
"extends": "airbnb", | ||
"globals": { | ||
"React": true | ||
} | ||
}, | ||
"env": { | ||
"browser": true | ||
}, | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,5 @@ node_modules | |
|
||
# Ignore redis dumps | ||
*.rdb | ||
/public/packs | ||
/node_modules |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
plugins: | ||
postcss-smart-import: {} | ||
precss: {} | ||
autoprefixer: {} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import '~leaflet/dist/leaflet' | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
/* global IiifCropper */ | ||
import React from 'react'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unable to resolve path to module 'react' import/no-unresolved |
||
import PropTypes from 'prop-types'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unable to resolve path to module 'prop-types' import/no-unresolved |
||
import IiifCropper from './iiif_cropper'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unable to resolve path to module './iiif_cropper' import/no-unresolved |
||
|
||
class ImageTemplateCropper extends React.Component { | ||
export default class ImageTemplateCropper extends React.Component { | ||
addTemplate() { | ||
this.props.onAddNewTemplate(this.cropper.state); | ||
} | ||
|
@@ -27,5 +29,5 @@ class ImageTemplateCropper extends React.Component { | |
} | ||
|
||
ImageTemplateCropper.propTypes = { | ||
onAddNewTemplate: () => {}, | ||
onAddNewTemplate: PropTypes.func, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. propType "onAddNewTemplate" is not required, but has no corresponding defaultProp declaration react/require-default-props |
||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use
.scss
for consistency?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be possible.