Skip to content

Commit

Permalink
CJL-50 Build library as UMD, CJS and ESM
Browse files Browse the repository at this point in the history
CJL-50 Build files and source maps properly

CJL-50 Add .npmignore and ignore all source files

CJL-50 Update changelog and readme

CJL-50 Updated usage instructions

CJL-50 remove browser value from package.json

CJL-50 Rename UMD bundle to prevent conflicts with index

CJL-50 Build modules properly \o/

CJL-50 Package with flat file structure

CJL-50 remove unnecessary try/catch blocks

CJL-50 Validate presence of TAG env var before publishing

CJL-50 catch spawn STDERR

CJL-50 capture stdout

0.11.10

CJL-50 Include cx in named dependencies

CJL-50 Move rollup babel plugins to build file

CJL-50 Replace jsx extension with js in transpiled files

CJL-50 Give different module and file names to output files

CJL-50 move classnames from devdeps to deps

CJL-50 move proptypes from devdeps to deps

CJL-50 Add peerDependencies and dependencies to dist/package.json

0.11.16
  • Loading branch information
Eder Sanchez committed Mar 13, 2018
1 parent 662554c commit 2b2f160
Show file tree
Hide file tree
Showing 10 changed files with 1,474 additions and 203 deletions.
11 changes: 6 additions & 5 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"presets": [
"env",
[
"env",
{
"modules": false
}
],
"stage-0",
"react"
],
"plugins": [
"transform-runtime",
"transform-react-remove-prop-types"
]
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ $RECYCLE.BIN/
build/
node_modules/
dist/
dist-es6/
dist-es/
gumgum-common-js-*.tgz
40 changes: 40 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## IDEs ###
*.sublime-workspace
.tag*
.tern-project

### OSX ###
.DS_Store
.AppleDouble
.LSOverride
Icon

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# App specific
.out/
build/
node_modules/
components/
constants/
tools/
Jenkinsfile
_ops
_stories/
yarn.lock
4 changes: 4 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.10.2
ignore: {}
patch: {}
117 changes: 69 additions & 48 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,140 +1,161 @@
# GumGum Common JS Changelog

## 0.11.0 (3-5-18)

###### Added

* [CJL-50]
Add individual ES and CommonJS modules to dist directory
Keeps index.js with whole library for retrocompatibility
Create UMD build for loading library into browsers
Update installation instructions

## 0.10.0 (2-23-18)

###### Added

- [CJL-48] - Utility class documentation and examples
- [CJL-43] - Add Prettier to the project
* [CJL-48] - Utility class documentation and examples
* [CJL-43] - Add Prettier to the project

###### Fixed

- Close Button on ModalHeader
* Close Button on ModalHeader

## 0.9.3 (1-11-18)

###### Fixed

- Fix styles on MultiSelect
* Fix styles on MultiSelect

## 0.9.2 (1-4-18)

###### Fixed

- Fix full width layout on layout container (again)
- Remove console.log on AccordionItem
* Fix full width layout on layout container (again)
* Remove console.log on AccordionItem

## 0.9.0 (1-3-18)

###### Added

- [CJL-42] - Add textarea component
* [CJL-42] - Add textarea component

###### Changed

- Add ...otherProps to Button
* Add ...otherProps to Button

###### Fixed

- Fix full width layout on layout container
* Fix full width layout on layout container

## 0.8.2 (12-18-17)

###### Changed

- Update README for adding library to project via internal npm hosted files
* Update README for adding library to project via internal npm hosted files

## 0.8.1 (12-15-17)

###### Fixed

- Add prop for react-modal's latest version that was throwing a warning
* Add prop for react-modal's latest version that was throwing a warning

## 0.8.0 (12-15-17)

###### Changed

- [CJL-36] - Update libraries
- Add size and additional context options to Select
- Improve Avatar menu to accept a callback for clicking on an option instead of using React Router
* [CJL-36] - Update libraries
* Add size and additional context options to Select
* Improve Avatar menu to accept a callback for clicking on an option instead of using React Router

## 0.7.6 (12-15-17)

###### Added

- Add searching on keys, multiple terms, and custom filter functions to SearchMultiSelect
* Add searching on keys, multiple terms, and custom filter functions to SearchMultiSelect

## 0.7.5 (12-6-17)

###### Added

- Add onChange to SearchMultiSelect
* Add onChange to SearchMultiSelect

## 0.7.1-0.7.4 (12-1-17)

###### Fixed

- Various import fixes
* Various import fixes

## 0.7.0 (11-29-17)
###### Added

- [CJL-35] - CHANGELOG.md and CONTRIBUTING.md
- [CJL-23] - Circular Thumbnail
- [CJL-1] - Tooltip
- [CJL-32] - Accordion
###### Added

* [CJL-35] - CHANGELOG.md and CONTRIBUTING.md
* [CJL-23] - Circular Thumbnail
* [CJL-1] - Tooltip
* [CJL-32] - Accordion

## 0.6.2 (11-10-17)
###### Changed

- [CJL-30] - Add small option to SearchMultiselect
###### Changed

* [CJL-30] - Add small option to SearchMultiselect

## 0.6.1 (10-25-17)
###### Fixed

