-
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?
Conversation
…uery through webpack
…rip out all the config related to it
…-areaselect styles through webpacker for specific components/views
…pack for asset precompile on travis
…until build process is fixed
Codecov Report
@@ Coverage Diff @@
## master #204 +/- ##
==========================================
- Coverage 98.44% 98.39% -0.05%
==========================================
Files 40 40
Lines 450 436 -14
==========================================
- Hits 443 429 -14
Misses 7 7
Continue to review full report at Codecov.
|
@@ -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 comment
The 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
/* global IiifCropper */ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import IiifCropper from './iiif_cropper'; |
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.
Unable to resolve path to module './iiif_cropper' import/no-unresolved
Missing file extension for "./iiif_cropper" import/extensions
@@ -1,6 +1,8 @@ | |||
/* global IiifCropper */ | |||
import React from 'react'; | |||
import PropTypes from 'prop-types'; |
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.
Unable to resolve path to module 'prop-types' import/no-unresolved
Missing file extension for "prop-types" import/extensions
@@ -1,6 +1,8 @@ | |||
/* global IiifCropper */ | |||
import React from 'react'; |
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.
Unable to resolve path to module 'react' import/no-unresolved
Missing file extension for "react" import/extensions
|
||
describe('LeafletIiif', () => { | ||
it('sets up the iiif layer', () => { | ||
xit('sets up the iiif layer', () => { |
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.
'xit' is not defined no-undef
}, | ||
|
||
resolveLoader: { | ||
modules: ['node_modules'] |
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.
Missing trailing comma comma-dangle
extensions: settings.extensions, | ||
modules: [ | ||
resolve(settings.source_path), | ||
'node_modules' |
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.
Missing trailing comma comma-dangle
new ExtractTextPlugin(env.NODE_ENV === 'production' ? '[name]-[hash].css' : '[name].css'), | ||
new ManifestPlugin({ | ||
publicPath: output.publicPath, | ||
writeToFileEmit: true |
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.
Missing trailing comma comma-dangle
}, | ||
|
||
module: { | ||
rules: sync(join(loadersDir, '*.js')).map(loader => require(loader)) |
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.
Missing trailing comma comma-dangle
output: { | ||
filename: '[name].js', | ||
path: output.path, | ||
publicPath: output.publicPath |
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.
Missing trailing comma comma-dangle
"dependencies": {}, | ||
"dependencies": { | ||
"autoprefixer": "^7.1.1", | ||
"babel-core": "^6.25.0", |
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 we consider all of these "dependencies"? Some of them feel like "devDependencies"?
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.
I should be able to move a bunch to devDependencies. Some of these were automatically placed here by the webpacker gem. I can try moving them and see if it breaks things.
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.
ah gotcha.
@@ -0,0 +1 @@ | |||
@import '~leaflet/dist/leaflet' |
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.
When running locally in Also, where are we at with testing our deploy? |
@mejackreed I haven't tried it in the production env yet. We also don't have a deploy attempt yet for this. I suspect we'll need to hold on finishing this a bit and turn to other priorities for a while |
Switch to using the webpacker gem to allow us to take advantage of benefits of modern js; refactor react and such to fit the new build process.