Skip to content

Commit abb4028

Browse files
authored
v4 (#36)
* v4 changes * fix gh actions folder * rename gh action * bypass clipboard on CI * try CI env var as bool * bypass clipboard by platform * remove clipboard specs * return with with clipboard tests after gh ref fix * check base_ref * fix base_ref path * try pull_request event * pull_request_target * gh action badge * update uri template * remove image-size version caret
1 parent b7368ef commit abb4028

30 files changed

Lines changed: 8559 additions & 5000 deletions

.devcontainer/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/typescript-node/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Node.js version: 16, 14, 12
4+
ARG VARIANT="16-buster"
5+
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
6+
7+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
8+
# && apt-get -y install --no-install-recommends xclip
9+
10+
# [Optional] Uncomment if you want to install an additional version of node using nvm
11+
# ARG EXTRA_NODE_VERSION=10
12+
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
13+
14+
# [Optional] Uncomment if you want to install more global node packages
15+
# RUN su node -c "npm install -g <your-package-list -here>"

.devcontainer/devcontainer.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/typescript-node
3+
{
4+
"name": "Node.js & TypeScript",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
// Update 'VARIANT' to pick a Node version: 12, 14, 16
8+
"args": {
9+
"VARIANT": "16"
10+
}
11+
},
12+
13+
// Set *default* container specific settings.json values on container create.
14+
"settings": {},
15+
16+
// Add the IDs of extensions you want installed when the container is created.
17+
"extensions": [
18+
"dbaeumer.vscode-eslint",
19+
"esbenp.prettier-vscode",
20+
"tlent.jest-snapshot-language-support",
21+
"ms-azuretools.vscode-docker"
22+
],
23+
24+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
25+
// "forwardPorts": [],
26+
27+
// Use 'postCreateCommand' to run commands after the container is created.
28+
// "postCreateCommand": "yarn install",
29+
30+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
31+
"remoteUser": "node"
32+
}

.eslintrc

