Skip to content

Commit

Permalink
(refactor) add static site build process
Browse files Browse the repository at this point in the history
- This commit sets up a static site build process designed to eliminate the need for
  the front-end Django server. The build handles localization, Handlebars
  precompilation, and static asset management
- The following dev dependecies are introduced:
  - recursive-copy
  - js-yaml
  - node-gettext
  - gettext-parser
  - object-walk
  - handlebars
  - wax-on

Addresses: #655
  • Loading branch information
goldpbear committed Dec 11, 2017
1 parent 5504c4f commit c9df65b
Show file tree
Hide file tree
Showing 9 changed files with 25,105 additions and 3,311 deletions.
26,969 changes: 23,823 additions & 3,146 deletions package-lock.json

Large diffs are not rendered by default.

277 changes: 277 additions & 0 deletions src/base/static/index.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/base/static/js/views/app-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@ module.exports = Backbone.View.extend({
_.isUndefined(this.options.appConfig.list_enabled) ||
this.options.appConfig.list_enabled
) {
this.listView = new PlaceListView({
el: "#list-container",
placeCollections: self.places,
placeConfig: this.options.placeConfig,
}).render();
// this.listView = new PlaceListView({
// el: "#list-container",
// placeCollections: self.places,
// placeConfig: this.options.placeConfig,
// }).render();
}

// Cache panel elements that we use a lot
Expand Down
2 changes: 2 additions & 0 deletions src/base/static/js/views/place-list-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ module.exports = Backbone.Marionette.CompositeView.extend({
collection.on("add", self.addModel, self);
});

console.log("!!!!", this.collection);

this.itemsPerPage = 10;
this.numItemsShown = this.itemsPerPage;

Expand Down
326 changes: 166 additions & 160 deletions src/base/templates/base.hbs

Large diffs are not rendered by default.

277 changes: 277 additions & 0 deletions src/flavors/pboakland/templates/index-en_US.html

Large diffs are not rendered by default.

277 changes: 277 additions & 0 deletions src/flavors/pboakland/templates/index-es.html

Large diffs are not rendered by default.

277 changes: 277 additions & 0 deletions src/flavors/pboakland/templates/index-zh_Hant.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ var outputBasePath = path.resolve(__dirname, "www");
const extractSCSS = new ExtractTextPlugin((process.env.NODE_ENV === "production") ? "[contenthash].bundle.css" : "bundle.css");
const extractYML = new ExtractTextPlugin("config-en_US.js");


module.exports = {
entry: entryPoints,
output: {
Expand Down

0 comments on commit c9df65b

Please sign in to comment.