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

Conversation

@nitin42
Copy link
Contributor

Added config for umd build.

@nitin42
Copy link
ContributorAuthor

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.

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

@evykassirerevykassirer 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!

*.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
ContributorAuthor

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"]
} No newline at end of file
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
ContributorAuthor

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 @@
constwebpack=require("webpack");
constpath=require("path");
constBabiliPlugin=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
ContributorAuthor

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

}),
newCleanWebpackPlugin([path.resolve(__dirname,"../build")])// Prebuild (kinda hook)
]
}; No newline at end of file
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 @@
constwebpack=require("webpack");
Copy link
Contributor

@evykassirerevykassirerSep 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")
}
}),
newCleanWebpackPlugin([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
ContributorAuthor

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.

"version": "0.1.6",
"description": "Step by step math solutions",
"main": "index.js",
"main": "./build/mathsteps.min.js",
Copy link
Contributor

@evykassirerevykassirerSep 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

@evykassirerevykassirer changed the title Build configuration (May merge)Build configurationSep 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 freeto 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

@nitin42@evykassirer