Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8e03175
update playground proptypes to work as expected
berbetzl-hmh Aug 9, 2022
8edd903
eslint and prettier basic configs added
berbetzl-hmh Aug 9, 2022
19d2812
wip: babel configs updated
berbetzl-hmh Aug 10, 2022
af9ceb5
wip: packages and bundle configs updated
berbetzl-hmh Aug 15, 2022
43d4367
fixing createLogger import after package upgrade
berbetzl-hmh Aug 15, 2022
b4ebdf8
wip: updating bundle scripts
berbetzl-hmh Aug 15, 2022
d8b03e9
unused packages removed
berbetzl-hmh Aug 16, 2022
9f6b3ec
wip: small updates to work properly
berbetzl-hmh Aug 16, 2022
caa231e
chore: cleaning up
berbetzl-hmh Aug 16, 2022
6a0fa9b
updade readme
berbetzl-hmh Aug 16, 2022
b05d7bb
wip: pkg and scripts udpated to reduce bundle filesize
berbetzl-hmh Aug 25, 2022
974a75e
package update to reduce bundle size and warnings
berbetzl-hmh Aug 25, 2022
966174d
bundle script update to concern only about prod
berbetzl-hmh Aug 25, 2022
74473e7
unused files from blocks folder removed
berbetzl-hmh Aug 25, 2022
58e4098
exports updated to not show errors
berbetzl-hmh Aug 25, 2022
8c5a9c8
cleaning up runtime directory
berbetzl-hmh Aug 25, 2022
e274174
unused files removed within utils folder
berbetzl-hmh Aug 25, 2022
f4c1ac8
cleaning up root directory
berbetzl-hmh Aug 25, 2022
8906c96
packages updated to latest version, jest removed
berbetzl-hmh Aug 29, 2022
e137656
adding back dev bundle as it is a requirement
berbetzl-hmh Aug 29, 2022
ff81a31
adding back required files from blocks
berbetzl-hmh Aug 29, 2022
a306d7e
react version updated
berbetzl-hmh Aug 30, 2022
350264f
previous tests updated to final version
berbetzl-hmh Aug 30, 2022
a6b4b6d
major version bump
berbetzl-hmh Sep 13, 2022
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
13 changes: 0 additions & 13 deletions .babelrc

This file was deleted.

15 changes: 4 additions & 11 deletions .bin/bundle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ NODE_ENV=development $BIN/browserify --verbose --debug \
--require ./blocks/index.js:panels/blocks \
--require ./utils/normalise-uri/index.js:panels/normalise-uri \
--require ./utils/snap.js:panels/snap \
--transform [rollupify --config rollup.config.js] \
--transform loose-envify \
--transform [ babelify ] \
--entry index.dev.js | \
$BIN/exorcist $PANELS.js.map > $PANELS.js

Expand All @@ -33,16 +32,10 @@ NODE_ENV=production $BIN/browserify --verbose --debug \
--require ./blocks/index.js:panels/blocks \
--require ./utils/normalise-uri/index.js:panels/normalise-uri \
--require ./utils/snap.js:panels/snap \
--transform [rollupify --config rollup.config.js] \
--transform loose-envify \
--transform [ babelify ] \
--entry index.js | \
$BIN/exorcist $PANELS-prod.js.map > $PANELS-prod.js &&
$BIN/uglifyjs --verbose \
--compress \
--mangle \
--screw-ie8 \
--in-source-map $PANELS-prod.js.map \
--source-map $PANELS.min.js.map $PANELS-prod.js > $PANELS.min.js
$BIN/uglifyjs $PANELS-prod.js -o $PANELS.min.js -c -m --source-map "content='$PANELS-prod.js.map'"

ls -lha $PANELS.*
echo "[bundle] done"
echo "[bundle] done"
3 changes: 1 addition & 2 deletions .bin/bundle-dev
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ NODE_ENV=development $BIN/watchify --verbose --debug \
--require ./blocks/index.js:panels/blocks \
--require ./utils/normalise-uri/index.js:panels/normalise-uri \
--require ./utils/snap.js:panels/snap \
--transform [rollupify --config rollup.config.js] \
--transform loose-envify \
--transform [ babelify ] \
--entry index.dev.js \
--outfile $PANELS.js
21 changes: 9 additions & 12 deletions .bin/start
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@ function run {
--external react \
--external react-dom \
--external velocity-react \
--transform [rollupify --config rollup.config.js] \
--transform loose-envify \
--transform [ babelify ] \
--require ./playground/$1/src.js:$1 \
--outfile playground/$1/app.js
}

run trails.panels.localhost & \
run launchpad.panels.localhost & \
run launchpad-floating.panels.localhost & \
run toc.localhost & \
run notes.localhost & \
run trails.panels.localhost &
run launchpad.panels.localhost &
run launchpad-floating.panels.localhost &
run toc.localhost &
run notes.localhost &
NODE_ENV=development $BIN/watchify --debug --verbose \
--external panels \
--external panels/blocks \
Expand All @@ -30,8 +29,7 @@ NODE_ENV=development $BIN/watchify --debug --verbose \
--external react \
--external react-dom \
--external velocity-react \
--transform [rollupify --config rollup.config.js] \
--transform loose-envify \
--transform [ babelify ] \
--require ./playground/custom-parser.panels.localhost/app/src.js:custom-parser.panels.localhost \
--outfile playground/custom-parser.panels.localhost/app/app.js & \
NODE_ENV=development $BIN/watchify --debug --verbose \
Expand All @@ -41,8 +39,7 @@ NODE_ENV=development $BIN/watchify --debug --verbose \
--require ./blocks/index.js:panels/blocks \
--require ./utils/normalise-uri/index.js:panels/normalise-uri \
--require ./utils/snap.js:panels/snap \
--transform [rollupify --config rollup.config.js] \
--transform loose-envify \
--transform [ babelify ] \
--outfile playground/panels.js index.dev.js & \
sudo $BIN/babel-node --plugins transform-es2015-modules-commonjs .bin/server.js & \
$BIN/babel-node --plugins @babel/plugin-transform-modules-commonjs .bin/server.js &
wait
3 changes: 0 additions & 3 deletions .eslintrc

