Skip to content

Commit

Permalink
Huge blob commit to drive reactor forward
Browse files Browse the repository at this point in the history
I don't know why I even do this
  • Loading branch information
edelvalle committed Nov 11, 2021
1 parent d41f2ab commit dcb8fe8
Show file tree
Hide file tree
Showing 43 changed files with 3,020 additions and 2,684 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/ci.yml

This file was deleted.

7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
*.egg-info/
*.eggs/
*.log
*.map
*.sqlite3
dist/
__pycache__/
reactor/static/reactor.js*
.pytest_cache/
reactor/static/reactor.min.*
node_modules/*
*.sqlite3
.coverage
site/
.vscode/
23 changes: 11 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@


all: build-deps build

build-deps:
npm install coffeescript uglify-es

build:
./node_modules/.bin/coffee -c reactor/static/reactor/reactor.coffee
./node_modules/.bin/uglifyjs reactor/static/reactor/reactor.js >reactor/static/reactor/reactor.min.js
mv reactor/static/reactor/reactor.min.js reactor/static/reactor/reactor.js
poetry build
all: install build

install:
yarn install
pip install --upgrade pip
pip install poetry
poetry install
pip install -e .[dev]
python setup.py develop

watch-js:
node esbuild.conf.js -w

build:
node esbuild.conf.js
python setup.py sdist

test:
flake8 --max-line-length=80 reactor
Expand Down
21 changes: 21 additions & 0 deletions esbuild.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const esbuild = require('esbuild');

const isWatch = process.argv.includes('-w');
const isBuild = !isWatch;
const mode = isBuild ? 'production' : 'development';


const buildOptions = {
entryPoints: ['reactor/static/reactor/reactor.js'],
define: {
'process.env.NODE_ENV': JSON.stringify(mode),
},
bundle: true,
sourcemap: true,
minify: isBuild,
incremental: isWatch,
outfile: 'reactor/static/reactor/reactor.min.js',
watch: isWatch,
};

esbuild.build(buildOptions);
30 changes: 0 additions & 30 deletions package-lock.json

This file was deleted.

16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "reactor",
"version": "1.0.0",
"description": "Brings LiveView from Phoenix framework into Django",
"main": "index.js",
"repository": "[email protected]:edelvalle/reactor.git",
"author": "Eddy Ernesto del Valle Pino <[email protected]>",
"license": "MIT",
"dependencies": {
"morphdom": "^2.6.1",
"reconnecting-websocket": "^4.4.0"
},
"devDependencies": {
"esbuild": "^0.13.9"
}
}
Loading

0 comments on commit dcb8fe8

Please sign in to comment.