build: fix ssr build
This commit is contained in:
parent
e321c20906
commit
831be94521
@ -15,6 +15,7 @@ yarn.lock
|
|||||||
dist
|
dist
|
||||||
build
|
build
|
||||||
packages/*/lib/app
|
packages/*/lib/app
|
||||||
|
consoles/*/lib/app
|
||||||
|
|
||||||
*.ico
|
*.ico
|
||||||
*.html
|
*.html
|
||||||
|
@ -63,10 +63,7 @@ const Schemas = {
|
|||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
export const addTag = tag => {
|
export const addTag = tag => validateSchema(Schemas.tag, tag);
|
||||||
console.log(tag);
|
|
||||||
validateSchema(Schemas.tag, tag);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const instanceName = ({ name }) =>
|
export const instanceName = ({ name }) =>
|
||||||
!name ? null : validateSchema(Schemas.instanceName, { name });
|
!name ? null : validateSchema(Schemas.instanceName, { name });
|
||||||
|
@ -222,7 +222,6 @@ class CreateInstance extends Component {
|
|||||||
<ReduxForm form={IC_F} onSubmit={handleSubmit}>
|
<ReduxForm form={IC_F} onSubmit={handleSubmit}>
|
||||||
{({ handleSubmit, submitting }) => (
|
{({ handleSubmit, submitting }) => (
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit}>
|
||||||
{console.log({ isFormValid: this.isFormValid() })}
|
|
||||||
<Button
|
<Button
|
||||||
disabled={disabled || !this.isFormValid()}
|
disabled={disabled || !this.isFormValid()}
|
||||||
loading={submitting}
|
loading={submitting}
|
||||||
|
@ -55,7 +55,8 @@
|
|||||||
"isarray": "1.0.0",
|
"isarray": "1.0.0",
|
||||||
"react": "16.3.1",
|
"react": "16.3.1",
|
||||||
"styled-is": "1.1.3",
|
"styled-is": "1.1.3",
|
||||||
"breeze-nexttick": "0.2.1"
|
"breeze-nexttick": "0.2.1",
|
||||||
|
"webpack-sources": "1.0.1"
|
||||||
},
|
},
|
||||||
"workspaces": ["packages/*", "consoles/*", "bundle"]
|
"workspaces": ["packages/*", "consoles/*", "bundle"]
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"test": "NODE_ENV=test joyent-react-scripts test --env=jsdom",
|
"test": "NODE_ENV=test joyent-react-scripts test --env=jsdom",
|
||||||
"test:ci": "redrun test",
|
"test:ci": "redrun test",
|
||||||
"build:es": "babel src --out-dir dist/es",
|
"build:es": "babel src --out-dir dist/es",
|
||||||
"build:umd": "UMD=1 babel src --out-dir dist/umd"
|
"build:umd": "SSR=1 UMD=1 babel src --out-dir dist/umd"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"remcalc": "^1.0.10",
|
"remcalc": "^1.0.10",
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
{
|
{
|
||||||
"presets": ["joyent-portal"]
|
"ignore": ["_aliases.js"],
|
||||||
|
"presets": [
|
||||||
|
[
|
||||||
|
"joyent-portal",
|
||||||
|
{
|
||||||
|
"aliases": true,
|
||||||
|
"autoAliases": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
"dev": "NODE_ENV=development redrun -p build:es build:umd -- --watch --source-maps inline",
|
"dev": "NODE_ENV=development redrun -p build:es build:umd -- --watch --source-maps inline",
|
||||||
"prepublish": "NODE_ENV=production redrun -p build:es build:umd",
|
"prepublish": "NODE_ENV=production redrun -p build:es build:umd",
|
||||||
"build:es": "babel src --out-dir dist/es --copy-files",
|
"build:es": "babel src --out-dir dist/es --copy-files",
|
||||||
"build:umd": "UMD=1 babel src --out-dir dist/umd --copy-files",
|
"build:umd": "SSR=1 UMD=1 babel src --out-dir dist/umd --copy-files",
|
||||||
"build:test": "NODE_ENV=production redrun build:lib",
|
"build:test": "NODE_ENV=production redrun build:lib",
|
||||||
"build:lib": "NODE_ENV=production redrun -p build:es build:umd",
|
"build:lib": "NODE_ENV=production redrun -p build:es build:umd",
|
||||||
"build:bundle": "echo 0",
|
"build:bundle": "echo 0",
|
||||||
|
9
packages/instance-steps/src/_aliases.js
Normal file
9
packages/instance-steps/src/_aliases.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
const { SSR } = process.env;
|
||||||
|
|
||||||
|
const aliases = {};
|
||||||
|
|
||||||
|
if (SSR) {
|
||||||
|
aliases['^joyent-ui-toolkit/dist/es/editor$'] = './src/mocks/editor';
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = aliases;
|
3
packages/instance-steps/src/mocks/editor.js
Normal file
3
packages/instance-steps/src/mocks/editor.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
export default () => <span>joyent-maifest-editor</span>;
|
@ -19,7 +19,7 @@
|
|||||||
"test": "echo 0",
|
"test": "echo 0",
|
||||||
"test:ci": "redrun test",
|
"test:ci": "redrun test",
|
||||||
"build:es": "babel src --out-dir dist/es",
|
"build:es": "babel src --out-dir dist/es",
|
||||||
"build:umd": "UMD=1 babel src --out-dir dist/umd"
|
"build:umd": "SSR=1 UMD=1 babel src --out-dir dist/umd"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"apr-for-each": "^3.0.3",
|
"apr-for-each": "^3.0.3",
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"test": "NODE_ENV=test joyent-react-scripts test --env=jsdom",
|
"test": "NODE_ENV=test joyent-react-scripts test --env=jsdom",
|
||||||
"test:ci": "redrun test",
|
"test:ci": "redrun test",
|
||||||
"build:es": "babel src --out-dir dist/es",
|
"build:es": "babel src --out-dir dist/es",
|
||||||
"build:umd": "UMD=1 babel src --out-dir dist/umd"
|
"build:umd": "SSR=1 UMD=1 babel src --out-dir dist/umd"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"joy-react-broadcast": "^0.6.9",
|
"joy-react-broadcast": "^0.6.9",
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"test": "NODE_ENV=test joyent-react-scripts test --env=jsdom",
|
"test": "NODE_ENV=test joyent-react-scripts test --env=jsdom",
|
||||||
"test:ci": "redrun test",
|
"test:ci": "redrun test",
|
||||||
"build:es": "babel src --out-dir dist/es",
|
"build:es": "babel src --out-dir dist/es",
|
||||||
"build:umd": "UMD=1 babel src --out-dir dist/umd"
|
"build:umd": "SSR=1 UMD=1 babel src --out-dir dist/umd"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"joyent-react-styled-flexboxgrid": "^2.2.3",
|
"joyent-react-styled-flexboxgrid": "^2.2.3",
|
||||||
|
57
yarn.lock
57
yarn.lock
@ -438,13 +438,13 @@ ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5, ajv@^5.2.0, ajv@^5.2.3, ajv@^5.3.0:
|
|||||||
json-schema-traverse "^0.3.0"
|
json-schema-traverse "^0.3.0"
|
||||||
|
|
||||||
ajv@^6.0.1, ajv@^6.1.0:
|
ajv@^6.0.1, ajv@^6.1.0:
|
||||||
version "6.4.0"
|
version "6.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.4.0.tgz#d3aff78e9277549771daf0164cff48482b754fc6"
|
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.0.tgz#4c8affdf80887d8f132c9c52ab8a2dc4d0b7b24c"
|
||||||
dependencies:
|
dependencies:
|
||||||
fast-deep-equal "^1.0.0"
|
fast-deep-equal "^2.0.1"
|
||||||
fast-json-stable-stringify "^2.0.0"
|
fast-json-stable-stringify "^2.0.0"
|
||||||
json-schema-traverse "^0.3.0"
|
json-schema-traverse "^0.3.0"
|
||||||
uri-js "^3.0.2"
|
uri-js "^4.2.1"
|
||||||
|
|
||||||
align-text@^0.1.1, align-text@^0.1.3:
|
align-text@^0.1.1, align-text@^0.1.3:
|
||||||
version "0.1.4"
|
version "0.1.4"
|
||||||
@ -4510,6 +4510,10 @@ fast-deep-equal@^1.0.0:
|
|||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
|
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
|
||||||
|
|
||||||
|
fast-deep-equal@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
|
||||||
|
|
||||||
fast-diff@^1.1.1:
|
fast-diff@^1.1.1:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154"
|
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154"
|
||||||
@ -4621,12 +4625,12 @@ filesize@3.5.11:
|
|||||||
resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.11.tgz#1919326749433bb3cf77368bd158caabcc19e9ee"
|
resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.11.tgz#1919326749433bb3cf77368bd158caabcc19e9ee"
|
||||||
|
|
||||||
fill-range@^2.1.0:
|
fill-range@^2.1.0:
|
||||||
version "2.2.3"
|
version "2.2.4"
|
||||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"
|
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565"
|
||||||
dependencies:
|
dependencies:
|
||||||
is-number "^2.1.0"
|
is-number "^2.1.0"
|
||||||
isobject "^2.0.0"
|
isobject "^2.0.0"
|
||||||
randomatic "^1.1.3"
|
randomatic "^3.0.0"
|
||||||
repeat-element "^1.1.2"
|
repeat-element "^1.1.2"
|
||||||
repeat-string "^1.5.2"
|
repeat-string "^1.5.2"
|
||||||
|
|
||||||
@ -6492,8 +6496,8 @@ jest@20.0.4:
|
|||||||
jest-cli "^20.0.4"
|
jest-cli "^20.0.4"
|
||||||
|
|
||||||
joi@13.x.x:
|
joi@13.x.x:
|
||||||
version "13.2.0"
|
version "13.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/joi/-/joi-13.2.0.tgz#72307f1765bb40b068361f9368a4ba1092b8478e"
|
resolved "https://registry.yarnpkg.com/joi/-/joi-13.3.0.tgz#4defd4333b539c5d10e444ab44f5a5583480f17c"
|
||||||
dependencies:
|
dependencies:
|
||||||
hoek "5.x.x"
|
hoek "5.x.x"
|
||||||
isemail "3.x.x"
|
isemail "3.x.x"
|
||||||
@ -6515,8 +6519,8 @@ joyent-manifest-editor@^1.4.0:
|
|||||||
react-codemirror "^1.0.0"
|
react-codemirror "^1.0.0"
|
||||||
|
|
||||||
joyent-react-scripts@^8.0.3, joyent-react-scripts@^8.2.0:
|
joyent-react-scripts@^8.0.3, joyent-react-scripts@^8.2.0:
|
||||||
version "8.2.0"
|
version "8.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/joyent-react-scripts/-/joyent-react-scripts-8.2.0.tgz#fb6d96e59775945d45264577e379c108a06b8cc6"
|
resolved "https://registry.yarnpkg.com/joyent-react-scripts/-/joyent-react-scripts-8.2.1.tgz#6ccdf4f8e6af028cc8846e8099a2b7f486699f67"
|
||||||
dependencies:
|
dependencies:
|
||||||
apr-for-each "^3.0.3"
|
apr-for-each "^3.0.3"
|
||||||
apr-main "^4.0.3"
|
apr-main "^4.0.3"
|
||||||
@ -7208,6 +7212,10 @@ math-expression-evaluator@^1.2.14:
|
|||||||
version "1.2.17"
|
version "1.2.17"
|
||||||
resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac"
|
resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac"
|
||||||
|
|
||||||
|
math-random@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac"
|
||||||
|
|
||||||
max-safe-int@^1.0.0:
|
max-safe-int@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/max-safe-int/-/max-safe-int-1.0.0.tgz#44fba8ec993ded91fb2c5a35e71cf9c9f369ce52"
|
resolved "https://registry.yarnpkg.com/max-safe-int/-/max-safe-int-1.0.0.tgz#44fba8ec993ded91fb2c5a35e71cf9c9f369ce52"
|
||||||
@ -8806,12 +8814,13 @@ random-natural@^1.0.3:
|
|||||||
max-safe-int "^1.0.0"
|
max-safe-int "^1.0.0"
|
||||||
random-integral "^1.0.3"
|
random-integral "^1.0.3"
|
||||||
|
|
||||||
randomatic@^1.1.3:
|
randomatic@^3.0.0:
|
||||||
version "1.1.7"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
|
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923"
|
||||||
dependencies:
|
dependencies:
|
||||||
is-number "^3.0.0"
|
is-number "^4.0.0"
|
||||||
kind-of "^4.0.0"
|
kind-of "^6.0.0"
|
||||||
|
math-random "^1.0.1"
|
||||||
|
|
||||||
randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5:
|
randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5:
|
||||||
version "2.0.6"
|
version "2.0.6"
|
||||||
@ -10104,7 +10113,7 @@ source-map-url@^0.4.0:
|
|||||||
version "0.4.0"
|
version "0.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
|
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
|
||||||
|
|
||||||
source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0, source-map@~0.5.1:
|
source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0, source-map@~0.5.1, source-map@~0.5.3:
|
||||||
version "0.5.7"
|
version "0.5.7"
|
||||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
|
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
|
||||||
|
|
||||||
@ -11110,9 +11119,9 @@ upper-case@^1.0.3, upper-case@^1.1.1:
|
|||||||
version "1.1.3"
|
version "1.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598"
|
resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598"
|
||||||
|
|
||||||
uri-js@^3.0.2:
|
uri-js@^4.2.1:
|
||||||
version "3.0.2"
|
version "4.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-3.0.2.tgz#f90b858507f81dea4dcfbb3c4c3dbfa2b557faaa"
|
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.1.tgz#4595a80a51f356164e22970df64c7abd6ade9850"
|
||||||
dependencies:
|
dependencies:
|
||||||
punycode "^2.1.0"
|
punycode "^2.1.0"
|
||||||
|
|
||||||
@ -11456,12 +11465,12 @@ webpack-merge@^4.1.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
lodash "^4.17.5"
|
lodash "^4.17.5"
|
||||||
|
|
||||||
webpack-sources@^1.0.1, webpack-sources@^1.1.0:
|
webpack-sources@1.0.1, webpack-sources@^1.0.1, webpack-sources@^1.1.0:
|
||||||
version "1.1.0"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54"
|
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.0.1.tgz#c7356436a4d13123be2e2426a05d1dad9cbe65cf"
|
||||||
dependencies:
|
dependencies:
|
||||||
source-list-map "^2.0.0"
|
source-list-map "^2.0.0"
|
||||||
source-map "~0.6.1"
|
source-map "~0.5.3"
|
||||||
|
|
||||||
webpack-visualizer-plugin@^0.1.11:
|
webpack-visualizer-plugin@^0.1.11:
|
||||||
version "0.1.11"
|
version "0.1.11"
|
||||||
|
Loading…
Reference in New Issue
Block a user