Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Rowno committed Apr 6, 2018
0 parents commit 0f04eaf
Show file tree
Hide file tree
Showing 12 changed files with 9,398 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"sourceMaps": "inline",
"env": {
// Workaround Babel 6's weird config inheritance by not having any root
// config (`{"modules":false}` gets overridden). This can be improved with
// Babel 7's `.babelrc.js` support.
"development": {
"presets": ["env", "react", "stage-0"]
},
"test": {
"presets": ["env", "react", "stage-0"]
},
"production": {
"presets": ["env", "react", "stage-0"]
},
"commonjs": {
"presets": ["env", "react", "stage-0"]
},
"esm": {
"presets": [["env", { "modules": false }], "react", "stage-0"]
}
}
}
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
; editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules/
/commonjs/
/esm/
7 changes: 7 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { configure } from '@storybook/react'

function loadStories() {
require('../tools/story')
}

configure(loadStories, module)
15 changes: 15 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ISC License

Copyright © 2018, Segment.io, Inc

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# consent-manager

Project description.


License
-------
consent-manager is released under the ISC license.

Copyright © 2018, Segment.io, Inc.
82 changes: 82 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"name": "consent-manager",
"version": "0.0.0",
"description": "Project description.",
"keywords": [],
"repository": "segmentio/consent-manager",
"license": "ISC",
"private": true,
"main": "commonjs/index.js",
"module": "esm/index.js",
"sideEffects": false,
"files": [
"commonjs",
"esm"
],
"scripts": {
"test": "xo",
"prepublishOnly": "yarn run build",
"precommit": "lint-staged",
"dev": "start-storybook -p 9009",
"build-commonjs": "BABEL_ENV=commonjs babel src --out-dir commonjs",
"build-esm": "BABEL_ENV=esm babel src --out-dir esm",
"build": "yarn run build-commonjs && yarn run build-esm"
},
"engines": {
"node": ">=8"
},
"dependencies": {
"prop-types": "^15.6.1"
},
"devDependencies": {
"@storybook/react": "^3.4.0",
"ava": "^0.25.0",
"babel-cli": "^6.26.0",
"babel-eslint": "^8.2.2",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"babel-register": "^6.26.0",
"eslint-config-xo-react": "^0.16.0",
"eslint-plugin-react": "^7.7.0",
"husky": "^0.14.3",
"lint-staged": "^7.0.4",
"react": "^16.3.1",
"react-dom": "^16.3.1",
"size-limit": "^0.17.0",
"xo": "^0.20.3"
},
"peerDependencies": {
"react": "^16.0.0",
"react-dom": "^16.0.0"
},
"xo": {
"parser": "babel-eslint",
"extends": "xo-react",
"envs": [
"node",
"browser"
],
"prettier": true,
"space": true,
"semicolon": false
},
"lint-staged": {
"*.js": [
"xo --fix",
"git add"
]
},
"ava": {
"require": [
"babel-register"
],
"babel": "inherit"
},
"size-limit": [
{
"path": "esm/index.js",
"limit": "10 KB"
}
]
}
7 changes: 7 additions & 0 deletions src/consent-manager-builder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React, {Component} from 'react'

export default class ConsentManagerBuilder extends Component {
render() {
return <div>hi</div>
}
}
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export ConsentManagerBuilder from './consent-manager-builder'
7 changes: 7 additions & 0 deletions tools/story.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react'
import {storiesOf} from '@storybook/react'
import {ConsentManagerBuilder} from '../src'

storiesOf('ConsentManagerBuilder', module).add(`basic`, () => (
<ConsentManagerBuilder>{() => {}}</ConsentManagerBuilder>
))
Loading

0 comments on commit 0f04eaf

Please sign in to comment.