Skip to content

Commit

Permalink
restore tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed Jun 24, 2020
1 parent c2202de commit 9d96322
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 40 deletions.
23 changes: 4 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,29 @@ init:
mkdir -p css/wq
mkdir -p scss/wq

js: js_wq js_lib
js: js_build js_lib

js_build: init
npm run rollup-all

js_wq: js_build
cp -p packages/app/dist/app.js* js/wq/
cp -p packages/jquery-mobile/dist/jquery-mobile.js* js/wq/
cp -p packages/leaflet/dist/leaflet.js* js/wq/
cp -p packages/leaflet/dist/locate.js* js/wq/
cp -p packages/leaflet/dist/mapserv.js* js/wq/
cp -p packages/map/dist/map.js* js/wq/
cp -p packages/model/dist/model.js* js/wq/
cp -p packages/outbox/dist/outbox.js* js/wq/
cp -p packages/router/dist/router.js* js/wq/
cp -p packages/store/dist/store.js* js/wq/

js_leaflet_draw:
js_leaflet_draw: init
echo "define(['leaflet'], function(L) {" > js/leaflet.draw.js
cat packages/leaflet/node_modules/leaflet-draw/dist/leaflet.draw-src.js >> js/leaflet.draw.js
echo "\n});" >> js/leaflet.draw.js

js_regenerator_runtime:
js_regenerator_runtime: init
echo "define(function() {" > js/regenerator-runtime.js
cat node_modules/regenerator-runtime/runtime.js >> js/regenerator-runtime.js
echo "\nreturn regeneratorRuntime;\n});" >> js/regenerator-runtime.js

