Skip to content

Commit

Permalink
fix #429 - move client JS to top of src/ dir
Browse files Browse the repository at this point in the history
  • Loading branch information
rmorshea committed Jul 15, 2021
1 parent 718ca9b commit 50ff26f
Show file tree
Hide file tree
Showing 28 changed files with 39 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
npm install -g npm@latest
npm --version
- name: Test Javascript
working-directory: ./src/idom/client
working-directory: ./src/client
run: |
npm install
npm test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ pip-wheel-metadata
# --- JS ---

node_modules
src/idom/client
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
recursive-include src/idom *
recursive-exclude src/idom/client/node_modules *
recursive-include src/idom/client *
include requirements/prod.txt
include requirements/extras.txt
24 changes: 21 additions & 3 deletions docs/source/custom_js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/source/custom_js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"rollup-plugin-replace": "^2.2.0"
},
"dependencies": {
"idom-client-react": "file:../../../src/idom/client/packages/idom-client-react"
"idom-client-react": "file:../../../src/client/packages/idom-client-react"
}
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class Command(cls):
def run(self):
log.info("Installing Javascript...")
try:
js_dir = str(package_dir / "client")
js_dir = str(src_dir / "client")
npm = shutil.which("npm") # this is required on windows
if npm is None:
raise RuntimeError("NPM is not installed.")
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
workspaceRoot: false,
testOptions: { files: ["**/tests/**/*", "**/*.test.*"] },
buildOptions: { out: "../idom/client" },
};
27 changes: 11 additions & 16 deletions src/idom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,21 @@


__all__ = [
"run",
"component",
"Component",
"event",
"Events",
"dialect",
"config",
"html",
"log",
"web",
"hooks",
"Component",
"component",
"Events",
"event",
"Layout",
"server",
"Ref",
"VdomDict",
"vdom",
"run",
"Ref",
"html_to_vdom",
"hotswap",
"multiview",
"html_to_vdom",
"VdomDict",
"widgets",
"client",
"install",
"log",
"config",
"web",
]
2 changes: 1 addition & 1 deletion src/idom/server/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from .proto import ServerFactory


CLIENT_BUILD_DIR = Path(idom.__file__).parent / "client" / "build"
CLIENT_BUILD_DIR = Path(idom.__file__).parent / "client"

_SUPPORTED_PACKAGES = [
"sanic",
Expand Down

0 comments on commit 50ff26f

Please sign in to comment.