Skip to content

Commit

Permalink
fix: Split "webiny-integration-*" into "webiny-app-*" and "webiny-api…
Browse files Browse the repository at this point in the history
…-*" packages (#514)
  • Loading branch information
adrians5j committed Apr 4, 2019
1 parent 83757a8 commit d2d6dfc
Show file tree
Hide file tree
Showing 246 changed files with 912 additions and 441 deletions.
40 changes: 2 additions & 38 deletions .flowconfig
Expand Up @@ -21,44 +21,8 @@ module.system.node.resolve_dirname=node_modules
module.name_mapper='.*\.svg' -> 'empty/object'
module.name_mapper='.*\.scss' -> 'empty/object'
module.name_mapper='^webiny-\(.*\)/types$' -> '<PROJECT_ROOT>/packages/webiny-\1/types.js'
module.name_mapper='^webiny-api/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-api/src/\1'
module.name_mapper='^webiny-api-cms/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-api-cms/src/\1'
module.name_mapper='^webiny-app/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-app/src/\1'
module.name_mapper='^webiny-admin/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-admin/src/\1'
module.name_mapper='^webiny-app-cms/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-app-cms/src/\1'
module.name_mapper='^webiny-cms-editor/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-cms-editor/src/\1'
module.name_mapper='^webiny-ui/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-ui/src/\1'
module.name_mapper='^webiny-compose/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-compose/src/\1'
module.name_mapper='^webiny-data-extractor/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-data-extractor/src/\1'
module.name_mapper='^webiny-entity-memory/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-entity-memory/src/\1'
module.name_mapper='^webiny-entity-mongodb/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-entity-mongodb/src/\1'
module.name_mapper='^webiny-entity/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-entity/src/\1'
module.name_mapper='^webiny-file-storage-local/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-file-storage-local/src/\1'
module.name_mapper='^webiny-file-storage-s3/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-file-storage-s3/src/\1'
module.name_mapper='^webiny-file-storage/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-file-storage/src/\1'
module.name_mapper='^webiny-form/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-form/src/\1'
module.name_mapper='^webiny-i18n-react/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-i18n-react/src/\1'
module.name_mapper='^webiny-i18n/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-i18n/src/\1'
module.name_mapper='^webiny-install/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-install/src/\1'
module.name_mapper='^webiny-jimp/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-jimp/src/\1'
module.name_mapper='^webiny-load-assets/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-load-assets/src/\1'
module.name_mapper='^webiny-model/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-model/src/\1'
module.name_mapper='^webiny-plugins/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-plugins/src/\1'
module.name_mapper='^webiny-react-router/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-react-router/src/\1'
module.name_mapper='^webiny-api-security/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-api-security/src/\1'
module.name_mapper='^webiny-app-security/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-app-security/src/\1'
module.name_mapper='^webiny-service-manager/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-service-manager/src/\1'
module.name_mapper='^webiny-sql-table-sync/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-sql-table-sync/src/\1'
module.name_mapper='^webiny-sql-table/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-sql-table/src/\1'
module.name_mapper='^webiny-storybook-utils/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-storybook-utils/src/\1'
module.name_mapper='^webiny-validation/?\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-validation/src/\1'
module.name_mapper='^webiny-integration-cookie-policy/?\(.*\)$' -> '<PROJECT_ROOT>/independent/webiny-integration-cookie-policy/src/\1'
module.name_mapper='^webiny-integration-google-tag-manager/?\(.*\)$' -> '<PROJECT_ROOT>/independent/webiny-integration-google-tag-manager/src/\1'
module.name_mapper='^webiny-integration-mailchimp/?\(.*\)$' -> '<PROJECT_ROOT>/independent/webiny-integration-mailchimp/src/\1'
module.name_mapper='^webiny-integration-typeform/?\(.*\)$' -> '<PROJECT_ROOT>/independent/webiny-integration-typeform/src/\1'

[strict]

module.name_mapper='^webiny-\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-\1/src'
module.name_mapper='^webiny-\([a-zA-Z0-9_-]+\)/\(.*\)$' -> '<PROJECT_ROOT>/packages/webiny-\1/src/\2'



