-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CB-349: Gulp to webpack #253
Merged
+6,254
−10,989
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
2ab9a29
Updated package.json, replace npm-shrinkwrap with package-lock
bimalkant-lauhny adefe89
Update babelrc
bimalkant-lauhny 9e79bd3
Added webpack config
bimalkant-lauhny 59ba8fa
Remove gulpfile
bimalkant-lauhny 83261f7
Update static manager to read manifest file in build dir
bimalkant-lauhny c7d09c3
Update to Node 10.x and build command in Dockerfile and compile script
bimalkant-lauhny 66446d6
Add less file to script for webpack compilation
bimalkant-lauhny 6938ff2
Update webpack to use contenthash
bimalkant-lauhny 45a66cf
Correct import main and leaflet less, images path
bimalkant-lauhny c7dc74d
Remove webpack-dev-server from package.json
bimalkant-lauhny a863556
Remove unnecessary single chunk optimization from webpack config
bimalkant-lauhny 6419b12
Add separate container for static files
bimalkant-lauhny 03b8975
Add support for dev mode
bimalkant-lauhny 7f5ba7c
Use contenthash for prod only
bimalkant-lauhny 5cc5ddf
Observe changes in manifest.json to reload flask server
bimalkant-lauhny 9c4d4e3
Remove unnecessary docker volume and script, updated webpack config
bimalkant-lauhny 9dc523c
Removed CleanWebpackPlugin
MonkeyDo 7ea9cb5
Added and documented step to build static assets
MonkeyDo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"presets": ["es2015", "stage-2"], | ||
"presets": [ | ||
"@babel/preset-env" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM node:10.15-alpine | ||
|
||
RUN mkdir /code | ||
WORKDIR /code | ||
|
||
COPY package.json package-lock.json webpack.config.js /code/ | ||
RUN npm install | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
import '../styles/leaflet.less'; | ||
var L = require('leaflet'); | ||
L.Icon.Default.imagePath = '/static/images'; | ||
L.Icon.Default.imagePath = '/static/images/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import '../styles/main.less'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does the builder have to be a separate docker image? Typically we try to share our images as much as possible. The Dockerfile for CB also performs
npm install
, so as far as I can tell we should be able to build the static files using a container based on that imageThere 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.
@alastair Well, I just tried to take inspiration from the new setup in LB. 😅 @paramsingh @MonkeyDo what do you guys think about this?
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.
alastair is absolutely right! If the CB docker image can run npm commands, then there's no need to use another image.
For LB, there was previously nothing using node so the image did not contain node.