This file was deleted.

25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
parser: '@babel/eslint-parser',
env: {
browser: true,
es6: true,
},
extends: [
'airbnb',
'prettier',
'plugin:prettier/recommended',
'plugin:jest/recommended',
'plugin:react/recommended',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: ['react'],
rules: {
'prettier/prettier': ['error'],
},
};
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ bundle
playground/panels.js
playground/*/app.js
playground/*/*/app.js
*.tmp
*.tmp
3 changes: 1 addition & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.babelrc
examples/
babel.config.js
playground/
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
trailingComma: 'all',
tabWidth: 2,
semi: true,
singleQuote: true,
};
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# panels by UXtemple
> A hackable runtime for a modern, composable web.

A hackable runtime for a modern, composable web.
## Table of Contents
- [Setup](#setup)
- [Examples](#examples)
- [License](#license)
- [Contact](#contact)
## Setup
1. Clone this repo to your desktop.
2. Make sure you are using node **v16.15.1**.
3. Run `yarn` to install all dependencies.

Docs are WIP. See `playground/`'s examples for now.
## Examples
See `playground/`'s examples for now. - You can also run `yarn start`.

Depending on your target platform, may want to polyfill `Promise`, `fetch` and `Array.findIndex`.
- Depending on your target platform, may want to polyfill `Promise`, `fetch` and `Array.findIndex`.

MIT license.
## License
>You can check out the full license [here](LICENSE)

This project is licensed under the terms of the **MIT** license.

## Contact

With <3 by UXtemple.
Like Panels? Get in touch! :)
Expand Down
7 changes: 7 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
presets: [['@babel/preset-env'], '@babel/preset-react'],
plugins: [
'@babel/plugin-transform-runtime',
'@babel/plugin-proposal-export-default-from',
],
};
2 changes: 1 addition & 1 deletion blocks/circle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'

const Circle = props => <circle {...props} />
export default Circle
export default Circle
4 changes: 0 additions & 4 deletions blocks/clip-path.js

This file was deleted.

2 changes: 1 addition & 1 deletion blocks/dangerously-set-inner-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ const DangerouslySetInnerHTML = props => (
style={props.style}
/>
)
export default DangerouslySetInnerHTML
export default DangerouslySetInnerHTML
4 changes: 0 additions & 4 deletions blocks/ellipse.js

This file was deleted.

2 changes: 1 addition & 1 deletion blocks/font.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ export default class Font extends React.Component {
}
Font.defaultProps = {
source: 'google',
}
}
2 changes: 1 addition & 1 deletion blocks/g.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ const G = ({ children, ...props }) => (
{children}
</g>
)
export default G
export default G
56 changes: 0 additions & 56 deletions blocks/image.js

This file was deleted.

38 changes: 16 additions & 22 deletions blocks/index.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
export DangerouslySetInnerHTML from './dangerously-set-inner-html.js'
export Font from './font.js'
export Horizontal from './horizontal.js'
export Image from './image.js'
export Input from './input.js'
export Knocking from './knocking.js'
export List from './list.js'
export Style from './style.js'
export Text from './text.js'
export Textarea from './textarea.js'
export Vertical from './vertical.js'

export Circle from './circle.js'
export ClipPath from './clip-path.js'
export Ellipse from './ellipse.js'
export G from './g.js'
export Line from './line.js'
export Rect from './rect.js'
export Svg from './svg.js'
export Path from './path.js'
export Polygon from './polygon.js'
export Polyline from './polyline.js'
export { default as DangerouslySetInnerHTML } from './dangerously-set-inner-html.js'
export { default as Font } from './font.js'
export { default as Horizontal } from './horizontal.js'
export { default as Input } from './input.js'
export { default as Knocking } from './knocking.js'
export { default as Style } from './style.js'
export { default as Text } from './text.js'
export { default as Textarea } from './textarea.js'
export { default as Vertical } from './vertical.js'
export { default as Circle } from './circle.js'
export { default as G } from './g.js'
export { default as Line } from './line.js'
export { default as Rect } from './rect.js'
export { default as Svg } from './svg.js'
export { default as Path } from './path.js'
export { default as Polygon } from './polygon.js'
2 changes: 1 addition & 1 deletion blocks/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ Input.contextTypes = {
i18n: PropTypes.shape({
t: PropTypes.func.isRequired,
}),
};
};
2 changes: 1 addition & 1 deletion blocks/line.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'

const Line = props => <line {...props} />
export default Line
export default Line
2 changes: 0 additions & 2 deletions blocks/list.js

This file was deleted.

23 changes: 0 additions & 23 deletions blocks/panel.js

This file was deleted.

2 changes: 1 addition & 1 deletion blocks/path.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'

const Path = props => <path {...props} />
export default Path
export default Path
2 changes: 1 addition & 1 deletion blocks/polygon.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'

const Polygon = props => <polygon {...props} />
export default Polygon
export default Polygon
4 changes: 0 additions & 4 deletions blocks/polyline.js

This file was deleted.

2 changes: 1 addition & 1 deletion blocks/rect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'

const Rect = props => <rect {...props} />
export default Rect
export default Rect
2 changes: 1 addition & 1 deletion blocks/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ const Style = props => (
{props.css}
</style>
)
export default Style
export default Style
Loading