js_lib: js_build js_leaflet_draw js_regenerator_runtime
js_lib: init js_leaflet_draw js_regenerator_runtime
cp -p packages/leaflet/node_modules/esri-leaflet/dist/esri-leaflet-debug.js js/esri-leaflet.js
cp -p packages/jquery-mobile/node_modules/jquery/dist/jquery.js js/jquery.js
cp -p packages/jquery-mobile/dist/jquery.mobile.vendor.js js/jquery.mobile.js
cp -p packages/store/node_modules/redux/dist/redux.js js/redux.js
cp -p packages/store/node_modules/redux-persist/dist/redux-persist.js js/redux-persist.js
cp -p packages/store/node_modules/redux-logger/dist/redux-logger.js js/redux-logger.js
cp -p packages/router/node_modules/redux-first-router/dist/redux-first-router.js js/redux-first-router.js
cp -p packages/model/dist/redux-orm.js js/redux-orm.js
cp -p packages/outbox/dist/redux-offline.js js/redux-offline.js
cp -p packages/outbox/dist/json-forms.js js/json-forms.js
cp -p packages/leaflet/node_modules/leaflet/dist/leaflet-src.js js/leaflet.js
cp -p packages/leaflet/node_modules/leaflet.markercluster/dist/leaflet.markercluster-src.js js/leaflet.markercluster.js
sed -i "s/'exports'/'exports', 'leaflet'/" js/leaflet.markercluster.js
Expand Down
10 changes: 9 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@ module.exports = {
'@babel/plugin-transform-react-jsx',
{ useBuiltIns: true, useSpread: true }
]
]
],
env: {
test: {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-react'
]
}
}
};
4 changes: 2 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"main": "index.js",
"scripts": {
"test": "cd ../../ && npm run jest packages/app",
"build": "cd ../../ && npm run rollup -- -c packages/app/rollup.config.js",
"prettier": "cd ../../ && npm run prettier -- --write packages/app/{,src/,src/*/,src/*/*/}*.js{,on}",
"lint": "cd ../../ && npm run eslint packages/app/{,src/,src/*/}*.js"
"lint": "cd ../../ && npm run eslint packages/app/{,src/,src/*/}*.js",
"rollup": "cd ../../ && npm run rollup -- -c packages/app/rollup.config.js"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/jquery-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"main": "index.js",
"scripts": {
"test": "cd ../../ && npm run jest packages/jquery-mobile",
"build": "cd ../../ && npm run rollup -- -c packages/jquery-mobile/rollup.config.js",
"prettier": "cd ../../ && npm run prettier -- --write packages/jquery-mobile/{,src/,src/*/,src/*/*/}*.js{,on}",
"lint": "cd ../../ && npm run eslint packages/jquery-mobile/{,src/,src/*/,src/*/*/}*.js"
"lint": "cd ../../ && npm run eslint packages/jquery-mobile/{,src/,src/*/,src/*/*/}*.js",
"rollup": "cd ../../ && npm run rollup -- -c packages/jquery-mobile/rollup.config.js"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/leaflet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@wq/leaflet",
"version": "1.2.0-beta.1",
"description": "Leaflet integration for @wq/map",
"main": "dist/index.js",
"module": "dist/index.es.js",
"type": "module",
"main": "index.js",
"scripts": {
"test": "cd ../../ && npm run jest packages/leaflet -- --moduleDirectories node_modules/@wq/react/node_modules node_modules",
"build": "npm run babel && npm run prettier",
Expand Down
1 change: 0 additions & 1 deletion packages/material-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"main": "index.js",
"scripts": {
"test": "echo 'No tests'",
"build": "echo 'No build required'",
"prettier": "cd ../../ && npm run prettier -- --write packages/material-native/*.js{,on}",
"lint": "cd ../../ && npm run eslint packages/material-native/*.js"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"main": "index.js",
"scripts": {
"test": "cd ../../ && npm run jest packages/model",
"build": "cd ../../ && npm run rollup -- -c packages/model/rollup.config.js",
"prettier": "cd ../../ && npm run prettier -- --write packages/model/{,src/,src/*/,src/*/*/}*.js{,on}",
"lint": "cd ../../ && npm run eslint packages/model/{,src/,src/*/}*.js"
"lint": "cd ../../ && npm run eslint packages/model/{,src/,src/*/}*.js",
"rollup": "cd ../../ && npm run rollup -- -c packages/model/rollup.config.js"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/model/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default [
plugins: [resolve(), commonjs()],
output: [
{
file: 'packages/model/dist/redux-orm.js',
file: 'js/redux-orm.js',
format: 'amd',
exports: 'named',
indent: false
Expand Down
4 changes: 2 additions & 2 deletions packages/outbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"main": "index.js",
"scripts": {
"test": "cd ../../ && npm run jest packages/outbox",
"build": "cd ../../ && npm run rollup -- -c packages/outbox/rollup.config.js",
"prettier": "cd ../../ && npm run prettier -- --write packages/outbox/{,src/,src/*/,src/*/*/}*.js{,on}",
"lint": "cd ../../ && npm run eslint packages/outbox/{,src/,src/*/}*.js"
"lint": "cd ../../ && npm run eslint packages/outbox/{,src/,src/*/}*.js",
"rollup": "cd ../../ && npm run rollup -- -c packages/outbox/rollup.config.js"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/outbox/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default [
input: 'packages/outbox/vendor/json-forms.js',
output: [
{
file: 'packages/outbox/dist/json-forms.js',
file: 'js/json-forms.js',
format: 'amd',
indent: false
}
Expand All @@ -52,7 +52,7 @@ export default [
external: ['redux', 'redux-persist'],
output: [
{
file: 'packages/outbox/dist/redux-offline.js',
file: 'js/redux-offline.js',
format: 'amd',
indent: false
}
Expand Down
8 changes: 4 additions & 4 deletions packages/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "@wq/router",
"version": "1.2.0",
"description": "Respond to URL changes with locally generated pages and custom events",
"main": "dist/index.js",
"module": "dist/index.es.js",
"type": "module",
"main": "index.js",
"scripts": {
"test": "cd ../../ && npm run jest packages/router",
"build": "cd ../../ && npm run rollup -- -c packages/router/rollup.config.js",
"prettier": "cd ../../ && npm run prettier -- --write packages/router/{,src/,src/*/,src/*/*/}*.js{,on}",
"lint": "cd ../../ && npm run eslint packages/router/{,src/,src/*/,src/*/*/}*.js"
"lint": "cd ../../ && npm run eslint packages/router/{,src/,src/*/,src/*/*/}*.js",
"rollup": "cd ../../ && npm run rollup -- -c packages/router/rollup.config.js"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"main": "index.js",
"scripts": {
"test": "cd ../../ && npm run jest packages/store",
"build": "cd ../../ && npm run rollup -- -c packages/store/rollup.config.js",
"prettier": "cd ../../ && npm run prettier -- --write packages/store/{,src/,src/*/,src/*/*/}*.js{,on}",
"lint": "cd ../../ && npm run eslint packages/store/{,src/,src/*/}*.js"
"lint": "cd ../../ && npm run eslint packages/store/{,src/,src/*/}*.js",
"rollup": "cd ../../ && npm run rollup -- -c packages/store/rollup.config.js"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 9d96322

Please sign in to comment.