Skip to content
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

feat: add additional scripts to init template #2550

Merged
merged 2 commits into from
Mar 25, 2021
Merged

feat: add additional scripts to init template #2550

merged 2 commits into from
Mar 25, 2021

Conversation

jamesgeorge007
Copy link
Member

What kind of change does this PR introduce?
Enhancement

Did you add tests for your changes?
Yes

If relevant, did you update the documentation?
N/A

Summary
#2536 (comment)

Does this PR introduce a breaking change?
Nope

Other information
N/A

@@ -1,6 +1,9 @@
module.exports = (isUsingDevServer) => {
const scripts = {
build: 'webpack --mode=production',
'build:dev': 'webpack',
'build:prod': 'webpack --mode=production',
watch: 'webpack --watch',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@webpack/cli-team What do you think better to use webpack --watch or webpack watch (i.e. flag vs command)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer it as a flag since it doesn't have any options AFAIK

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with --watch

@codecov
Copy link

codecov bot commented Mar 24, 2021

Codecov Report

Merging #2550 (84d0abe) into master (6fb1215) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2550   +/-   ##
=======================================
  Coverage   90.74%   90.74%           
=======================================
  Files          29       29           
  Lines        1459     1459           
  Branches      416      416           
=======================================
  Hits         1324     1324           
  Misses        135      135           
Impacted Files Coverage Δ
...s/generators/init-template/default/package.json.js 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fb1215...84d0abe. Read the comment docs.

@@ -1,6 +1,9 @@
module.exports = (isUsingDevServer) => {
const scripts = {
build: 'webpack --mode=production',
'build:dev': 'webpack',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'build:dev': 'webpack',
'build:dev': 'webpack --mode=development',

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generated webpack config has the mode set to development.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be much clear if we mention --mode=development though both are the same.
Thoughts /cc @webpack/cli-team

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah flag is more explicit than implied via config

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cc @webpack/cli-team

Copy link
Member

@anshumanv anshumanv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anshumanv anshumanv merged commit 665d993 into master Mar 25, 2021
@anshumanv anshumanv deleted the feat/init branch March 25, 2021 15:26
@anshumanv
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants