-
Notifications
You must be signed in to change notification settings - Fork 831
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from nolanlawson/es-modules
Build as ES module as well as CommonJS
- Loading branch information
Showing
11 changed files
with
26 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules/ | ||
dist/ | ||
dist-es/ | ||
bundle.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"version": "2.0.1", | ||
"description": "Customizable Slack-like emoji picker for React", | ||
"main": "dist/index.js", | ||
"module": "dist-es/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:missive/emoji-mart.git" | ||
|
@@ -61,11 +62,13 @@ | |
"webpack": "^3.6.0" | ||
}, | ||
"scripts": { | ||
"clean": "rm -rf dist/", | ||
"clean": "rm -rf dist/ dist-es/", | ||
"build:data": "node scripts/build-data", | ||
"build:dist": "npm run clean && babel src --out-dir dist --copy-files --ignore webpack.config.js", | ||
"build:dist": "npm run clean && npm run build:cjs && npm run build:es", | ||
"build:cjs": "BABEL_ENV=cjs babel src --out-dir dist --copy-files --ignore webpack.config.js", | ||
"build:es": "babel src --out-dir dist-es --copy-files --ignore webpack.config.js", | ||
"build": "npm run build:dist && npm run build:data", | ||
"watch": "babel src --watch --out-dir dist --copy-files --ignore webpack.config.js", | ||
"watch": "BABEL_ENV=cjs babel src --watch --out-dir dist --copy-files --ignore webpack.config.js", | ||
"start": "npm run watch", | ||
"stats": "webpack --config ./src/webpack.config.js --json > stats.json", | ||
"react:clean": "rimraf node_modules/{react,react-dom,react-addons-test-utils}", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module.exports = data => { | ||
export default data => { | ||
const search = [] | ||
|
||
var addToSearch = (strings, split) => { | ||
|