diff --git a/.gitignore b/.gitignore index 1a5d2c3a8..9c8de6681 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ dest node_modules static/ldn static/fonts -static/js/build +static/build stack_local test/data/registry/ typings diff --git a/endpoints/common.py b/endpoints/common.py index 322bc2427..e73fa97da 100644 --- a/endpoints/common.py +++ b/endpoints/common.py @@ -161,14 +161,12 @@ def render_page_template(name, route_data=None, **kwargs): library_styles = list_files('lib', 'css') main_styles = list_files('css', 'css') library_scripts = list_files('lib', 'js') - main_scripts = list_files('js', 'js') + # Ensure Webpack bundle is first script on page + main_scripts = ['build/bundle.js'] + list_files('js', 'js') file_lists = [library_styles, main_styles, library_scripts, main_scripts] for file_list in file_lists: file_list.sort() - # Ensure Webpack bundle is first script on page - if 'js/build/bundle.js' in main_scripts: main_scripts.remove('js/build/bundle.js') - main_scripts = ['js/build/bundle.js'] + main_scripts else: library_styles = [] main_styles = ['dist/quay-frontend.css'] diff --git a/grunt/Gruntfile.js b/grunt/Gruntfile.js index ef7a4a6f9..d56d0fb51 100644 --- a/grunt/Gruntfile.js +++ b/grunt/Gruntfile.js @@ -25,8 +25,13 @@ module.exports = function(grunt) { }, }, build: { - src: ['../static/lib/**/*.js', '../static/js/**/*.js', '../static/dist/template-cache.js', - '!../static/js/**/*.spec.js'], + src: [ + '../static/lib/**/*.js', + '../static/js/**/*.js', + '../static/build/*.js', + '../static/dist/template-cache.js', + '!../static/js/**/*.spec.js' + ], dest: '../static/dist/<%= pkg.name %>.js' } }, diff --git a/static/js/directives/components/pages/repo-page/main.tsx b/static/js/directives/components/pages/repo-page/main.tsx index 094381f92..2a07a4421 100644 --- a/static/js/directives/components/pages/repo-page/main.tsx +++ b/static/js/directives/components/pages/repo-page/main.tsx @@ -1,4 +1,4 @@ -import "../../../../../css/directives/components/pages/repo-page/repo-page.scss"; +import "sass/repo-page/repo-page.scss"; import repoHeader from "./header"; import repoSidebar from "./sidebar"; import repoBody from "./body"; diff --git a/static/js/services/route-builder/route-builder.service.ts b/static/js/services/route-builder/route-builder.service.ts index 106f03ba1..0d99ab075 100644 --- a/static/js/services/route-builder/route-builder.service.ts +++ b/static/js/services/route-builder/route-builder.service.ts @@ -1,6 +1,18 @@ +/** + * Constructs client-side routes. + */ export abstract class RouteBuilder { + /** + * Configure the redirect route. + * @param options Configuration options. + */ public abstract otherwise(options: any): void; + /** + * Register a route. + * @param path The URL of the route. + * @param pagename The name of the page to associate with this route. + */ public abstract route(path: string, pagename: string): RouteBuilder; } \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index be272f0a3..0e439c03f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,7 +4,7 @@ var path = require("path"); var config = { entry: "./static/js/quay.module.ts", output: { - path: path.resolve(__dirname, "static/js/build"), + path: path.resolve(__dirname, "static/build"), filename: "bundle.js" }, resolve: {