chore: format commits (#304)

This commit is contained in:
Anders Nilsson
2020-02-13 12:39:51 +01:00
committed by GitHub
parent c0df8f78ea
commit 23b0d0418d
26 changed files with 218 additions and 129 deletions

View File

@@ -1,8 +1,8 @@
import "./styles.css";
import './styles.css';
import init from "./init";
import init from './init';
init({
appId: "doc/01775889-c700-413f-9b0e-6ba1837c52b0",
fields: ["Country", "Product Category", "=count(Customer)"]
appId: 'doc/01775889-c700-413f-9b0e-6ba1837c52b0',
fields: ['Country', 'Product Category', '=count(Customer)'],
});

View File

@@ -5,7 +5,8 @@ body {
margin: 12px;
}
#selections, #object {
#selections,
#object {
background: #fff;
border-radius: 2px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);

View File

@@ -1,3 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
}
};

View File

@@ -54,6 +54,7 @@ This is a multi-package repository which uses [lerna](https://github.com/lerna/l
### Cutting a release
**Prerelase**
```sh
npx lerna version --no-git-tag-version --no-push --no-conventional-commits --preid alpha --exact
```
@@ -65,6 +66,7 @@ Generally, development should be done directly towards the `master` branch.
### Branching
1. Fork and clone the repository
```sh
git clone git@github.com:YOUR-USERNAME/nebula.js.git
```
@@ -99,7 +101,6 @@ Generally, development should be done directly towards the `master` branch.
If the branch has merge conflicts or has been outdated, please do a rebase against the `master` branch.
### <a name="commit"></a> Commit message guidelines
Commit messages should follow the [commit message convention](https://conventionalcommits.org/).

View File

@@ -23,9 +23,9 @@ about: Something isn't working as expected. 😕
### Versions
* nebula.js: (x.y.z)
* Platform: ?
* Browser: ?
- nebula.js: (x.y.z)
- Platform: ?
- Browser: ?
### Additional context

1
.prettierignore Normal file
View File

@@ -0,0 +1 @@
dist/

View File

@@ -19,7 +19,7 @@ It consists of three parts:
Since nebula.js is still in an early stage we are very much open to input and suggestions. If you think something is missing, an API is weird or have general opinions about anything, let us know.
*Your opinions, requirements and involvement is key to the success of this project.* Click on the linked issues below ([or create you own](https://github.com/qlik-oss/nebula.js/issues/new/choose)), voice your opinion and vote if you would like to see it get implemented.
_Your opinions, requirements and involvement is key to the success of this project._ Click on the linked issues below ([or create you own](https://github.com/qlik-oss/nebula.js/issues/new/choose)), voice your opinion and vote if you would like to see it get implemented.
This is a draft of the roadmap ahead:
@@ -28,6 +28,7 @@ This is a draft of the roadmap ahead:
This is the primary task right now as there is currently barely any documentation at all 😬.
**Integration APIs**
- nucleus
- theming ([#24](https://github.com/qlik-oss/nebula.js/issues/24))
- translations, localization ([#25](https://github.com/qlik-oss/nebula.js/issues/25))
@@ -46,6 +47,7 @@ This is the primary task right now as there is currently barely any documentatio
- type definitions ([#40](https://github.com/qlik-oss/nebula.js/issues/40))
**CLI**
- create
- more templates ([#31](https://github.com/qlik-oss/nebula.js/issues/31))
- build
@@ -76,6 +78,7 @@ This is the primary task right now as there is currently barely any documentatio
### Creating a new project
The easiest way to get started is to create a new project using the nebula CLI through `npx`:
```sh
npx @nebula.js/cli@next create hello-sunshine
```
@@ -125,11 +128,10 @@ The `package.json` contains a few built-in npm commands:
Please follow the instructions in our [contributing guide](./.github/CONTRIBUTING.md).
## Resources
| name | status | description |
|---|---|---|
| ---------------- | ---------------------------- | ----------- |
| [sn-mekko-chart] | [![mekko-status]][mekko-npm] | Mekko chart |
[sn-mekko-chart]: https://github.com/qlik-oss/sn-mekko-chart

View File

@@ -25,9 +25,7 @@
"returns": {
"type": "#/definitions/Nebbie"
},
"examples": [
"import nucleus from '@nebula.js/nucleus'\nconst nebbie = nucleus(app);"
],
"examples": ["import nucleus from '@nebula.js/nucleus'\nconst nebbie = nucleus(app);"],
"entries": {
"configured": {
"description": "Creates a new `nucleus` instance using the specified configuration.\n\nThe configuration is merged with all previous instances.",

View File

@@ -761,9 +761,7 @@
"returns": {
"type": "string"
},
"examples": [
"theme.getColorPickerColor({ index: 1 });\ntheme.getColorPickerColor({ color: 'red' });"
]
"examples": ["theme.getColorPickerColor({ index: 1 });\ntheme.getColorPickerColor({ color: 'red' });"]
},
"getContrastingColorTo": {
"description": "Get the best contrasting color against the specified `color`.\nThis is typically used to find a suitable text color for a label placed on an arbitrarily colored background.\n\nThe returned colors are derived from the theme.",
@@ -777,9 +775,7 @@
"returns": {
"type": "string"
},
"examples": [
"theme.getContrastingColorTo('#400');"
]
"examples": ["theme.getContrastingColorTo('#400');"]
},
"getDataColorPalettes": {
"kind": "function",
@@ -842,9 +838,7 @@
"description": "The style value",
"type": "string"
},
"examples": [
"theme.getStyle('object', 'title.main', 'fontSize'));\ntheme.getStyle('', '', 'fontSize'));"
]
"examples": ["theme.getStyle('object', 'title.main', 'fontSize'));\ntheme.getStyle('', '', 'fontSize'));"]
}
}
},

View File

@@ -14,42 +14,28 @@
"translation": "properties.colorScheme.sequential",
"type": "gradient",
"propertyValue": "sg",
"scale": [
"#26a0a7",
"#c7ea8b"
]
"scale": ["#26a0a7", "#c7ea8b"]
},
{
"name": "Sequential Classes",
"translation": "properties.colorScheme.sequentialC",
"propertyValue": "sc",
"type": "class",
"scale": [
"#26a0a7",
"#c7ea8b"
]
"scale": ["#26a0a7", "#c7ea8b"]
},
{
"name": "Diverging gradient",
"translation": "properties.colorScheme.diverging",
"propertyValue": "dg",
"type": "gradient",
"scale": [
"#26a0a7",
"#c3ea8c",
"#ec983d"
]
"scale": ["#26a0a7", "#c3ea8c", "#ec983d"]
},
{
"name": "Diverging Classes",
"translation": "properties.colorScheme.divergingC",
"propertyValue": "dc",
"type": "class",
"scale": [
"#26a0a7",
"#c3ea8c",
"#ec983d"
]
"scale": ["#26a0a7", "#c3ea8c", "#ec983d"]
}
],
"palettes": {
@@ -60,18 +46,54 @@
"propertyValue": "12",
"type": "pyramid",
"scale": [
[ "#26A0A7" ],
[ "#26A0A7", "#EC983D" ],
[ "#26A0A7", "#CBE989", "#EC983D" ],
[ "#26A0A7", "#79D69F", "#F9EC86", "#EC983D" ],
[ "#26A0A7", "#79D69F", "#CBE989", "#F9EC86", "#EC983D" ],
[ "#26A0A7", "#65D3DA", "#79D69F", "#CBE989", "#F9EC86", "#EC983D" ],
[ "#26A0A7", "#65D3DA", "#79D69F", "#CBE989", "#F9EC86", "#EC983D", "#D76C6C" ],
[ "#26A0A7", "#65D3DA", "#79D69F", "#CBE989", "#F9EC86", "#FAD144", "#EC983D", "#D76C6C" ],
[ "#138185", "#26A0A7", "#65D3DA", "#79D69F", "#CBE989", "#F9EC86", "#FAD144", "#EC983D", "#D76C6C" ],
[ "#138185", "#26A0A7", "#65D3DA", "#79D69F", "#CBE989", "#EBF898", "#F9EC86", "#FAD144", "#EC983D", "#D76C6C" ],
[ "#138185", "#26A0A7", "#65D3DA", "#79D69F", "#CBE989", "#EBF898", "#F9EC86", "#FAD144", "#EC983D", "#D76C6C", "#A54343" ],
[ "#138185", "#26A0A7", "#65D3DA", "#79D69F", "#70BA6E", "#CBE989", "#EBF898", "#F9EC86", "#FAD144", "#EC983D", "#D76C6C", "#A54343" ]
["#26A0A7"],
["#26A0A7", "#EC983D"],
["#26A0A7", "#CBE989", "#EC983D"],
["#26A0A7", "#79D69F", "#F9EC86", "#EC983D"],
["#26A0A7", "#79D69F", "#CBE989", "#F9EC86", "#EC983D"],
["#26A0A7", "#65D3DA", "#79D69F", "#CBE989", "#F9EC86", "#EC983D"],
["#26A0A7", "#65D3DA", "#79D69F", "#CBE989", "#F9EC86", "#EC983D", "#D76C6C"],
["#26A0A7", "#65D3DA", "#79D69F", "#CBE989", "#F9EC86", "#FAD144", "#EC983D", "#D76C6C"],
["#138185", "#26A0A7", "#65D3DA", "#79D69F", "#CBE989", "#F9EC86", "#FAD144", "#EC983D", "#D76C6C"],
[
"#138185",
"#26A0A7",
"#65D3DA",
"#79D69F",
"#CBE989",
"#EBF898",
"#F9EC86",
"#FAD144",
"#EC983D",
"#D76C6C"
],
[
"#138185",
"#26A0A7",
"#65D3DA",
"#79D69F",
"#CBE989",
"#EBF898",
"#F9EC86",
"#FAD144",
"#EC983D",
"#D76C6C",
"#A54343"
],
[
"#138185",
"#26A0A7",
"#65D3DA",
"#79D69F",
"#70BA6E",
"#CBE989",
"#EBF898",
"#F9EC86",
"#FAD144",
"#EC983D",
"#D76C6C",
"#A54343"
]
]
}
],

View File

@@ -18,4 +18,3 @@ Options:
--watch, -w [boolean] [default: false]
-h, --help Show help [boolean]
```

View File

@@ -6,13 +6,11 @@
"parserOptions": {
"sourceType": "module"
},
"extends": [
"airbnb-base"
],
"extends": ["airbnb-base"],
"rules": {
"max-len": 0,
"no-plusplus": 0,
"no-bitwise" : 0,
"no-bitwise": 0,
"no-unused-expressions": 0,
"import/no-extraneous-dependencies": [2, { "devDependencies": true }]
},
@@ -31,9 +29,7 @@
"aw": false,
"page": false
},
"plugins": [
"mocha"
],
"plugins": ["mocha"],
"rules": {
"mocha/no-exclusive-tests": "error"
}

View File

@@ -33,6 +33,7 @@ Options:
#### Example
Start the server and connect to enigma on port `9077`
```sh
nebula serve --enigma.port 9077
```

View File

@@ -21,7 +21,7 @@
body {
background: #ddd;
-webkit-font-smoothing: antialiased;
font: normal 14px/16px "Source Sans Pro", Arial, sans-serif;
font: normal 14px/16px 'Source Sans Pro', Arial, sans-serif;
}
#app,
#app > div {

View File

@@ -1,12 +1,21 @@
window.connect = function connect() {
const loadSchema = () => fetch('https://unpkg.com/enigma.js/schemas/3.2.json').then(response => response.json());
const createConnection = () => loadSchema().then(schema => window.enigma.create({
const createConnection = () =>
loadSchema().then(schema =>
window.enigma
.create({
schema,
url: `ws://${window.location.hostname || 'localhost'}:9076/app/${Date.now()}`,
}).open().then(qix => qix.createSessionApp()));
})
.open()
.then(qix => qix.createSessionApp())
);
return createConnection().then(app => app.setScript(`
return createConnection().then(app =>
app
.setScript(
`
Characters:
Load Chr(RecNo()+Ord('A')-1) as Alpha, RecNo() as Num autogenerate 26;
@@ -17,5 +26,8 @@ Load
RecNo() as AsciiNum
autogenerate 85
Where (RecNo()>=65 and RecNo()<=126) or RecNo()>=160;
`).then(() => app.doReload().then(() => app)));
`
)
.then(() => app.doReload().then(() => app))
);
};

View File

@@ -1,4 +1,4 @@
version: "3.1"
version: '3.1'
services:
engine:
@@ -6,4 +6,4 @@ services:
restart: always
command: -S AcceptEULA="${ACCEPT_EULA:-no}"
ports:
- "9076:9076"
- '9076:9076'

View File

@@ -1,4 +1,5 @@
connect().then((app) => {
/* eslint-disable */
connect().then(app => {
const sn = {
component: {
mounted(element) {
@@ -13,13 +14,16 @@ connect().then((app) => {
nebbie.selections().mount(document.querySelector('.toolbar'));
document.querySelectorAll('.object').forEach((el) => {
document.querySelectorAll('.object').forEach(el => {
const type = el.getAttribute('data-type');
nebbie.create({
nebbie.create(
{
type,
}, {
},
{
element: el,
});
}
);
});
});

View File

@@ -1,5 +1,5 @@
.my-unique-class {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 24px;
color: #91298C;
color: #91298c;
}

View File

@@ -5,6 +5,7 @@
"build": "cross-env NODE_ENV=production FORCE_COLOR=1 lerna run build --stream",
"build:codesandbox": "cross-env NODE_ENV=production CODESANDBOX=1 FORCE_COLOR=1 lerna run build --stream --scope \"@nebula.js/{nucleus,supernova,theme,locale}\"",
"build:watch": "FORCE_COLOR=1 lerna run build:watch --stream --concurrency 99 --no-sort",
"format": "prettier --write '**/**/*'",
"locale:verify": "node tools/verify-translations.js",
"lint": "eslint packages apis commands --ext .js,.jsx",
"lint:check": "eslint --print-config ./aw.config.js | eslint-config-prettier-check",
@@ -23,6 +24,7 @@
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS && lint-staged"
}
},
@@ -70,6 +72,7 @@
"picasso-plugin-q": "0.29.2",
"picasso.js": "0.29.2",
"prettier": "1.19.1",
"pretty-quick": "^2.0.1",
"qix-faker": "0.3.0",
"rollup": "1.30.0",
"rollup-plugin-babel": "4.3.3",

View File

@@ -1,16 +1,14 @@
{
"extends": [
"qlik-oss"
],
"extends": ["qlik-oss"],
"circleci": {
"ignoreDeps": ["circleci/node"]
},
"semanticCommits": true,
"rangeStrategy": "bump",
"packageRules": [{
"depTypeList": [
"engines"
],
"packageRules": [
{
"depTypeList": ["engines"],
"enabled": false
}]
}
]
}

View File

@@ -14,16 +14,8 @@ class Index extends React.Component {
// const { baseUrl } = siteConfig;
const Block = props => (
<Container
padding={['bottom', 'top']}
id={props.id}
background={props.background}
>
<GridBlock
align="center"
contents={props.children}
layout={props.layout}
/>
<Container padding={['bottom', 'top']} id={props.id} background={props.background}>
<GridBlock align="center" contents={props.children} layout={props.layout} />
</Container>
);

View File

@@ -4926,7 +4926,7 @@
"@types/istanbul-lib-coverage" "*"
"@types/istanbul-lib-report" "*"
"@types/minimatch@*":
"@types/minimatch@*", "@types/minimatch@^3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
@@ -5536,6 +5536,11 @@ array-differ@^2.0.3:
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1"
integrity sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w==
array-differ@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b"
integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==
array-find-index@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
@@ -5617,6 +5622,11 @@ arrify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
arrify@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa"
integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==
asap@^2.0.0, asap@~2.0.3:
version "2.0.6"
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
@@ -8952,6 +8962,21 @@ execa@^1.0.0:
signal-exit "^3.0.0"
strip-eof "^1.0.0"
execa@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-2.1.0.tgz#e5d3ecd837d2a60ec50f3da78fd39767747bbe99"
integrity sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw==
dependencies:
cross-spawn "^7.0.0"
get-stream "^5.0.0"
is-stream "^2.0.0"
merge-stream "^2.0.0"
npm-run-path "^3.0.0"
onetime "^5.1.0"
p-finally "^2.0.0"
signal-exit "^3.0.2"
strip-final-newline "^2.0.0"
execa@^3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-3.4.0.tgz#c08ed4550ef65d858fac269ffc8572446f37eb89"
@@ -10557,6 +10582,11 @@ ignore@^5.1.1:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.2.tgz#e28e584d43ad7e92f96995019cc43b9e1ac49558"
integrity sha512-vdqWBp7MyzdmHkkRWV5nY+PfGRbYbahfuvsBCh277tq+w9zyNi7h5CYJCK0kmzti9kU+O/cB7sE8HvKv6aXAKQ==
ignore@^5.1.4:
version "5.1.4"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf"
integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==
immer@1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/immer/-/immer-1.10.0.tgz#bad67605ba9c810275d91e1c2a47d4582e98286d"
@@ -12928,6 +12958,11 @@ move-concurrently@^1.0.1:
rimraf "^2.5.4"
run-queue "^1.0.3"
mri@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.4.tgz#7cb1dd1b9b40905f1fac053abe25b6720f44744a"
integrity sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==
ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
@@ -12957,6 +12992,17 @@ multimatch@^3.0.0:
arrify "^1.0.1"
minimatch "^3.0.4"
multimatch@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3"
integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==
dependencies:
"@types/minimatch" "^3.0.3"
array-differ "^3.0.0"
array-union "^2.1.0"
arrify "^2.0.1"
minimatch "^3.0.4"
mute-stream@0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
@@ -13327,6 +13373,13 @@ npm-run-path@^2.0.0:
dependencies:
path-key "^2.0.0"
npm-run-path@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-3.1.0.tgz#7f91be317f6a466efed3c9f2980ad8a4ee8b0fa5"
integrity sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==
dependencies:
path-key "^3.0.0"
npm-run-path@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
@@ -14632,6 +14685,18 @@ pretty-hrtime@^1.0.3:
resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=
pretty-quick@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-2.0.1.tgz#417ee605ade98ecc686e72f63b5d28a2c35b43e9"
integrity sha512-y7bJt77XadjUr+P1uKqZxFWLddvj3SKY6EU4BuQtMxmmEFSMpbN132pUWdSG1g1mtUfO0noBvn7wBf0BVeomHg==
dependencies:
chalk "^2.4.2"
execa "^2.1.0"
find-up "^4.1.0"
ignore "^5.1.4"
mri "^1.1.4"
multimatch "^4.0.0"
prismjs@^1.8.4, prismjs@~1.17.0:
version "1.17.1"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.17.1.tgz#e669fcbd4cdd873c35102881c33b14d0d68519be"