Skip to content

Commit

Permalink
Merge pull request #22 from dhershman1/development
Browse files Browse the repository at this point in the history
v0.8.2
  • Loading branch information
dhershman1 authored Sep 19, 2018
2 parents bb829e9 + 13add7e commit d94cb6a
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 47 deletions.
6 changes: 4 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
.travis.yml
rollup.config.js
rollup.split.js
webpack.config.js
.eslintrc.js
.eslintignore
.gitignore
scripts
.nyc_output
tests/
tests/
coverage
.nyc_output
.babelrc
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## v0.8.2

### Fixed

- No longer packaging unwanted items like coverage results

### Improved

- Slightly the build process of the module (pre-publish/release anyway)

## v0.8.1

### New
Expand Down
2 changes: 1 addition & 1 deletion info.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kyanite",
"version": "0.8.1",
"version": "0.8.2",
"description": "A small library of pure functional utilities to make life easier and data better",
"main": "dist/kyanite.min.js",
"directories": {
Expand Down
60 changes: 18 additions & 42 deletions rollup.split.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,33 @@ import path from 'path'
import { uglify } from 'rollup-plugin-uglify'

const buildEntry = () => {
const results = []
const plugins = [babel(), uglify()]
const typesPaths = ['array', 'function', 'number', 'object', 'string']
.map(p => `./src/${p}/index.js`)
const paths = globby.sync(['src/**/*.js', '!src/**/index.js', '!src/_internals'])

paths.forEach(p => {
const { name } = path.parse(p)
return [...paths, ...typesPaths].map(p => {
const { name, dir } = path.parse(p)

const config = {
const convert = {
array: 'KA',
function: 'KF',
number: 'KN',
object: 'KO',
string: 'KS'
}

return {
input: path.resolve(__dirname, p),
plugins: [
babel(),
uglify()
],
plugins: name === 'index' ? [...plugins, filesize()] : plugins,
output: {
dir: './',
file: `${name}.js`,
file: name === 'index' ? `${dir}.js` : `${name}.js`,
format: 'umd',
name: name
name: convert[name] || name
}
}

results.push(config)

return true
})

return results
}

const buildTypes = () => {
const typeList = ['array', 'function', 'number', 'object', 'string']
const names = {
array: 'KA',
function: 'KF',
number: 'KN',
object: 'KO',
string: 'KS'
}

return typeList.map(t => ({
input: `./src/${t}/index.js`,
plugins: [
babel(),
uglify(),
filesize()
],
output: {
file: `./${t}.js`,
format: 'umd',
name: names[t]
}
}))
}

export default [...buildEntry(), ...buildTypes()]
export default buildEntry()

0 comments on commit d94cb6a

Please sign in to comment.