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 Nov 8, 2017
1 parent 5ffec72 commit 8e7d0dc
Show file tree
Hide file tree
Showing 9 changed files with 25,103 additions and 3,312 deletions.
26,968 changes: 23,821 additions & 3,147 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 8e7d0dc

Please sign in to comment.