Expand Down
13 changes: 8 additions & 5 deletions idea.js
Expand Up @@ -12,10 +12,13 @@ System.config({
"webiny-ui/*": "./packages/webiny-ui/src/*",
"webiny-plugins/*": "./packages/webiny-plugins/src/*",
"webiny-react-router/*": "./packages/webiny-react-router/src/*",
"webiny-integration-cookie-policy/*": "./independent/webiny-integration-cookie-policy/src/*",
"webiny-integration-google-tag-manager/*":
"./independent/webiny-integration-google-tag-manager/src/*",
"webiny-integration-mailchimp/*": "./independent/webiny-integration-mailchimp/src/*",
"webiny-integration-typeform/*": "./independent/webiny-integration-typeform/src/*"
"webiny-app-cookie-policy/*": "./packages/webiny-app-cookie-policy/src/*",
"webiny-app-google-tag-manager/*": "./packages/webiny-app-google-tag-manager/src/*",
"webiny-app-mailchimp/*": "./packages/webiny-app-mailchimp/src/*",
"webiny-app-typeform/*": "./packages/webiny-app-typeform/src/*",
"webiny-api-cookie-policy/*": "./packages/webiny-api-cookie-policy/src/*",
"webiny-api-google-tag-manager/*": "./packages/webiny-api-google-tag-manager/src/*",
"webiny-api-mailchimp/*": "./packages/webiny-api-mailchimp/src/*",
"webiny-api-typeform/*": "./packages/webiny-api-typeform/src/*"
}
});
2 changes: 0 additions & 2 deletions independent/webiny-integration-cookie-policy/.babelrc.js

This file was deleted.

2 changes: 0 additions & 2 deletions independent/webiny-integration-google-tag-manager/.babelrc.js

This file was deleted.

2 changes: 0 additions & 2 deletions independent/webiny-integration-mailchimp/.babelrc.js

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -2,8 +2,7 @@
"private": true,
"workspaces": {
"packages": [
"packages/*",
"independent/*"
"packages/*"
],
"nohoist": [
"**/inquirer/**",
Expand Down
8 changes: 4 additions & 4 deletions packages/demo-admin/package.json
Expand Up @@ -14,10 +14,10 @@
"webiny-app": "0.0.0",
"webiny-app-cms": "0.0.0",
"webiny-app-security": "0.0.0",
"webiny-integration-cookie-policy": "0.0.0",
"webiny-integration-google-tag-manager": "0.0.0",
"webiny-integration-mailchimp": "0.0.0",
"webiny-integration-typeform": "0.0.0",
"webiny-app-cookie-policy": "0.0.0",
"webiny-app-google-tag-manager": "0.0.0",
"webiny-app-mailchimp": "0.0.0",
"webiny-app-typeform": "0.0.0",
"webiny-plugins": "0.0.0",
"whatwg-fetch": "^3.0.0"
},
Expand Down
10 changes: 5 additions & 5 deletions packages/demo-admin/src/plugins/index.js
Expand Up @@ -3,13 +3,13 @@ import { fileUploadPlugin, imagePlugin } from "webiny-app/plugins";
import adminPlugins from "webiny-admin/plugins";
import securityPlugins from "webiny-app-security/admin/plugins";
import cmsPlugins from "webiny-app-cms/admin/plugins";
import cookiePolicyPlugins from "webiny-integration-cookie-policy/plugins/admin";
import googleTagManagerPlugins from "webiny-integration-google-tag-manager/plugins/admin";
import typeformPlugins from "webiny-integration-typeform/plugins/admin";
import mailchimpPlugins from "webiny-integration-mailchimp/plugins/admin";
import cookiePolicyPlugins from "webiny-app-cookie-policy/admin";
import googleTagManagerPlugins from "webiny-app-google-tag-manager/admin";
import typeformPlugins from "webiny-app-typeform/admin";
import mailchimpPlugins from "webiny-app-mailchimp/admin";

const plugins = [
fileUploadPlugin(),
fileUploadPlugin({}),
imagePlugin,
adminPlugins,
securityPlugins,
Expand Down
6 changes: 3 additions & 3 deletions packages/demo-api/package.json
Expand Up @@ -23,9 +23,9 @@
"webiny-api-security": "0.0.0",
"webiny-entity-mongodb": "0.0.0",
"webiny-install": "0.0.0",
"webiny-integration-cookie-policy": "0.0.0",
"webiny-integration-google-tag-manager": "0.0.0",
"webiny-integration-mailchimp": "0.0.0",
"webiny-api-cookie-policy": "0.0.0",
"webiny-api-google-tag-manager": "0.0.0",
"webiny-api-mailchimp": "0.0.0",
"webiny-plugins": "0.0.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/demo-api/src/plugins.js
Expand Up @@ -2,9 +2,9 @@
import apiPlugins from "webiny-api/plugins";
import securityPlugins from "webiny-api-security/plugins";
import cmsPlugins from "webiny-api-cms/plugins";
import cookiePolicyPlugins from "webiny-integration-cookie-policy/plugins/api";
import gtmPlugins from "webiny-integration-google-tag-manager/plugins/api";
import mailchimpPlugins from "webiny-integration-mailchimp/plugins/api";
import cookiePolicyPlugins from "webiny-api-cookie-policy";
import gtmPlugins from "webiny-api-google-tag-manager";
import mailchimpPlugins from "webiny-api-mailchimp";

export default [
apiPlugins,
Expand Down
8 changes: 4 additions & 4 deletions packages/demo-site/package.json
Expand Up @@ -9,10 +9,10 @@
"react-hot-loader": "^4.3.5",
"webiny-app": "0.0.0",
"webiny-app-cms": "0.0.0",
"webiny-integration-cookie-policy": "0.0.0",
"webiny-integration-google-tag-manager": "0.0.0",
"webiny-integration-mailchimp": "0.0.0",
"webiny-integration-typeform": "0.0.0",
"webiny-app-cookie-policy": "0.0.0",
"webiny-app-google-tag-manager": "0.0.0",
"webiny-app-mailchimp": "0.0.0",
"webiny-app-typeform": "0.0.0",
"webiny-plugins": "0.0.0",
"whatwg-fetch": "^3.0.0"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/demo-site/src/plugins/index.js
@@ -1,10 +1,10 @@
// @flow
import cmsPlugins from "webiny-app-cms/site/plugins";
import { fileUploadPlugin, imagePlugin } from "webiny-app/plugins";
import cookiePolicyPlugins from "webiny-integration-cookie-policy/plugins/render";
import typeformPlugins from "webiny-integration-typeform/plugins/render";
import mailchimpPlugins from "webiny-integration-mailchimp/plugins/render";
import gtmPlugins from "webiny-integration-google-tag-manager/plugins/render";
import cookiePolicyPlugins from "webiny-app-cookie-policy/render";
import typeformPlugins from "webiny-app-typeform/render";
import mailchimpPlugins from "webiny-app-mailchimp/render";
import gtmPlugins from "webiny-app-google-tag-manager/render";

const plugins = [
fileUploadPlugin(),
Expand Down
3 changes: 3 additions & 0 deletions packages/webiny-admin/.releaserc.js
@@ -0,0 +1,3 @@
module.exports = {
type: "fixed"
};
3 changes: 3 additions & 0 deletions packages/webiny-api-cms/.releaserc.js
@@ -0,0 +1,3 @@
module.exports = {
type: "fixed"
};
@@ -1,18 +1,18 @@
module.exports = {
presets: [
{
"presets": [
[
"@babel/preset-env",
{
targets: {
node: "8.10"
"targets": {
"node": "8.10"
}
}
],
"@babel/preset-flow"
],
plugins: [
"plugins": [
["@babel/plugin-proposal-class-properties"],
["@babel/plugin-proposal-object-rest-spread", { useBuiltIns: true }],
["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }],
["@babel/plugin-transform-runtime"]
]
};
}
3 changes: 3 additions & 0 deletions packages/webiny-api-cookie-policy/.releaserc.js
@@ -0,0 +1,3 @@
module.exports = {
type: "independent"
};
Expand Up @@ -10,7 +10,7 @@ To setup, you must register a set of plugins. For more information on plugins, p

#### API
```
import cookiePolicyPlugins from "webiny-integration-cookie-policy/plugins/api"
import cookiePolicyPlugins from "webiny-api-cookie-policy"
import { registerPlugins } from "webiny-plugins";
registerPlugins(cookiePolicyPlugins);
Expand All @@ -21,7 +21,7 @@ Exposes necessary GraphQL fields for updating integration settings.

#### Admin
```
import cookiePolicyPlugins from "webiny-integration-cookie-policy/plugins/admin"
import cookiePolicyPlugins from "webiny-app-cookie-policy/admin"
import { registerPlugins } from "webiny-plugins";
registerPlugins(cookiePolicyPlugins);
Expand All @@ -33,7 +33,7 @@ can edit things like banner position, colors and labels.

#### Site
```
import cookiePolicyPlugins from "webiny-integration-cookie-policy/plugins/render"
import cookiePolicyPlugins from "webiny-app-cookie-policy/render"
import { registerPlugins } from "webiny-plugins";
registerPlugins(cookiePolicyPlugins);
Expand Down
2 changes: 2 additions & 0 deletions packages/webiny-api-cookie-policy/index.js
@@ -0,0 +1,2 @@
import src from "./src";
export default src;
35 changes: 35 additions & 0 deletions packages/webiny-api-cookie-policy/package.json
@@ -0,0 +1,35 @@
{
"name": "webiny-api-cookie-policy",
"version": "0.0.0",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/webiny/webiny-js.git"
},
"author": "Adrian Smijulj",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.0.0",
"webiny-api": "0.0.0",
"webiny-api-security": "0.0.0",
"webiny-model": "0.0.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@svgr/webpack": "^2.1.1",
"babel-plugin-module-resolver": "^3.1.1",
"babel-plugin-named-asset-import": "^1.0.0-next.3e165448"
},
"scripts": {
"build": "babel src -d ${DEST:-build} --source-maps --copy-files",
"flow-copy-source": "flow-copy-source src ${DEST:-build}",
"postbuild": "yarn flow-copy-source"
}
}
@@ -1,18 +1,18 @@
module.exports = {
presets: [
{
"presets": [
[
"@babel/preset-env",
{
targets: {
node: "8.10"
"targets": {
"node": "8.10"
}
}
],
"@babel/preset-flow"
],
plugins: [
"plugins": [
["@babel/plugin-proposal-class-properties"],
["@babel/plugin-proposal-object-rest-spread", { useBuiltIns: true }],
["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }],
["@babel/plugin-transform-runtime"]
]
};
}
3 changes: 3 additions & 0 deletions packages/webiny-api-google-tag-manager/.releaserc.js
@@ -0,0 +1,3 @@
module.exports = {
type: "independent"
};
Expand Up @@ -10,7 +10,7 @@ To setup, you must register a set of plugins. For more information on plugins, p

#### API
```
import gtmPlugins from "webiny-integration-google-tag-manager/plugins/api"
import gtmPlugins from "webiny-api-google-tag-manager"
import { registerPlugins } from "webiny-plugins";
registerPlugins(gtmPlugins);
Expand All @@ -21,7 +21,7 @@ Exposes necessary GraphQL fields for updating integration settings.

#### Admin
```
import gtmPlugins from "webiny-integration-google-tag-manager/plugins/admin"
import gtmPlugins from "webiny-app-google-tag-manager/admin"
import { registerPlugins } from "webiny-plugins";
registerPlugins(gtmPlugins);
Expand All @@ -33,7 +33,7 @@ your GTM "Container ID" here (this is required in order for the integration to w

#### Site
```
import gtmPlugins from "webiny-integration-google-tag-manager/plugins/render"
import gtmPlugins from "webiny-app-google-tag-manager/render"
import { registerPlugins } from "webiny-plugins";
registerPlugins(gtmPlugins);
Expand Down
2 changes: 2 additions & 0 deletions packages/webiny-api-google-tag-manager/index.js
@@ -0,0 +1,2 @@
import src from "./src";
export default src;
35 changes: 35 additions & 0 deletions packages/webiny-api-google-tag-manager/package.json
@@ -0,0 +1,35 @@
{
"name": "webiny-api-google-tag-manager",
"version": "0.0.0",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/webiny/webiny-js.git"
},
"author": "Adrian Smijulj",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.0.0",
"webiny-api": "0.0.0",
"webiny-api-security": "0.0.0",
"webiny-model": "0.0.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@svgr/webpack": "^2.1.1",
"babel-plugin-module-resolver": "^3.1.1",
"babel-plugin-named-asset-import": "^1.0.0-next.3e165448"
},
"scripts": {
"build": "babel src -d ${DEST:-build} --source-maps --copy-files",
"flow-copy-source": "flow-copy-source src ${DEST:-build}",
"postbuild": "yarn flow-copy-source"
}
}

0 comments on commit d2d6dfc

Please sign in to comment.