8000 Switch to Webpack compilation for JS/CSS by ajacques · Pull Request #254 · natlas/natlas · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Switch to Webpack compilation for JS/CSS #254

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

Merged
merged 20 commits into from
Apr 28, 2020
Merged

Conversation

ajacques
Copy link
Member

This PR switches Natlas-server to build JS/CSS assets using Webpack. All external dependencies are now explicitly modeled using package.json instead of copy-and-paste. TypeScript is now available and enabled. ESLint is enabled and better enforced.

Fixes #232

@ajacques ajacques added server affecting natlas-server dependencies Relating to project dependencies refactor Applied to issues/PRs that deal with cleaning up or improving the project 8000 labels Apr 24, 2020
Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 10836 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 10837 lines exceeds the maximum allowed for the inline comments feature.

@0xdade 0xdade self-requested a review April 24, 2020 05:42
@0xdade
Copy link
Member
0xdade commented Apr 26, 2020

setup-server.sh fails right now. Full context: https://pastebin.com/HpSYt1UB

Immediate context:

[+] Generating random SECRET_KEY
Traceback (most recent call last):
  File "/home/dade/natlas-origin/natlas-server/venv/bin/flask", line 8, in <module>
    sys.exit(main())
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/flask/cli.py", line 894, in main
    cli.main(args=args, prog_name=name)
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/flask/cli.py", line 557, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/flask/cli.py", line 411, in decorator
    with __ctx.ensure_object(ScriptInfo).load_app().app_context():
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/flask/cli.py", line 372, in load_app
    app = locate_app(self, import_name, name)
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/flask/cli.py", line 235, in locate_app
    __import__(module_name)
  File "/home/dade/natlas-origin/natlas-server/natlas-server.py", line 15, in <module>
    raise e
  File "/home/dade/natlas-origin/natlas-server/natlas-server.py", line 12, in <module>
    app = create_app(config_class=config, load_config=True)
  File "/home/dade/natlas-origin/natlas-server/app/__init__.py", line 59, in create_app
    static_url='/static/',
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/webpack_manifest/webpack_manifest.py", line 47, in
load
    manifest = build(path, static_url, debug, timeout, read_retry, static_root)
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/webpack_manifest/webpack_manifest.py", line 58, in
build
    data = read(path, read_retry)
  File "/home/dade/natlas-origin/natlas-server/venv/lib/python3.6/site-packages/webpack_manifest/webpack_manifest.py", line 197, in
 read
    raise WebpackManifestFileError('Path "{}" is not a file or does not exist'.format(path))
webpack_manifest.webpack_manifest.WebpackManifestFileError: Path "/home/dade/natlas-origin/natlas-server/app/static/dist/webpack_ma
nifest.json" is not a file or does not exist

It looks like the webpack changes didn't get included in the setup-server.sh script. I can add it since I'm the one who wants to continue to support dockerless installs.

I guess this brings up the point that you only really need yarn for development and doing builds, and that actual releases would have the built assets already included in them. Don't really want to install yarn in the setup-server.sh since I think it's only necessary for dev.

@0xdade 0xdade self-assigned this Apr 26, 2020
Copy link
@codeclimate codeclimate bot left a comment
10000

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 10837 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 10852 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 10852 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 10932 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 10932 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 10950 lines exceeds the maximum allowed for the inline comments feature.

@0xdade
Copy link
Member
0xdade commented Apr 27, 2020
Functionality Status
Tagging & untagging
Check for updates
Search modal
Image modal
Back To Top
Time tag localization
Random host path rewrite
System Status
Data Table Styling
User Profile Modal/onclick

Capturing here in the event it doesn't get finished tonight. I think when the last red X goes green, we'll be ready to merge.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 11014 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 10944 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 10944 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn mor A373 e.

The PR diff size of 11092 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 11331 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 11330 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 11363 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 11367 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 11372 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 11372 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 11372 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 11372 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 11380 lines exceeds the maximum allowed for the inline comments feature.

Copy link
@codeclimate codeclimate bot left a comment
F836

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 11380 lines exceeds the maximum allowed for the inline comments feature.

@codeclimate
Copy link
codeclimate bot commented Apr 28, 2020

Code Climate has analyzed commit 1115ca2 and detected 72 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2
Style 70

View more on Code Climate.

Copy link
Member
@0xdade 0xdade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it was written, so it shall be done: "YOLO"

@0xdade 0xdade merged commit 96d511a into natlas:main Apr 28, 2020
@ajacques ajacques deleted the webpack branch May 16, 2020 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Relating to project dependencies refactor Applied to issues/PRs that deal with cleaning up or improving the project server affecting natlas-server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use sane compilation build system for front-end assets
2 participants
0