Skip to content

Update branch to sync up with the latest tbolis/react-sketch:master #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
{
"presets": [
"@babel/preset-env", "@babel/preset-react"
],
"plugins": [
"@babel/plugin-transform-runtime",
"react-hot-loader/babel",

// Stage 2 https://github.com/babel/babel/tree/master/packages/babel-preset-stage-2
["@babel/plugin-proposal-decorators", { "legacy": true }],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",

// Stage 3
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
["@babel/plugin-proposal-class-properties", { "loose": true }],
"@babel/plugin-proposal-json-strings"
]
}
"presets": ["@babel/env", "@babel/react", "@babel/preset-typescript"],
"plugins": ["@babel/plugin-proposal-class-properties"]
}
45 changes: 23 additions & 22 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
{
"parser": "babel-eslint",
"plugins": [
"react",
"jest",
"eslint-plugin-react"
],
"env": {
"es6": true,
"jest": true,
"amd": true,
"browser": true,
"node": true
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"globals": {
"React": true,
"document": true,
"require": true,
"window": true,
"localStorage": true
"plugins": ["@typescript-eslint", "react-hooks", "prettier"],
"extends": ["plugin:react/recommended", "plugin:@typescript-eslint/recommended"],
"rules": {
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/ban-types": 0,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"prettier/prettier": "error",
"react/prop-types": "off"
},
"settings": {
"react": {
"pragma": "React",
"version": "detect"
}
}
}
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
node_modules
lib
lib-esm
_bundles

### Linux template
*~

Expand All @@ -6,7 +11,7 @@

# Linux trash folder which might appear on any partition or disk
.Trash-*

dist/

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
Expand Down
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
.*
**/tsconfig.json
**/webpack.config.js
node_modules
src


examples/
test/
src/
Expand Down
16 changes: 16 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
build/
coverage/
dist/
docs/
node_modules/
*.md
.prettierignore
yarn.lock
.idea
LICENSE
*.jpg
.DS_Store
.npmignore
.gitignore
*.log
*.ico
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"printWidth": 85,
"arrowParens": "always",
"semi": true,
"tabWidth": 2,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": true,
"jsxBracketSameLine": true
}
Binary file added docs/react-sketch-logo-original.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 34 additions & 29 deletions examples/base.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,45 @@
<!doctype html>
<!DOCTYPE html>
<html class="no-js" lang="">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title><%= htmlWebpackPlugin.options.title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="<%= htmlWebpackPlugin.options.keywords %>">
<meta name="description" content="<%= htmlWebpackPlugin.options.description %>">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="keywords" content="<%= htmlWebpackPlugin.options.keywords %>" />
<meta
name="description"
content="<%= htmlWebpackPlugin.options.description %>"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
</head>

<body>
<div id="container"></div>
<!--
<body>
<div id="container"></div>
<!--
This script adds the Roboto font to our project. For more detail go to this site:
http://www.google.com/fonts#UsePlace:use/Collection:Roboto:400,300,500
-->
<script>
var WebFontConfig = {
google: {families: ['Roboto:400,300,500:latin']}
};
(function () {
var wf = document.createElement('script');
wf.src = ('https:' === document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
<script>
var WebFontConfig = {
google: { families: ["Roboto:400,300,500:latin"] },
};
(function () {
var wf = document.createElement("script");
wf.src =
("https:" === document.location.protocol ? "https" : "http") +
"://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js";
wf.type = "text/javascript";
wf.async = "true";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(wf, s);
})();
</script>
<!--
})();
</script>
<!--
Define your local ip
<script src="http://192.168.3.119:8080/target/target-script-min.js#anonymous"></script>
-->
</body>

</body>
</html>
Loading