Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Run closure compiler under webpack#135

Merged
balderdash merged 17 commits into
masterfrom
webpack-closure
Jul 13, 2018
Merged

Run closure compiler under webpack#135
balderdash merged 17 commits into
masterfrom
webpack-closure

Conversation

@balderdash
Copy link
Copy Markdown
Contributor

No description provided.

@joshlory joshlory requested a review from Hamms July 9, 2018 21:58
@joshlory
Copy link
Copy Markdown
Contributor

joshlory commented Jul 9, 2018

Does this mean deploy.sh can go away?

Copy link
Copy Markdown
Contributor

@Hamms Hamms left a comment

Choose a reason for hiding this comment

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

Any reason not to gitignore the dist directory?

Comment thread webpack.config.js Outdated
compiler: {
jar: 'node_modules/google-closure-compiler/compiler.jar',
compilation_level: 'SIMPLE',
entry_point: 'BlocklyModule',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you explain why we need BlocklyModule and can't just have the entry point be Blockly?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The playground directly loads the rest of the uncompiled source files, but you can't use a JS file in the browser if it includes a module declaration, so I pulled that out into a separate file.

Comment thread webpack.config.js Outdated
blockly: path.join(__dirname, 'core/module.js'),
},
output: {
path: path.resolve(__dirname, 'dist'),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is there a specific reason we we join for entry and resolve for output?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nope.

Comment thread tests/playground.html Outdated
<meta charset="utf-8">
<title>Blockly Playground</title>
<script type="text/javascript" src="../node_modules/google-closure-library/closure/goog/base.js"></script>
<!--<script type="text/javascript" src="./test_dependency_map.js"></script>-->
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: looks like a dev remnant

Comment thread webpack.config.js Outdated

module.exports = {
name: 'blockly',
mode: 'development',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we really want to default to dev and not prod?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Copy Markdown
Contributor

@Hamms Hamms left a comment

Choose a reason for hiding this comment

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

couple nits, otherwise this is looking great!

Comment thread package.json Outdated
"build": "webpack-cli",
"build:dev": "DEV=1 webpack-cli",
"preversion": "npm run test",
"version": "npm run build:dev && npm run build && git add -A build-output",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: can remove the git add step here

Comment thread tests/playground.html Outdated
<title>Blockly Playground</title>
<script type="text/javascript" src="../node_modules/google-closure-library/closure/goog/base.js"></script>
<script type="text/javascript" src="./test_dependency_map.js"></script>
<script type="text/javascript" src="./test_dependency_map.js"></script>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks like this is being included twice now? I think the last change should have been to remove this line rather than uncomment it

@balderdash balderdash merged commit 11828e5 into master Jul 13, 2018
@balderdash balderdash deleted the webpack-closure branch July 13, 2018 18:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants