Skip to content

Commit

Permalink
Merge pull request #2 from damassi/add-semantic-release
Browse files Browse the repository at this point in the history
[Lib] Add semantic-release and circle config
  • Loading branch information
damassi authored Jun 4, 2018
2 parents 6a6d6fa + dde1f19 commit c23d401
Show file tree
Hide file tree
Showing 7 changed files with 4,767 additions and 235 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @artsy/palette

A repo of shared styles.

(WIP)
31 changes: 31 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
machine:
node:
version: 8.4.0

general:
branches:
ignore:
- gh-pages

checkout:
post:
- nvm install && nvm alias default $(cat .nvmrc)
- npm install yarn@1.3.2
- ./node_modules/.bin/yarn

dependencies:
pre:
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
override:
- yarn

test:
override:
- yarn type-check
- yarn test

deployment:
release:
branch: master
commands:
- yarn semantic-release
53 changes: 46 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
{
"name": "@artsy/palette",
"version": "0.1.0",
"version": "0.1.1",
"description": "Design system library for react components",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"clean": "rm -rf dist",
"compile": "tsc --declaration",
"precommit": "lint-staged",
"prepublishOnly": "yarn clean && yarn compile",
"prettier": "prettier",
"prettier-project": "yarn run prettier-write 'src/**/*.{ts,tsx}'",
"prettier-write": "yarn run prettier --write"
"prettier-project": "yarn prettier-write 'src/**/*.{ts,tsx}'",
"prettier-write": "yarn prettier --write",
"semantic-release": "semantic-release",
"test": "yarn type-check",
"type-check": "tsc --noEmit --pretty"
},
"repository": {
"type": "git",
Expand All @@ -28,10 +32,13 @@
"styled-components": "^3"
},
"devDependencies": {
"@types/node": "^10.0.3",
"@types/node": "^10.3.0",
"@types/react": "^16.3.13",
"jest": "^23.1.0",
"lint-staged": "^7.1.3",
"prettier": "^1.12.1",
"react-dom": "^16.2.0",
"semantic-release": "^15.5.0",
"typescript": "^2.8.3",
"typescript-styled-plugin": "^0.6.3"
},
Expand All @@ -41,11 +48,43 @@
"styled-components": "^3.2.6",
"styled-system": "^2.2.5"
},
"lint-staged": {
"*.@(ts|tsx)": [
"yarn prettier-write --",
"git add"
]
},
"prettier": {
"semi": false,
"singleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"lineLength": 100
"bracketSpacing": true
},
"release": {
"analyzeCommits": {
"preset": "ember",
"releaseRules": [
{
"tag": "DOC",
"release": "patch"
},
{
"tag": "FIX",
"release": "patch"
},
{
"tag": "PATCH",
"release": "patch"
},
{
"tag": "FEATURE",
"release": "minor"
},
{
"tag": "BREAKING",
"release": "major"
}
]
}
}
}
4 changes: 4 additions & 0 deletions src/Fonts.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { css } from "styled-components/primitives"

// @ts-ignore - https://github.com/styled-components/styled-components/issues/1063#issuecomment-320344957
import { StyledComponentClass, Styles } from "styled-components"

import {
color,
fontSize,
Expand Down
10 changes: 6 additions & 4 deletions src/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React from "react"
import { Sans, Serif, Display } from "./Fonts"
// import React from "react"
import { Sans } from "./Fonts"
import styled from "styled-components/primitives"

// @ts-ignore - https://github.com/styled-components/styled-components/issues/1063#issuecomment-320344957
import { StyledComponentClass } from "styled-components"

export const Sans1 = styled.Text`
${Sans}
font-size: 12px;
${Sans} font-size: 12px;
line-height: 16px;
`

Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"Assets/*": ["./Assets/*"]
}
},
"include": ["typings/*.d.ts", "src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules", "dist", "data", "externals", "danger"]
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules", "dist"]
}
Loading

0 comments on commit c23d401

Please sign in to comment.