Lines changed: 19 additions & 228 deletions
Original file line numberDiff line numberDiff line change
@@ -1,235 +1,26 @@
11
{
2-
"env": {
3-
"node": true,
4-
"es6": true,
5-
"mocha": true
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 2020,
6+
"sourceType": "module"
67
},
7-
"ecmaFeatures": {
8-
"arrowFunctions": true,
9-
"binaryLiterals": true,
10-
"blockBindings": true,
11-
"classes": true,
12-
"defaultParams": true,
13-
"destructuring": true,
14-
"forOf": true,
15-
"generators": true,
16-
"modules": true,
17-
"objectLiteralComputedProperties": true,
18-
"objectLiteralDuplicateProperties": true,
19-
"objectLiteralShorthandMethods": true,
20-
"objectLiteralShorthandProperties": true,
21-
"octalLiterals": true,
22-
"regexUFlag": true,
23-
"regexYFlag": true,
24-
"spread": true,
25-
"superInFunctions": true,
26-
"templateStrings": true,
27-
"unicodeCodePointEscapes": true,
28-
"globalReturn": true
8+
"env": {
9+
"node": true
2910
},
11+
"extends": [
12+
"eslint:recommended",
13+
"plugin:@typescript-eslint/eslint-recommended",
14+
"plugin:@typescript-eslint/recommended",
15+
"plugin:prettier/recommended"
16+
],
3017
"rules": {
31-
"comma-dangle": 2,
32-
"no-cond-assign": 2,
33-
"no-constant-condition": 2,
34-
"no-control-regex": 2,
35-
"no-debugger": 2,
36-
"no-dupe-args": 2,
37-
"no-dupe-keys": 2,
38-
"no-duplicate-case": 2,
39-
"no-empty": 2,
40-
"no-empty-character-class": 2,
41-
"no-ex-assign": 2,
42-
"no-extra-boolean-cast": 2,
43-
"no-extra-parens": 0,
44-
"no-extra-semi": 2,
45-
"no-func-assign": 2,
46-
"no-inner-declarations": 2,
47-
"no-invalid-regexp": 2,
48-
"no-irregular-whitespace": 2,
49-
"no-negated-in-lhs": 2,
50-
"no-obj-calls": 2,
51-
"no-regex-spaces": 2,
52-
"quote-props": 2,
53-
"no-sparse-arrays": 2,
54-
"no-unreachable": 2,
55-
"use-isnan": 2,
56-
"valid-jsdoc": 2,
57-
"valid-typeof": 2,
58-
"block-scoped-var": 0,
59-
"complexity": 0,
60-
"consistent-return": 2,
61-
"curly": 2,
62-
"default-case": 2,
63-
"dot-notation": 2,
64-
"eqeqeq": 2,
65-
"guard-for-in": 2,
66-
"no-alert": 2,
67-
"no-caller": 2,
68-
"no-div-regex": 2,
69-
"no-else-return": 2,
70-
"no-eq-null": 2,
71-
"no-eval": 2,
72-
"no-extend-native": 2,
73-
"no-extra-bind": 2,
74-
"no-fallthrough": 2,
75-
"no-floating-decimal": 2,
76-
"no-implied-eval": 2,
77-
"no-iterator": 2,
78-
"no-lone-blocks": 2,
79-
"no-loop-func": 2,
80-
"no-multi-spaces": 2,
81-
"no-multi-str": 2,
82-
"no-native-reassign": 2,
83-
"no-new": 2,
84-
"no-new-func": 2,
85-
"no-new-wrappers": 2,
86-
"no-octal": 2,
87-
"no-octal-escape": 2,
88-
"no-process-env": 0,
89-
"no-proto": 2,
90-
"no-redeclare": 2,
91-
"no-return-assign": 2,
92-
"no-script-url": 2,
93-
"no-self-compare": 2,
94-
"no-sequences": 2,
95-
"no-throw-literal": 2,
96-
"no-unused-expressions": 2,
97-
"no-void": 2,
98-
"no-warning-comments": [
99-
0,
100-
{
101-
"terms": [
102-
"todo",
103-
"fixme"
104-
],
105-
"location": "start"
106-
}
107-
],
108-
"no-with": 2,
109-
"radix": 2,
110-
"vars-on-top": 2,
111-
"wrap-iife": 2,
112-
"yoda": 2,
113-
"strict": 0,
114-
"no-catch-shadow": 2,
115-
"no-delete-var": 2,
116-
"no-label-var": 2,
117-
"no-shadow": 2,
118-
"no-shadow-restricted-names": 2,
119-
"no-undef": 2,
120-
"no-undef-init": 2,
121-
"no-undefined": 2,
122-
"no-unused-vars": 2,
123-
"no-use-before-define": 2,
124-
"indent": [
125-
1,
126-
2
127-
],
128-
"brace-style": 1,
129-
"camelcase": 1,
130-
"comma-spacing": [
131-
1,
132-
{
133-
"before": false,
134-
"after": true
135-
}
136-
],
137-
"comma-style": [
138-
1,
139-
"last"
140-
],
141-
"consistent-this": [
142-
1,
143-
"_this"
144-
],
145-
"eol-last": 1,
146-
"func-names": 0,
147-
"func-style": 0,
148-
"key-spacing": [
149-
1,
150-
{
151-
"beforeColon": false,
152-
"afterColon": true
153-
}
154-
],
155-
"max-nested-callbacks": [
156-
1,
157-
3
158-
],
159-
"new-cap": [
160-
1,
161-
{
162-
"newIsCap": true,
163-
"capIsNew": false
164-
}
165-
],
166-
"new-parens": 1,
167-
"newline-after-var": 0,
168-
"no-array-constructor": 1,
169-
"no-inline-comments": 1,
170-
"no-lonely-if": 1,
171-
"no-mixed-spaces-and-tabs": 1,
172-
"no-multiple-empty-lines": [
173-
1,
174-
{
175-
"max": 2
176-
}
177-
],
178-
"no-nested-ternary": 1,
179-
"no-new-object": 1,
180-
"no-spaced-func": 1,
181-
"no-ternary": 0,
182-
"no-trailing-spaces": 1,
183-
"no-underscore-dangle": 1,
184-
"one-var": [
185-
1,
186-
"never"
187-
],
188-
"operator-assignment": [
189-
1,
190-
"never"
191-
],
192-
"padded-blocks": [
193-
1,
194-
"never"
195-
],
196-
"quotes": [
197-
1,
198-
"single"
199-
],
200-
"semi": [
201-
1,
202-
"always"
203-
],
204-
"semi-spacing": [
205-
1,
18+
"prettier/prettier": [
19+
"error",
20+
{},
20621
{
207-
"before": false,
208-
"after": true
22+
"usePrettierrc": true
20923
}
210-
],
211-
"sort-vars": 0,
212-
"wrap-regex": 0,
213-
"no-var": 2,
214-
"generator-star-spacing": [
215-
2,
216-
"before"
217-
],
218-
"max-depth": [
219-
2,
220-
3
221-
],
222-
"max-len": [
223-
2,
224-
200,
225-
2
226-
],
227-
"max-params": [
228-
2,
229-
5
230-
],
231-
"max-statements": 0,
232-
"no-bitwise": 0,
233-
"no-plusplus": 2
24+
]
23425
}
235-
}
26+
}

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": true,
3+
"tabWidth": 2,
4+
"printWidth": 100,
5+
"singleQuote": true,
6+
"trailingComma": "none"
7+
}

