Skip to content

Commit

Permalink
Merge pull request #29 from dnbexperience/develop
Browse files Browse the repository at this point in the history
repo config etc.
  • Loading branch information
tujoworker authored Dec 19, 2018
2 parents a7b3ae0 + b70fb5c commit 44e942c
Show file tree
Hide file tree
Showing 38 changed files with 514 additions and 755 deletions.
31 changes: 23 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ jobs:
keys:
- yarn-packages-{{ checksum "yarn.lock" }}

- run: yarn install
- run:
name: Install latest yarn
command: curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.12.3 && echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> $BASH_ENV

- run:
name: Install dependencies
command: yarn install --frozen-lockfile

- save_cache:
name: Save Yarn Package Cache
Expand All @@ -39,7 +45,13 @@ jobs:
keys:
- yarn-packages-{{ checksum "yarn.lock" }}

- run: yarn install
- run:
name: Install latest yarn
command: curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.12.3 && echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> $BASH_ENV

- run:
name: Install dependencies
command: yarn install --frozen-lockfile

- save_cache:
name: Save Yarn Package Cache
Expand Down Expand Up @@ -67,7 +79,13 @@ jobs:
keys:
- yarn-packages-{{ checksum "yarn.lock" }}

- run: yarn install
- run:
name: Install latest yarn
command: curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.12.3 && echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> $BASH_ENV

- run:
name: Install dependencies
command: yarn install --frozen-lockfile

- save_cache:
name: Save Yarn Package Cache
Expand Down Expand Up @@ -100,19 +118,16 @@ workflows:
branches:
ignore:
- master
- develop
- gh-pages
- /^(rc-|rc\/).*/
- /^(release-|release\/).*/
- deploy-preview:
filters:
branches:
only:
- develop
- /^(rc-|rc\/).*/
- /^(rc\/.*)/
- deploy-release:
filters:
branches:
only:
- master
- /^(release-|release\/).*/
- /^release\/.*/
90 changes: 90 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
kind: pipeline
name: default

trigger:
event:
- push
- pull-request

steps:
- name: test
image: node:10.6
commands:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.12.3
- export PATH="$HOME/.yarn/bin:$PATH"
- yarn install
- yarn lint-ci
- yarn test-ci
when:
event:
- push
branch:
exclude:
- master
- develop
- gh-pages
- rc/*
- release/*

- name: deploy-preview
image: node:10.6
environment:
FIGMA_MAIN_FILE:
from_secret: FIGMA_MAIN_FILE
FIGMA_TOKEN:
from_secret: FIGMA_TOKEN
GH_EMAIL:
from_secret: GH_EMAIL
GH_NAME:
from_secret: GH_NAME
GH_TOKEN:
from_secret: GH_TOKEN
commands:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.12.3
- export PATH="$HOME/.yarn/bin:$PATH"
- yarn install
- yarn lint-ci
- yarn test-ci
- yarn prepublish-ci
- yarn build-ci
when:
event:
- push
- pull-request
branch:
include:
- develop
- rc/*

- name: deploy-release
image: node:10.6
environment:
FIGMA_MAIN_FILE:
from_secret: FIGMA_MAIN_FILE
FIGMA_TOKEN:
from_secret: FIGMA_TOKEN
GH_EMAIL:
from_secret: GH_EMAIL
GH_NAME:
from_secret: GH_NAME
GH_TOKEN:
from_secret: GH_TOKEN
NPM_TOKEN:
from_secret: NPM_TOKEN
commands:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.12.3
- export PATH="$HOME/.yarn/bin:$PATH"
- yarn install
- yarn lint-ci
- yarn test-ci
- yarn prepublish-ci
- yarn build-ci
- yarn deploy-ci
- yarn publish-ci
when:
event:
- push
branch:
include:
- master
- release/*
21 changes: 16 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,24 @@ language: node_js
node_js:
- '10.6'

cache:
yarn: true
# os:
# - osx

notifications:
email: false
slack: eggsdesign:MOctggZdt8nWoWScG08NZ5ap

cache:
yarn: true

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.12.3
- export PATH="$HOME/.yarn/bin:$PATH"

before_script:
- export BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"

jobs:
include:
- stage: test
Expand All @@ -28,10 +39,10 @@ jobs:

stages:
- name: test
if: NOT (branch = master)
if: NOT (branch =~ /^(master|gh-pages)/)

- name: deploy-preview
if: (branch = develop) OR (branch = /^rc-.*/) OR (branch = /^rc\/.*/)
if: (branch =~ /^(develop|rc\/.*)/)

