Skip to content

Commit

Permalink
Create a build for the Controller (keystonejs#982)
Browse files Browse the repository at this point in the history
* Create build for controller

* Add changeset

* Rename packages/fields/Controller-src.js to packages/fields/Controller/src/index.js

* Correctly reference Controller source path

* Simplify things
  • Loading branch information
emmatown authored Apr 2, 2019
1 parent adf3475 commit 37dcee3
Show file tree
Hide file tree
Showing 16 changed files with 107 additions and 12 deletions.
89 changes: 89 additions & 0 deletions .changeset/6139957b/changes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"releases": [{ "name": "@keystone-alpha/fields", "type": "major" }],
"dependents": [
{
"name": "@keystone-alpha/admin-ui",
"type": "patch",
"dependencies": ["@keystone-alpha/fields"]
},
{
"name": "@keystone-alpha/fields-wysiwyg-tinymce",
"type": "patch",
"dependencies": ["@keystone-alpha/fields"]
},
{
"name": "@keystone-alpha/keystone",
"type": "patch",
"dependencies": ["@keystone-alpha/fields"]
},
{
"name": "@keystone-alpha/demo-project-blog",
"type": "patch",
"dependencies": [
"@keystone-alpha/admin-ui",
"@keystone-alpha/fields-wysiwyg-tinymce",
"@keystone-alpha/keystone",
"@keystone-alpha/fields"
]
},
{
"name": "@keystone-alpha/demo-project-todo",
"type": "patch",
"dependencies": [
"@keystone-alpha/admin-ui",
"@keystone-alpha/keystone",
"@keystone-alpha/fields"
]
},
{
"name": "@keystone-alpha/cypress-project-access-control",
"type": "patch",
"dependencies": [
"@keystone-alpha/admin-ui",
"@keystone-alpha/keystone",
"@keystone-alpha/fields"
]
},
{
"name": "@keystone-alpha/cypress-project-basic",
"type": "patch",
"dependencies": [
"@keystone-alpha/admin-ui",
"@keystone-alpha/keystone",
"@keystone-alpha/fields"
]
},
{
"name": "@keystone-alpha/cypress-project-facebook-login",
"type": "patch",
"dependencies": [
"@keystone-alpha/admin-ui",
"@keystone-alpha/keystone",
"@keystone-alpha/fields"
]
},
{
"name": "@keystone-alpha/cypress-project-login",
"type": "patch",
"dependencies": [
"@keystone-alpha/admin-ui",
"@keystone-alpha/keystone",
"@keystone-alpha/fields"
]
},
{
"name": "@keystone-alpha/cypress-project-twitter-login",
"type": "patch",
"dependencies": [
"@keystone-alpha/admin-ui",
"@keystone-alpha/keystone",
"@keystone-alpha/fields"
]
},
{
"name": "@keystone-alpha/api-tests",
"type": "patch",
"dependencies": ["@keystone-alpha/keystone", "@keystone-alpha/fields"]
}
]
}
1 change: 1 addition & 0 deletions .changeset/6139957b/changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Generate cjs and esm bundlers for Controller file
4 changes: 4 additions & 0 deletions packages/fields/Controller/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"main": "dist/fields.cjs.js",
"module": "dist/fields.esm.js"
}
File renamed without changes.
3 changes: 2 additions & 1 deletion packages/fields/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"types/*/views/Field",
"types/*/views/Filter",
"types/*/views/Controller",
"types/Content/views/blocks/*"
"types/Content/views/blocks/*",
"Controller"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */

import FieldController from '../../../../Controller';
import FieldController from '../../../../Controller/src';

export default class CalendarDayController extends FieldController {
getFilterGraphQL = ({ type, value }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */

import FieldController from '../../../../Controller';
import FieldController from '../../../../Controller/src';

export default class CheckboxController extends FieldController {
getValue = data => data[this.config.path] || false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */

import FieldController from '../../../../Controller';
import FieldController from '../../../../Controller/src';

export default class DateTimeController extends FieldController {
getFilterGraphQL = ({ type, value }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */

import FieldController from '../../../../Controller';
import FieldController from '../../../../Controller/src';

export default class TextController extends FieldController {
getFilterGraphQL = ({ type, value }) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/fields/types/File/views/Controller/Controller.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable import/no-extraneous-dependencies */
import FieldController from '../../../../Controller';
import FieldController from '../../../../Controller/src';

export default class FileController extends FieldController {
getValue = data => {
Expand Down
2 changes: 1 addition & 1 deletion packages/fields/types/Float/views/Controller/Controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */

import FieldController from '../../../../Controller';
import FieldController from '../../../../Controller/src';

export default class TextController extends FieldController {
getFilterGraphQL = ({ type, value }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */

import FieldController from '../../../../Controller';
import FieldController from '../../../../Controller/src';

export default class TextController extends FieldController {
getFilterGraphQL = ({ type, value }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable import/no-extraneous-dependencies */
import FieldController from '../../../../Controller';
import FieldController from '../../../../Controller/src';

export default class PasswordController extends FieldController {
getFilterGraphQL = ({ type, value }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */

import FieldController from '../../../../Controller';
import FieldController from '../../../../Controller/src';

export default class RelationshipController extends FieldController {
getRefList() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */

import FieldController from '../../../../Controller';
import FieldController from '../../../../Controller/src';

export default class SelectController extends FieldController {
constructor(...args) {
Expand Down
2 changes: 1 addition & 1 deletion packages/fields/types/Text/views/Controller/Controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */

import FieldController from '../../../../Controller';
import FieldController from '../../../../Controller/src';

export default class TextController extends FieldController {
getFilterGraphQL = ({ type, value }) => {
Expand Down

0 comments on commit 37dcee3

Please sign in to comment.