moved Webpack bundle directory out of /static/js because it contains more than just JS files
This commit is contained in:
parent
6b2222a3ec
commit
c9fa22b093
6 changed files with 24 additions and 9 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -8,7 +8,7 @@ dest
|
||||||
node_modules
|
node_modules
|
||||||
static/ldn
|
static/ldn
|
||||||
static/fonts
|
static/fonts
|
||||||
static/js/build
|
static/build
|
||||||
stack_local
|
stack_local
|
||||||
test/data/registry/
|
test/data/registry/
|
||||||
typings
|
typings
|
||||||
|
|
|
@ -161,14 +161,12 @@ def render_page_template(name, route_data=None, **kwargs):
|
||||||
library_styles = list_files('lib', 'css')
|
library_styles = list_files('lib', 'css')
|
||||||
main_styles = list_files('css', 'css')
|
main_styles = list_files('css', 'css')
|
||||||
library_scripts = list_files('lib', 'js')
|
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]
|
file_lists = [library_styles, main_styles, library_scripts, main_scripts]
|
||||||
for file_list in file_lists:
|
for file_list in file_lists:
|
||||||
file_list.sort()
|
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:
|
else:
|
||||||
library_styles = []
|
library_styles = []
|
||||||
main_styles = ['dist/quay-frontend.css']
|
main_styles = ['dist/quay-frontend.css']
|
||||||
|
|
|
@ -25,8 +25,13 @@ module.exports = function(grunt) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
src: ['../static/lib/**/*.js', '../static/js/**/*.js', '../static/dist/template-cache.js',
|
src: [
|
||||||
'!../static/js/**/*.spec.js'],
|
'../static/lib/**/*.js',
|
||||||
|
'../static/js/**/*.js',
|
||||||
|
'../static/build/*.js',
|
||||||
|
'../static/dist/template-cache.js',
|
||||||
|
'!../static/js/**/*.spec.js'
|
||||||
|
],
|
||||||
dest: '../static/dist/<%= pkg.name %>.js'
|
dest: '../static/dist/<%= pkg.name %>.js'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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 repoHeader from "./header";
|
||||||
import repoSidebar from "./sidebar";
|
import repoSidebar from "./sidebar";
|
||||||
import repoBody from "./body";
|
import repoBody from "./body";
|
||||||
|
|
|
@ -1,6 +1,18 @@
|
||||||
|
/**
|
||||||
|
* Constructs client-side routes.
|
||||||
|
*/
|
||||||
export abstract class RouteBuilder {
|
export abstract class RouteBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the redirect route.
|
||||||
|
* @param options Configuration options.
|
||||||
|
*/
|
||||||
public abstract otherwise(options: any): void;
|
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;
|
public abstract route(path: string, pagename: string): RouteBuilder;
|
||||||
}
|
}
|
|
@ -4,7 +4,7 @@ var path = require("path");
|
||||||
var config = {
|
var config = {
|
||||||
entry: "./static/js/quay.module.ts",
|
entry: "./static/js/quay.module.ts",
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, "static/js/build"),
|
path: path.resolve(__dirname, "static/build"),
|
||||||
filename: "bundle.js"
|
filename: "bundle.js"
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|
Reference in a new issue