Skip to content

Commit f3e84ee

Browse files
authored
feat: rename to smooth (#4)
BREAKING CHANGE: replace smooth-core by smooth
1 parent 043da52 commit f3e84ee

File tree

16 files changed

+36
-36
lines changed

16 files changed

+36
-36
lines changed

packages/smooth-backend-wordpress/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"prepublishOnly": "yarn run build"
2222
},
2323
"peerDependencies": {
24-
"smooth-core": "^0.1.0"
24+
"smooth": "^0.1.0"
2525
},
2626
"dependencies": {
2727
"axios": "^0.18.0",

packages/smooth-backend-wordpress/src/acf/config/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { gql, createSchemaDefinitionMock, types } from 'smooth-core/graphql'
1+
import { gql, createSchemaDefinitionMock, types } from 'smooth/graphql'
22
import { generateConfig } from '.'
33
import * as acfTypes from '../types'
44

packages/smooth-backend-wordpress/src/acf/config/oneField.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { singularize, humanize } from 'smooth-core/utils'
1+
import { singularize, humanize } from 'smooth/utils'
22
import allFields from './allFields'
33

44
function enumValuesToChoices(nodes, helpers) {

packages/smooth-backend-wordpress/src/acf/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import path from 'path'
2-
import { mergeResolvers } from 'smooth-core/graphql'
2+
import { mergeResolvers } from 'smooth/graphql'
33
import { createResolvers } from './resolvers'
44
import { generateConfig } from './config'
55
import * as types from './types'

packages/smooth-backend-wordpress/src/acf/resolvers/createDefaultResolvers.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { gql, createSchemaDefinitionMock, types } from 'smooth-core/graphql'
1+
import { gql, createSchemaDefinitionMock, types } from 'smooth/graphql'
22
import createDefaultResolvers from './createDefaultResolvers'
33

44
describe('createDefaultResolvers', () => {

packages/smooth-backend-wordpress/src/acf/resolvers/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { gql, createSchemaDefinitionMock, types } from 'smooth-core/graphql'
1+
import { gql, createSchemaDefinitionMock, types } from 'smooth/graphql'
22
import { createResolvers } from '.'
33

44
describe('createResolvers', () => {

packages/smooth-backend-wordpress/src/cpt/config/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { gql, createSchemaDefinitionMock, types } from 'smooth-core/graphql'
1+
import { gql, createSchemaDefinitionMock, types } from 'smooth/graphql'
22
import { generateConfig } from '.'
33
import * as cptTypes from '../types'
44

packages/smooth-backend-wordpress/src/cpt/config/one.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { humanize, pluralize } from 'smooth-core/utils'
1+
import { humanize, pluralize } from 'smooth/utils'
22

33
export default function one(node, { gql: g, cpt: c }) {
44
if (!g.isObjectTypeDefinition(node)) return null

packages/smooth-backend-wordpress/src/cpt/index.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { applyAsyncHook } from 'smooth-core/plugin'
2-
import { gql, createSchemaDefinitionMock } from 'smooth-core/graphql'
1+
import { applyAsyncHook } from 'smooth/plugin'
2+
import { gql, createSchemaDefinitionMock } from 'smooth/graphql'
33
import { getPluginDir, writeFile } from '../util'
44
import { onBuild } from '.'
55

packages/smooth-core/README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</h1>
44
<p align="center" style="font-size: 1.2rem;">Code driven CMS powered by GraphQL & React.</p>
55

6-
[![NPM version](https://img.shields.io/npm/v/smooth-core.svg)](https://www.npmjs.com/package/smooth-core)
6+
[![NPM version](https://img.shields.io/npm/v/smooth.svg)](https://www.npmjs.com/package/smooth)
77
[![CircleCI](https://circleci.com/gh/smooth-code/smooth.js.svg?style=svg)](https://circleci.com/gh/smooth-code/smooth.js)
88
[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/smooth)
99

@@ -44,7 +44,7 @@
4444
Install it:
4545

4646
```bash
47-
npm install --save smooth-core react react-dom
47+
npm install --save smooth react react-dom
4848
```
4949

5050
and add a script to your package.json like this:
@@ -89,7 +89,7 @@ The `Link` component take care of the language for you, you can safely use it to
8989
```js
9090
import React from 'react'
9191
import gql from 'graphql-tag'
92-
import { Link } from 'smooth-core/router'
92+
import { Link } from 'smooth/router'
9393

9494
export const contentFragment = gql`
9595
fragment PageProps on Page {
@@ -215,7 +215,7 @@ _Note: Don't name the `static` directory anything else. The name is required and
215215
We expose a built-in component for appending elements to the `<head>` of the page.
216216

217217
```jsx
218-
import Head from 'smooth-core/head'
218+
import Head from 'smooth/head'
219219

220220
export default () => (
221221
<div>
@@ -247,7 +247,7 @@ Client-side transitions between routes can be enabled via a `<Link>` component.
247247

248248
```jsx
249249
// pages/index$.js
250-
import { Link } from 'smooth-core/router'
250+
import { Link } from 'smooth/router'
251251

252252
export default () => (
253253
<div>
@@ -261,7 +261,7 @@ export default () => (
261261
export default () => <p>Welcome to About!</p>
262262
```
263263

264-
**Note: "smooth-core/router" exposes all methods from ["react-router-dom"](https://reacttraining.com/react-router/web/guides/quick-start).**
264+
**Note: "smooth/router" exposes all methods from ["react-router-dom"](https://reacttraining.com/react-router/web/guides/quick-start).**
265265

266266
### Dynamic Import
267267

@@ -285,7 +285,7 @@ Here are a few ways to use dynamic imports.
285285
#### 1. Basic Usage (Also does SSR)
286286

287287
```jsx
288-
import loadable from 'smooth-core/loadable'
288+
import loadable from 'smooth/loadable'
289289

290290
const DynamicComponent = loadable(() => import('../components/hello'))
291291

@@ -301,7 +301,7 @@ export default () => (
301301
#### 2. With Custom Loading Component
302302

303303
```jsx
304-
import loadable from 'smooth-core/loadable'
304+
import loadable from 'smooth/loadable'
305305

306306
const DynamicComponentWithCustomLoading = loadable(
307307
() => import('../components/hello2'),
@@ -317,7 +317,7 @@ export default () => (
317317
)
318318
```
319319

320-
**Note: "smooth-core/loadable" exposes all methods from ["@loadable/component"](https://www.smooth-code.com/open-source/loadable-components/).**
320+
**Note: "smooth/loadable" exposes all methods from ["@loadable/component"](https://www.smooth-code.com/open-source/loadable-components/).**
321321

322322
### Custom `<App>`
323323

@@ -369,7 +369,7 @@ Pages in `Smooth.js` skip the definition of the surrounding document's markup. F
369369
// Event handlers like onClick can't be added to this file
370370

371371
// ./src/_document.js
372-
import Document, { Head, Main, MainScript } from 'smooth-core/document'
372+
import Document, { Head, Main, MainScript } from 'smooth/document'
373373

374374
export default () => (
375375
<html>
@@ -396,7 +396,7 @@ that need to wrap the application to properly work with server-rendering. 🚧
396396
- It takes as argument an options object for further customization
397397

398398
```js
399-
import Document from 'smooth-core/document'
399+
import Document from 'smooth/document'
400400

401401
Document.getInitialProps = ctx => {
402402
const sheet = new ServerStyleSheet()
@@ -518,33 +518,33 @@ module.exports = {
518518

519519
In order to extend our usage of `babel`, you can simply define a `.babelrc` file at the root of your app. This file is optional.
520520

521-
If found, we're going to consider it the _source of truth_, therefore it needs to define what smooth needs as well, which is the `smooth-core/babel` preset.
521+
If found, we're going to consider it the _source of truth_, therefore it needs to define what smooth needs as well, which is the `smooth/babel` preset.
522522

523523
This is designed so that you are not surprised by modifications we could make to the babel configurations.
524524

525525
Here's an example `.babelrc` file:
526526

527527
```json
528528
{
529-
"presets": ["smooth-core/babel"],
529+
"presets": ["smooth/babel"],
530530
"plugins": []
531531
}
532532
```
533533

534-
The `smooth-core/babel` preset includes everything needed to transpile React applications. This includes:
534+
The `smooth/babel` preset includes everything needed to transpile React applications. This includes:
535535

536536
- preset-env
537537
- preset-react
538538
- plugin-proposal-class-properties
539539
- @loadable/babel-plugin
540540

541-
These presets / plugins **should not** be added to your custom `.babelrc`. Instead, you can configure them on the `smooth-core/babel` preset:
541+
These presets / plugins **should not** be added to your custom `.babelrc`. Instead, you can configure them on the `smooth/babel` preset:
542542

543543
```json
544544
{
545545
"presets": [
546546
[
547-
"smooth-core/babel",
547+
"smooth/babel",
548548
{
549549
"preset-env": {},
550550
"transform-runtime": {}
@@ -572,7 +572,7 @@ For example, to deploy with [`now`](https://zeit.co/now) a `package.json` like f
572572
{
573573
"name": "my-app",
574574
"dependencies": {
575-
"smooth-core": "latest"
575+
"smooth": "latest"
576576
},
577577
"scripts": {
578578
"dev": "smooth dev",

0 commit comments

Comments
 (0)