- [CJL-21] - Update SearchMultiselect to accomodate options passed in after component is mounted
###### Fixed

* [CJL-21] - Update SearchMultiselect to accomodate options passed in after component is mounted

## 0.6.0 (8-22-17)

###### Added

- [CJL-29] - Login
* [CJL-29] - Login

###### Changed

- [CJL-10] - Prop-types npm package
- [CJL-13] - Migrate Storybook to version 3.x.x
- [CJL-24] - Readme addon

* [CJL-10] - Prop-types npm package
* [CJL-13] - Migrate Storybook to version 3.x.x
* [CJL-24] - Readme addon

## 0.5.0 (7-7-17)
###### Added

- [CJL-20] - Pagination
###### Added

* [CJL-20] - Pagination

## 0.4.0 (6-25-17)
###### Added

- [CJL-3] - SearchMultiSelect
###### Added

* [CJL-3] - SearchMultiSelect

## 0.3.0 (6-22-17)
###### Added

- [CJL-6] - Single Select
- [CJL-8] - Checkbox
###### Added

* [CJL-6] - Single Select
* [CJL-8] - Checkbox

## 0.2.0 (6-13-17)

###### Added

- [CJL-7] - Circular Number
- [CJL-5] - Jenkins
- [CJL-12] - Input Group
- [CJL-16] - Trend
* [CJL-7] - Circular Number
* [CJL-5] - Jenkins
* [CJL-12] - Input Group
* [CJL-16] - Trend

###### Fixed

- [CJL-9] - Tag errors

* [CJL-9] - Tag errors

## 0.1.0 (6-15-17)

###### Added

- [CJL-11] - Button Group
- [CJL-18] - Layout
- [CJL-15] - Import/Export
- [CJL-17] - Modal
* [CJL-11] - Button Group
* [CJL-18] - Layout
* [CJL-15] - Import/Export
* [CJL-17] - Modal
40 changes: 30 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,62 @@
This project contains reusable JavaScript React components that you can import into your project.

### Library Documentation
The docs are hosted at [storybook.gumgum.com](https://storybook.gumgum.com).

The docs are hosted at [storybook.gumgum.com](https://storybook.gumgum.com).

### Installing and Using the Library in your project

###### Add private npm registry

To have npm check GumGum's private registry by default, run this on the root directory of your project:

```
npm set registry https://npm.va.ggops.com
```

###### Add library

To add a specific version, you can use
`yarn add https://npm.va.ggops.com/gumgum-common-js/-/gumgum-common-js-0.8.0.tgz` (replace 0.8.0 with whatever version you want)
`yarn add gumgum-common-js@0.11.0` (replace 0.11.0 with whatever version you want, at least 0.11.0 to use this format)

The current and previous versions can be found in [CHANGELOG.md](CHANGELOG.md)

You may need to update your webpack config to use a loader on node_modules/gumgum-common-js .jsx files so they get parsed correctly.

###### Use library

In your project's .jsx files, include the name of the component you want to use and its path. Example:

```
import { Button, Badge, Toggle } from 'gumgum-common-js';
// Recommended way: load each module individually:
import Button from 'gumgum-common-js/Button';
import Badge from 'gumgum-common-js/Badge';
import Toggle from 'gumgum-common-js/Toggle';
// Not recommended: Load the whole library, compatibility for older versions
import { Button, Badge, Toggle } from 'gumgum-common-js';
```
Follow the [docs](https://storybook.gumgum.com) to use your component with the correct props.

Follow the [docs](https://storybook.gumgum.com) to use your component with the correct props.

### Prerequisites for running storybook locally
- [Minimum Required Versions](https://gumgum.jira.com/wiki/pages/viewpage.action?pageId=154304684)
- Git and Git Flow [Install and Work Flow Instructions](https://gumgum.jira.com/wiki/pages/viewpage.action?pageId=138248293)
- [NodeJS/NPM](http://nodejs.org/download/)
- [Yarn](https://yarnpkg.com/)
- Install the ESLint validators and [Prettier](https://prettier.io/docs/en/editors.html) on your editor of choice. We have the configuration files on the root of the project, `.eslinrc` and `.prettierrc`. There is a precommit hook to run the Prettier scripts on the files.

* [Minimum Required Versions](https://gumgum.jira.com/wiki/pages/viewpage.action?pageId=154304684)
* Git and Git Flow [Install and Work Flow Instructions](https://gumgum.jira.com/wiki/pages/viewpage.action?pageId=138248293)
* [NodeJS/NPM](http://nodejs.org/download/)
* [Yarn](https://yarnpkg.com/)
* Install the ESLint validators and [Prettier](https://prettier.io/docs/en/editors.html) on your editor of choice. We have the configuration files on the root of the project, `.eslinrc` and `.prettierrc`. There is a precommit hook to run the Prettier scripts on the files.

### Running storybook locally

```
yarn
npm run storybook
```

Then open `http://localhost:6006` on your browser. For more information visit [React Storybook](https://github.com/kadirahq/react-storybook) repo.


### Contributing to this project

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for information about contributing to this project.
Loading

0 comments on commit 2b2f160

Please sign in to comment.