- name: deploy-release
if: (branch = master) OR (branch = /^release-.*/) OR (branch = /^release\/.*/)
if: (branch =~ /^(master|release\/.*)/)
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## Date

### Release of v1.10.0
---

### Release of `dnb-ui-lib` v1.10.0

#### Breaking Changes

Expand All @@ -19,3 +21,11 @@ Description
#### Fixes & Optimizations

Description

---

### New color added to Figma

Description

---
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,24 @@
"packages/*",
"packages/examples/*"
],
"main": "index.js",
"main": "./packages/dnb-ui-lib/index.js",
"scripts": {
"prepublish-ci": "cd ./packages/dnb-ui-lib && yarn prepublish-ci && cd -",
"precommit": "yarn workspaces run precommit",
"precommit": "cd ./packages/dnb-ui-lib && yarn precommit && cd - && cd ./packages/dnb-design-system-portal && yarn precommit && cd -",
"build-ci": "cd ./packages/dnb-design-system-portal && yarn build-ci && cd -",
"deploy-ci": "cd ./packages/dnb-design-system-portal && yarn deploy-ci && cd -",
"start": "cd ./packages/dnb-design-system-portal && yarn start && cd -",
"lint-ci": "yarn workspaces run lint-ci",
"lint-ci": "cd ./packages/dnb-ui-lib && yarn lint-ci && cd - && cd ./packages/dnb-design-system-portal && yarn lint-ci && cd -",
"publish-ci": "cd ./packages/dnb-ui-lib && yarn publish-ci && cd -",
"reset": "rm -rf ./node_modules && rm yarn.lock && rm -rf ./packages/dnb-ui-lib/node_modules && rm -rf ./packages/dnb-design-system-portal/node_modules && yarn install",
"build": "cd ./packages/dnb-ui-lib && yarn build && cd - && cd ./packages/dnb-design-system-portal && yarn build && cd -",
"test": "cd ./packages/dnb-ui-lib && yarn test && cd -",
"test:update": "cd ./packages/dnb-ui-lib && yarn test:update && cd -",
"test-ci": "yarn workspaces run test-ci",
"test-ci:update": "yarn workspaces run test-ci --updateSnapshot"
"test-ci": "cd ./packages/dnb-ui-lib && yarn test-ci && cd - && cd ./packages/dnb-design-system-portal && yarn test-ci && cd -",
"test-ci:update": "yarn test-ci --updateSnapshot"
},
"devDependencies": {
"husky": "^1.2.0",
"yarn": "^1.12.3"
"husky": "^1.2.0"
},
"release": {
"analyzeCommits": "simple-commit-message"
Expand Down
6 changes: 3 additions & 3 deletions packages/dnb-design-system-portal/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ module.exports = {
repoUrl: 'https://github.com/dnbexperience/eufemia/tree/master/'
},
plugins: [
'gatsby-plugin-sharp',
// 'gatsby-plugin-offline', // we may test the usage without the offline capabilities
'gatsby-plugin-remove-serviceworker', // we may have useage for this later
'gatsby-plugin-remove-serviceworker', // this removes the preloading of links (because of to the font flickering)
'gatsby-plugin-catch-links',
'gatsby-plugin-react-helmet',
{
Expand All @@ -28,7 +27,7 @@ module.exports = {
background_color: '#fff',
theme_color: '#007272',
display: 'minimal-ui',
icon: '../dnb-ui-lib/assets/images/dnb-logo.png' // This path is relative to the root of the site.
icon: '../dnb-ui-lib/assets/images/dnb-icon.png' // This path is relative to the root of the site.
// icons: [
// {
// src: '/assets/....png',
Expand All @@ -38,6 +37,7 @@ module.exports = {
// ],
}
},
'gatsby-plugin-sharp', // is used by gatsby-remark-images
{
resolve: 'gatsby-mdx',
options: {
Expand Down
12 changes: 1 addition & 11 deletions packages/dnb-design-system-portal/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,10 @@ exports.createPages = ({ graphql, actions }) => {
edges {
node {
id
tableOfContents
fields {
id
slug
}
parent {
... on File {
absolutePath
name
sourceInstanceName
}
}
code {
scope
}
Expand All @@ -57,9 +49,7 @@ exports.createPages = ({ graphql, actions }) => {
__dirname
),
context: {
id: node.fields.id,
absPath: node.parent.absolutePath,
tableOfContents: node.tableOfContents
id: node.fields.id
}
})
})
Expand Down
7 changes: 2 additions & 5 deletions packages/dnb-design-system-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@
"prettier:package": "prettier-package-json --write ./package.json"
},
"dependencies": {
"@reach/router": "^1.2.1",
"dnb-ui-lib": "*",
"gatsby-plugin-manifest": "^2.0.11",
"prop-types": "^15.6.2",
"react": "^16.6.3",
"react-dom": "^16.6.3"
Expand Down Expand Up @@ -77,7 +75,7 @@
"eslint-plugin-react": "^7.11.1",
"front-matter": "^3.0.1",
"fs-extra": "^7.0.1",
"gatsby": "^2.0.66",
"gatsby": "^2.0.67",
"gatsby-link": "^2.0.7",
"gatsby-mdx": "^0.2.0",
"gatsby-plugin-catch-links": "^2.0.9",
Expand All @@ -103,13 +101,12 @@
"ora": "^3.0.0",
"postcss-calc": "^7.0.1",
"postcss-custom-properties": "^8.0.9",
"postcss-preset-env": "^6.4.0",
"postcss-preset-env": "^6.5.0",
"prettier": "^1.15.3",
"prettier-package-json": "^2.0.1",
"pretty": "^2.0.0",
"prism-react-renderer": "^0.1.5",
"raw-loader": "^1.0.0",
"react-docgen": "^2.21.0",
"react-emotion": "^9.2.12",
"react-fake-props": "^0.3.1",
"react-helmet": "^5.2.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/dnb-design-system-portal/scripts/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import dotenv from 'dotenv'
import ghpages from 'gh-pages'
import { name as CIName } from 'ci-info'
import ora from 'ora'
import { currentVersion } from './version.js'

Expand Down Expand Up @@ -34,7 +35,8 @@ const run = () => {
ghpages.publish(
'public',
{
message: `Auto-generated deploy commit ${currentVersion} [ci skip]`,
message: `Auto-generated deploy commit by ${CIName ||
'localhost'} ${currentVersion} [ci skip]`,
branch: 'gh-pages',
...config
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import * as emotion from 'emotion'
import { createSerializer } from 'jest-emotion'
import '../startup/required'
import fakeProps from 'react-fake-props'
import { mount, render, shallow } from './enzyme'
import toJson from 'enzyme-to-json'
Expand Down
10 changes: 0 additions & 10 deletions packages/dnb-design-system-portal/src/core/jest/providerProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ import { Provider } from 'mobx-react'

import { MobxIntlProvider, localeStore } from '../startup/locales'
import history from '../routing/History'
// import stores from '../../dm/stores'

import extend from 'lodash.merge'

// make Object.merge global aviable
Object.merge = (...args) => {
args.unshift({})
return extend.apply(extend, args)
} // I used merge before, but the "array-includes-with-glob" is not ES5 code in the npm package, so this causes troubles on the build / UglifyJsPlugin process
Object.extend = extend

// make sure the lang is set to en

Expand Down

This file was deleted.

Loading

0 comments on commit 44e942c

Please sign in to comment.