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

Tighten .npmignore ; use babel as transpiler #1

Merged
merged 3 commits into from
Aug 1, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use babel to prepare the lib directory as an alternative to webpack's…
… umd mode
  • Loading branch information
wbazant committed Jul 27, 2017
commit 87a0596981a266a5f609825392351a3d57384e42
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "A React higher order component that will debounce the rendering of your React components",
"main": "lib/index.js",
"scripts": {
"prepublish": "webpack",
"prepublishOnly": "rm -rf lib && babel src -d lib --copy-files",
"test": "cd e2e; CI=true npm test; cd .."
},
"keywords": [
Expand All @@ -17,15 +17,17 @@
],
"author": "Olivier Scherrer <pode.fr@gmail.com>",
"license": "MIT",
"dependencies": {},
"dependencies": {
"lodash": "^4.17.4",
"react": "^15.6.1"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-core": "^6.25.0",
"babel-loader": "^7.0.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"lodash.debounce": "^4.0.8",
"webpack": "^2.6.1"
"babel-preset-stage-0": "^6.24.1"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import debounce from 'lodash.debounce';
import {debounce} from 'lodash';
Copy link
Owner

Choose a reason for hiding this comment

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

could you add spaces inside {} for consistency? { debounce }


module.exports = function debounceRender(ComponentToDebounce, ...debounceArgs) {
return class DebouncedContainer extends Component {
Expand Down Expand Up @@ -28,4 +28,4 @@ module.exports = function debounceRender(ComponentToDebounce, ...debounceArgs) {
return <ComponentToDebounce { ...this.state } />;
}
}
};
};
24 changes: 0 additions & 24 deletions webpack.config.js

This file was deleted.