Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Build configuration #175

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Conversation

nitin42
Copy link
Contributor

@nitin42 nitin42 commented Jun 30, 2017

Added config for umd build.

@nitin42
Copy link
Contributor Author

nitin42 commented Jun 30, 2017

Untracked changes made it a little difficult to rebase. But anyway I think this is the minimal configuration we require. I will work on reducing the build size for the lib after we are done with some major changes to the codebase according to @evykassirer.

@nitin42 nitin42 changed the title Build configuration Build configuration (May merge) Jun 30, 2017
Copy link
Contributor

@evykassirer evykassirer left a comment

Choose a reason for hiding this comment

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

sorry for the delay - still need to look a bit into what the config means, but here's my first pass!

@@ -2,4 +2,4 @@
node_modules
*.log
.DS_Store
.idea
build
Copy link
Contributor

Choose a reason for hiding this comment

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

why did you get rid of .idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh! I'll make the change.

@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
Copy link
Contributor

Choose a reason for hiding this comment

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

new line at end of file pls!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I need to configure prettier settings!

@@ -0,0 +1,43 @@
const webpack = require("webpack");
const path = require("path");
const BabiliPlugin = require("babili-webpack-plugin");
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 isn't used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops! Yup. We rely on uglifyJS

}),
new CleanWebpackPlugin([path.resolve(__dirname, "../build")]) // Prebuild (kinda hook)
]
};
Copy link
Contributor

Choose a reason for hiding this comment

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

new lineeeee (added to the linter issue)

@@ -0,0 +1,43 @@
const webpack = require("webpack");
Copy link
Contributor

@evykassirer evykassirer Sep 1, 2017

Choose a reason for hiding this comment

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

single quotes please! (I'm surprised the linter didn't catch that, maybe it doesn't check for it - will open an issue)

NODE_ENV: JSON.stringify("production")
}
}),
new CleanWebpackPlugin([path.resolve(__dirname, "../build")]) // Prebuild (kinda hook)
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 update the comments in this file to explain a bit better what things do? kinda hook confuses me

I'm not super familiar with webpack but will look some of this stuff up - but if you could go through this config and explain why you chose this config that'd be good too - thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't worry! I will comment the configuration and will make it easier for you also to make changes afterwards.

@@ -2,23 +2,34 @@
"name": "mathsteps",
"version": "0.1.6",
"description": "Step by step math solutions",
"main": "index.js",
"main": "./build/mathsteps.min.js",
Copy link
Contributor

@evykassirer evykassirer Sep 1, 2017

Choose a reason for hiding this comment

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

if build/ is gitignored, will this not work? or will it always build before looking for main

"test": "node_modules/.bin/mocha --recursive",
"setup-hooks": "ln -s ../../scripts/git-hooks/pre-commit.sh .git/hooks/pre-commit"
"build": "NODE_ENV=production ./node_modules/.bin/webpack --config ./config/webpack.config.js --display-max-modules 0",
"lint": "node_modules/.bin/eslint ./lib",
Copy link
Contributor

Choose a reason for hiding this comment

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

this removes linting from the test files, which I don't think we should do

@evykassirer evykassirer changed the title Build configuration (May merge) Build configuration Sep 1, 2017
@evykassirer
Copy link
Contributor

Thanks :D

jcward added a commit to hipponot/mathsteps that referenced this pull request Jan 28, 2020
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.

2 participants