.travis.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3+
"editor.formatOnSave": true
4+
}

docs/datauri-cli.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
# datauri-cli
22

3-
[CLI](#cli) to generate [Data URI scheme](http://en.wikipedia.org/wiki/Data_URI_scheme) using [datauri module](http://npm.im/datauri).
3+
[CLI](#cli) to generate [Data URI scheme](http://en.wikipedia.org/wiki/Data_URI_scheme) using [datauri module](http://npm.im/datauri).
44

5-
> The data URI scheme is a uniform resource identifier (URI) scheme that provides a way to include data in-line in web pages as if they were external resources.
5+
> The data URI scheme is a uniform resource identifier (URI) scheme that provides a way to include data in-line in web pages as if they were external resources.
66
7-
from: [Wikipedia](http://en.wikipedia.org/wiki/Data_URI_scheme)
7+
from: [Wikipedia](http://en.wikipedia.org/wiki/Data_URI_scheme)
88

9-
[![Build Status](https://travis-ci.org/data-uri/datauri.svg?branch=master)](http://travis-ci.org/data-uri/datauri) [[![NPM version](http://img.shields.io/npm/dm/datauri.svg?style=flat)](https://www.npmjs.org/package/datauri)
9+
[![Build Status](https://github.com/data-uri/datauri/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/data-uri/datauri/actions/workflows/main.yml?query=branch%3Amain)
1010

1111
## CLI
12+
1213
`npm install -g datauri-cli` (it may require Root privileges)
1314

1415
### Print
16+
1517
To print a data-uri scheme from a file
18+
1619
```CLI
1720
$ datauri brand.png
1821
```
@@ -41,17 +44,17 @@ $ datauri brand.png --css=asset/background.css
4144
If you want to define a Class Name, width and etc just type:
4245

4346
```CLI
44-
$ datauri brand.png --css --class=MyNewClass
47+
$ datauri brand.png --css --className=MyNewClass
4548
$ datauri brand.png --css --width --height
46-
$ datauri brand.png --css --background-size
49+
$ datauri brand.png --css --backgroundSize
4750
```
51+
4852
## [ChangeLog](https://github.com/data-uri/datauri/releases)
4953

5054
## Requirements
5155

5256
Node.js 8+
5357

54-
5558
## License
5659

5760
MIT License

0 commit comments

Comments
 (0)