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

Run closure compiler under webpack #135

Merged
merged 17 commits into from
Jul 13, 2018
Merged

Run closure compiler under webpack #135

merged 17 commits into from
Jul 13, 2018

Conversation

balderdash
Copy link
Contributor

No description provided.

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

joshlory commented Jul 9, 2018

Does this mean deploy.sh can go away?

Copy link
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?

compiler: {
jar: 'node_modules/google-closure-compiler/compiler.jar',
compilation_level: 'SIMPLE',
entry_point: 'BlocklyModule',
Copy link
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
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.

blockly: path.join(__dirname, 'core/module.js'),
},
output: {
path: path.resolve(__dirname, 'dist'),
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

Nope.

@@ -4,6 +4,7 @@
<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
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


module.exports = {
name: 'blockly',
mode: 'development',
Copy link
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
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
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!

package.json Outdated
"build": "./deploy.sh",
"build:dev": "./deploy.sh debug",
"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
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

@@ -5,6 +5,7 @@
<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
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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants