Skip to content

Commit

Permalink
Bundle built files into npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
guioconnor committed Mar 4, 2018
1 parent ece8a78 commit 25f4e87
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 5 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-memory-game",
"version": "0.1.11",
"version": "0.1.15",
"private": false,
"main": "lib/index.js",
"repository": {
Expand All @@ -11,6 +11,7 @@
}
},
"dependencies": {
"copyfiles": "^1.2.0",
"lodash": "^4.17.5",
"prop-types": "^15.6.0",
"react": "^16.2.0",
Expand All @@ -23,8 +24,8 @@
"scripts": {
"start": "react-scripts start",
"compile": "babel --presets es2015,stage-0,react -d lib/ src/module/",
"postcompile": "cp ./src/module/*.css ./lib",
"prepublish": "npm run compile",
"postcompile": "cp ./src/module/*.css ./lib; ./scripts/copybundledfiles.sh",
"prepublish": "npm run compile; npm run build",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"watch:test": "react-scripts test --env=jsdom",
Expand Down
7 changes: 7 additions & 0 deletions scripts/copybundledfiles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! #!/usr/bin/env bash

mkdir -p ./lib/bundled
cp ./build/static/js/main*.js ./lib/bundled/react-memory-game.js
cp ./build/static/js/main*.js.map ./lib/bundled/react-memory-game.js.map
cp ./build/static/css/main*.css ./lib/bundled/react-memory-game.css
cp ./build/static/css/main*.css.map ./lib/bundled/react-memory-game.css.map
45 changes: 43 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1792,6 +1792,17 @@ [email protected]:
version "0.3.1"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"

copyfiles@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-1.2.0.tgz#a8da3ac41aa2220ae29bd3c58b6984294f2c593c"
dependencies:
glob "^7.0.5"
ltcdr "^2.2.1"
minimatch "^3.0.3"
mkdirp "^0.5.1"
noms "0.0.0"
through2 "^2.0.1"

core-js@^1.0.0:
version "1.2.7"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
Expand Down Expand Up @@ -4543,6 +4554,10 @@ lru-cache@^4.0.1:
pseudomap "^1.0.2"
yallist "^2.1.2"

ltcdr@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ltcdr/-/ltcdr-2.2.1.tgz#5ab87ad1d4c1dab8e8c08bbf037ee0c1902287cf"

macaddress@^0.2.8:
version "0.2.8"
resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12"
Expand Down Expand Up @@ -4834,6 +4849,13 @@ nomnom@~1.6.2:
colors "0.5.x"
underscore "~1.4.4"

[email protected]:
version "0.0.0"
resolved "https://registry.yarnpkg.com/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859"
dependencies:
inherits "^2.0.1"
readable-stream "~1.0.31"

nopt@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d"
Expand Down Expand Up @@ -5919,7 +5941,7 @@ read-pkg@^2.0.0:
normalize-package-data "^2.3.2"
path-type "^2.0.0"

[email protected]:
[email protected], readable-stream@~1.0.31:
version "1.0.34"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
dependencies:
Expand All @@ -5940,6 +5962,18 @@ readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable
string_decoder "~1.0.3"
util-deprecate "~1.0.1"

readable-stream@^2.1.5:
version "2.3.5"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.5.tgz#b4f85003a938cbb6ecbce2a124fb1012bd1a838d"
dependencies:
core-util-is "~1.0.0"
inherits "~2.0.3"
isarray "~1.0.0"
process-nextick-args "~2.0.0"
safe-buffer "~5.1.1"
string_decoder "~1.0.3"
util-deprecate "~1.0.1"

readdirp@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78"
Expand Down Expand Up @@ -6763,6 +6797,13 @@ throat@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836"

through2@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
dependencies:
readable-stream "^2.1.5"
xtend "~4.0.1"

through@^2.3.6:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
Expand Down Expand Up @@ -7301,7 +7342,7 @@ xml-name-validator@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635"

xtend@^4.0.0, xtend@^4.0.1:
xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"

Expand Down

0 comments on commit 25f4e87

Please sign in to comment.